Page MenuHomePhabricator

Saving Registered Data in new Coordinate frame
Closed, ResolvedPublic

Assigned To
Authored By
TE_Cork
Jan 30 2019, 6:23 AM
Referenced Files
F1274050: LV_In_Vivo.nrrd
Jan 30 2019, 6:23 AM
F1274051: LV_Ex_Vivo.nrrd
Jan 30 2019, 6:23 AM

Description

I am trying to save two segmentations after a registration to quantify the accuracy via Dice Coefficient. After Saving both binary masks and loading them into Matlab, it appear the images are back in their original coordinate system. Is there a way to save the segmentation in the same coordinate space in the software?

I have uploaded the segmentations here. Let me know if there are any other parts you need.

Best,

Tyler

Event Timeline

Additionally, I use landmarks and the RigidClosedForm3D algorithm to generate the registration.
Then I open MatchPoint Mapper, select the generated registration and the moving data followed by clicking Refine Geometry.
From there I make my segmentations on the moving and fixed image.

floca triaged this task as Normal priority.Apr 29 2019, 10:22 AM
floca added a subscriber: kislinsk.

@kislinsk Thanks for the hint.

Regarding the question:
If I understood your use case correctly, "refine origin" is not what you want. To compute the dice in order to compare the segmentations you need the same voxel grid to make a voxel by voxel comparison in order to compute your dice coefficient.
"Refine geometry" just modifies the origin and orientation. So the operation literaly moves the whole image block to the position in world space indicated by the registration (thats why it can only be used with rigid registrations).
If you load the data in Matlab and want to compute the dice. You just look at the raw voxel grid. And that was never touched by "refine geometry".
You need to use "Map" to realy map the moving image/segmentation into a new reference geometry. Then you can compute voxel by voxel operation in a sensible manner.

Please regard, that in your case you should supersample the image (both! moving and target) befor you calculate the dice in order to avoid a partial volume effect (PVE) that could spoil you results.

Reason: On image has a worse inplane resolution. The other a very bad z-resolution. So whatever image you would choose you would suffer from a PVE when mapping he segmentation that would spoil one of the segmentation.

So for example take "LV_In_Vivo" but supersample the z dimension by 10 to have a z resolution of 140 px. Both segmentations then would be mapped into a grid 288x200x140 before computing the dice to minimize the partial volume effect. The higher your resolution/supersampling will be, the smaller is the impact of the PVE.

Hope that helps. Please let us know how questions are left.

I will improve the user manual of the Mapper view to make it more clearly.

floca claimed this task.

The fix of the manual is in the master. As there was no more updates/questions, I will closed this task as resolved. @TE_Cork : If there is still an issue, please feel free to open the task again and to provide new information. Thanks.