Skip to content

Commit

Permalink
WIP- #1218: Update Pipeline Seed and backend_deepforge to incorporate…
Browse files Browse the repository at this point in the history
… Image data
  • Loading branch information
umesh-timalsina committed Nov 27, 2019
1 parent e4585d5 commit 7e8a36f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/plugins/GenerateJob/templates/backend_deepforge.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ def figure_to_state(self):
axes_data['xlim'] = axes.get_xlim()
axes_data['ylim'] = axes.get_ylim()
axes_data['lines'] = []
axes_data['images'] = []

# Line Data
for i, line in enumerate(axes.lines):
lineDict = {}
lineDict['points'] = line.get_xydata().tolist()
Expand All @@ -280,6 +283,18 @@ def figure_to_state(self):
lineDict['label'] = line.get_label()

axes_data['lines'].append(lineDict)

# Image data
for i, image in enumerate(axes.images):
imageDict = {}
properties_dict = image.properties()
imageDict['height'] = properties_dict['size'][0]
imageDict['width'] = properties_dict['size'][1]
imageDict['visible'] = properties_dict['visible']
imageDict['rgbaMatrix'] = properties_dict['array'].data.tolist()

axes_data['images'].append(imageDict)

state['axes'].append(axes_data)
return state

Expand Down
Binary file modified src/seeds/pipeline/pipeline.webgmex
Binary file not shown.
2 changes: 1 addition & 1 deletion src/seeds/pipeline/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.14.0
0.14.1

0 comments on commit 7e8a36f

Please sign in to comment.