|
|
| Line 1: |
Line 1: |
| − | == Atlas Creator ==
| + | = Atlas Creator = |
| | | | |
| − | [[File:Atlascreator.png]]
| + | The Atlas Creator combines existing segmentations to an anatomical atlas based on robust statistics. |
| | | | |
| − | # <strike>"In my eyes, we should add the ability to normalize the values to 0-1" . I agree with you . Just include a flag</strike>
| + | == GUI == |
| − | # <strike>allow the user select the output cast</strike>
| |
| − | # <strike>add funding agency - Acknowledgements are wrong</strike>
| |
| − | # implement atlas generation that does align to mean of image
| |
| − | ## show mean image, be careful during sum (out of range)
| |
| − | # <strike>Add these points to a wiki list</strike>
| |
| − | # parallelize atlas creation (using GWE?)
| |
| − | # add help and online documentation (no screenshots)
| |
| − | # shape atlas
| |
| | | | |
| − | === Design ===
| + | The following screenshot shows the graphical user interface of the Atlas Creator module in 3D Slicer Version 3. |
| − | [[File:AtlasCreatorStateMachine.png]]
| |
| | | | |
| | + | [[File:Atlascreator.png]] |
| | | | |
| − | === ***OUTDATED*** PROPOSAL: Running Atlas Creator in a Grid Environment === | + | == Priority List == |
| − | Right now, we have the following API
| |
| | | | |
| − | <pre>
| + | # Implement dynamic registration |
| − | def GenerateAtlas(self,inputOriginalsPath,inputManualSegmentationsPath,outputPath,defCase,onlyAffineReg,saveTransforms,saveDeformationFields):
| + | #* Watch out for overflows |
| | + | # Re-structure Atlas Creator code according to the Design specified below |
| | + | # Implement support for parallel Computation |
| | + | # Add Help and Online Documentation |
| | + | # Include Shape Atlas functionality |
| | | | |
| − | inputOriginalsPath: Filepath to the original images
| + | === Design === |
| − | inputManualSegmentationsPath: Filepath to the manual segmentations
| |
| − | </pre>
| |
| | | | |
| − | If we replace the API with lists of filenames instead of filepaths to directories, we get the following API (after renaming the method)
| + | The following State Machine diagram shows the flow of the Atlas Creator logic. |
| | | | |
| − | <pre>
| + | [[File:AtlasCreatorStateMachine.png]] |
| − | def RegisterAndResample(self,inputOriginalsList,inputManualSegmentationsList,outputPath,defCase,onlyAffineReg,saveTransforms,saveDeformationFields):
| |
| − | | |
| − | inputOriginalsList: A list containing filepaths to original images f.e. ['/x/y/case01.nrrd', '/x/y/case02.nrrd'...]
| |
| − | inputManualSegmentationsList: A list containing filepaths to the manual segmentations f.e. ['/x/z/case01.nrrd', '/x/z/case02.nrrd'...]
| |
| − | </pre>
| |
| − | | |
| − | Additionally, we should outsource the final atlas generation in a separate method:
| |
| − | | |
| − | <pre>
| |
| − | def CombineToAtlas(self,inputOriginalsList,inputManualSegmentationsList,outputPath):
| |
| − | | |
| − | parameters declared as above
| |
| − | </pre>
| |
| − | | |
| − | Then, we could leverage the grid wizard enterprise tool to specify Atlas Creator jobs using P2EL. The following constructs could be used to create the list of input filepaths.
| |
| − | | |
| − | <pre>
| |
| − | ${paths}=$const(/home/user/path1,/home/user/path2,/home/user/path3)
| |
| − | ${files}=$dir(/home/user/,path\\d*,.*?[.]log)
| |
| − | ${local}=$in(sftp://host/home/user/file)
| |
| − | </pre>
| |
| − | | |
| − | ==== Workflow ====
| |
| − | | |
| − | The easiest way would be to first generate one job on a GWE enabled cluster for each case:
| |
| − | | |
| − | <pre>
| |
| − | - define files and arguments in P2EL
| |
| − | | |
| − | loop file in files
| |
| − | - start slicer, import Atlas Creator logic
| |
| − | - logic.RegisterAndResample(file..) using the P2EL generated filepath
| |
| − | end loop
| |
| − | </pre>
| |
| − | | |
| − | After all registration and resampling is complete, we could then start one job in total which combines all registered and resampled images to the atlas.
| |
| − | | |
| − | <pre>
| |
| − | - use files and arguments defined in P2EL from above
| |
| − | | |
| − | - run 1 time: CombineToAtlas(..) with complete list of filepaths
| |
| − | </pre>
| |
| − | | |
| − | =====Downside=====
| |
| − | | |
| − | We have to split the creation process in two separate tasks.
| |
| | | | |
| − | This means, that the user might have to activate GWE two times.
| |
| | | | |
| − | We could also just create a separate script which runs the second task without GWE since a cluster is not needed.
| + | ==== Proposal: Running Atlas Creator in a Grid Environment ==== |
| | | | |
| − | =====Sketch===== | + | ==== Proposal: Invoking Atlas Creator via Python ==== |
| − | [[File:SketchAtlasCreatorCluster.jpg]]
| |