My tasks involved involved:
- copying scalars from an atlas mesh to lots of other meshes
- using scalars to clip the meshes
- computing the surface distance of the meshes to their corresponding labelled images that were created by clinical experts
- computing the scalar statistics across the population of meshes (my meshes already have point to point correspondence)
Each one of the above tasks can be achieved as:
- The --scalarcopy option in milxModelApp provides a way to do this. I did:
milxModelApp --scalarcopy focus_atlases/focus_bladder_atlas.vtk results/bladder/asm_bladder_*.vtk -p results_scalars/bladder/
Copy scalars from atlas mesh (focus_bladder_atlas.vtk) to other meshes in directory (results/bladder/asm_bladder_*.vtk) and output to another directory with same names. - The --clip
option in milxModelApp provides a way to do this. I did:
milxModelApp --clip 1 results_scalars/bladder/asm_bladder_*.vtk -p results_clipped/bladder/
Clip meshes in directory keeping only parts with value of 1 and output to another directory with same names. - We need to write a script for the milxHausdorffDistance application that provides this using distance maps in a straight forward way. This script is now in the repository as scripts/
batch_hausdorff.py. An example usage of the application:
milxHausdorffDistance results_clipped/bone/asm_bone_4.vtk -p Hausdorff/bone/bone__ -o Hausdorff/bone/bone__004.vtk --label manuals_renamed/bone/manual_case_bone_004.nii.gz --labelvalue 1 -c 004
The distance map of the manual is created and the distances stored on the mesh thus giving the surface distances to the manual. - The --scalarstats option in milxModelApp provides this. I did:
milxModelApp --scalarstats Hausdorff/bladder/bladder__*.vtk -o bladder_stats.vtk
Compute scalars stats (mean, variance etc. per point) of meshes in directory and output single mesh (of first mesh) with stats as arrays in mesh. You can then use sMILX viewer to view the meshes and change the loaded arrays via the Right Click->Show->Load Array menu.
Note that the milxDeformableModel app is an application derived from milxModelApp and additionally provides options for voxelising surfaces and applying image orientation to surfaces.
Cheers Shakes - L3mming
No comments:
Post a Comment