Skip to content
Snippets Groups Projects
Commit 8a5486aa authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Finished implementing point-based projection

parent 0c660d2b
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ if __name__ == '__main__': ...@@ -14,7 +14,7 @@ if __name__ == '__main__':
) )
where_output_root = Path( where_output_root = Path(
'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0009' 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0009/output'
) )
yyyymmdd = strftime('%Y%m%d', localtime()) yyyymmdd = strftime('%Y%m%d', localtime())
idx = 0 idx = 0
...@@ -51,7 +51,7 @@ if __name__ == '__main__': ...@@ -51,7 +51,7 @@ if __name__ == '__main__':
} }
result = export_patches_from_multichannel_zstack(**export_kwargs) result = export_patches_from_multichannel_zstack(**export_kwargs)
break
# parse and record results # parse and record results
df = result['dataframe'] df = result['dataframe']
df['filename'] = ff.name df['filename'] = ff.name
...@@ -65,4 +65,4 @@ if __name__ == '__main__': ...@@ -65,4 +65,4 @@ if __name__ == '__main__':
write_accessor_data_to_file( write_accessor_data_to_file(
where_output / k / (ff.stem + '.tif'), where_output / k / (ff.stem + '.tif'),
InMemoryDataAccessor(result['interm'][k]) InMemoryDataAccessor(result['interm'][k])
) )
\ No newline at end of file \ No newline at end of file
...@@ -100,7 +100,7 @@ class TestZStackDerivedDataProducts(unittest.TestCase): ...@@ -100,7 +100,7 @@ class TestZStackDerivedDataProducts(unittest.TestCase):
from extensions.chaeo.zmask import project_stack_from_focal_points from extensions.chaeo.zmask import project_stack_from_focal_points
dff = df[df['keeper'] == True] dff = df[df['keeper']]
img = project_stack_from_focal_points( img = project_stack_from_focal_points(
dff['centroid-0'].to_numpy(), dff['centroid-0'].to_numpy(),
......
...@@ -4,7 +4,7 @@ from typing import Dict ...@@ -4,7 +4,7 @@ from typing import Dict
from extensions.ilastik.models import IlastikPixelClassifierModel from extensions.ilastik.models import IlastikPixelClassifierModel
from extensions.chaeo.annotators import draw_boxes_on_3d_image from extensions.chaeo.annotators import draw_boxes_on_3d_image
from extensions.chaeo.products import export_patches_from_zstack from extensions.chaeo.products import export_patches_from_zstack
from extensions.chaeo.zmask import build_zmask_from_object_mask from extensions.chaeo.zmask import build_zmask_from_object_mask, project_stack_from_focal_points
from model_server.accessors import generate_file_accessor, InMemoryDataAccessor, write_accessor_data_to_file from model_server.accessors import generate_file_accessor, InMemoryDataAccessor, write_accessor_data_to_file
from model_server.workflows import Timer from model_server.workflows import Timer
...@@ -83,15 +83,15 @@ def export_patches_from_multichannel_zstack( ...@@ -83,15 +83,15 @@ def export_patches_from_multichannel_zstack(
) )
ti.click('export_annotated_zstack') ti.click('export_annotated_zstack')
# from extensions.chaeo.zmask import build_image_flattening_zmask_from_points # generate multichannel projection from label centroids
# dff = df[df['keeper']]
# dff = df[df['keeper'] == True] interm['projected'] = project_stack_from_focal_points(
# build_image_flattening_zmask_from_points( dff['centroid-0'].to_numpy(),
# dff['centroid-0'], dff['centroid-1'].to_numpy(),
# dff['centroid-1'], dff['zi'].to_numpy(),
# dff['zi'], stack,
# stack.get_one_channel_data(patches_channel).data, degree=4,
# ) )
return { return {
'pixel_model_id': px_model.model_id, 'pixel_model_id': px_model.model_id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment