Surface model misalignment when viewed in Paraview (and other programs)

162 views
Skip to first unread message

Ben Dickerhoff

unread,
Oct 19, 2017, 3:03:31 PM10/19/17
to vmtk-users
Hi VMTK users,

I've created a surface model from a DICOM data set using vmtklevelsetsegmentation and vmtkmarchingcubes. When I open both the image set and the model within other programs, such as Paraview, the model is not oriented correctly. It appears to be rotated and translated with respect to the DICOM data set (see attached image). However, if I use the vmtkrenderer within VMTK to overlay the model over the dataset, the model is in the correct spatial location and orientation.

I do not use vmtkvoiselector to define a region of interest. I remember this creating an issue in the past where the spatial location of the model would be different than the original image set. When the voi selector was used to "crop" an image set, the origin of the data would shift. This appears to be a similar issue, but am not for sure. I don't understanding why vmtkmarchingcubes would alter the origin of the model.

Does the coordinate system change when a model is created? How can I ensure that the model will be spatially aligned?

I will use the surface model (saved as .stl) to create a geometric mask to better visualize and process velocity field information obtained using a 4D Flow MRI sequence. Without the surface model aligned to the data set, the mask would be useless.

Any help would be much appreciated.

Thanks,
Ben Dickerhoff
Paraview_ImageAndVMTKSegModel.PNG
VMTK_ImageAndVMTKSegModel.PNG

Florian J.

unread,
Oct 20, 2017, 4:29:40 PM10/20/17
to vmtk-users
You can fix that with a 180° rotation, either in Paraview (transform filter) or vmtk with vmtksurfacetransform -ifile toto -ofile tata -rotation 0 0 180.

Ben Dickerhoff

unread,
Oct 21, 2017, 10:54:54 PM10/21/17
to vmtk-users
Thank you for the suggestion, Florian. I performed the 180 degree rotation along the X axis and had to apply a translation [-107 +300.5 +19.5] for the model to re-align with the original imaging data (see attached image).

If I segmented this model in VMTK and it is aligned correctly in VMTK, why would the model be misaligned in Paraview?

Thanks,
Ben
Paraview_VMTKModel_VMTKModelTransform.PNG

Simone Manini

unread,
Oct 23, 2017, 3:50:48 AM10/23/17
to vmtk-...@googlegroups.com
Dear Ben,
the surface model generated from a levelsetsegmentation is in the same space of the original image.
The script will apply to the output surface the correct transformation using the transform matrix of the image.
Paraview uses a VTK reader (and not ITK as vmtk or Slicer) and it does not apply the image transform matrix to the original image. 
That's why you see a misalignment. I suggest to use Slicer to double check to check your results and not Paraview.
Simone


--
You received this message because you are subscribed to the Google Groups "vmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+...@googlegroups.com.
To post to this group, send email to vmtk-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Simone Manini, Eng
Engineer, OROBIX Srl
via Camozzi 144, 24121 Bergamo, Italy

orobix:  www.orobix.com
web:     daron1337.github.io
phone:  +39 035 0273786
             +39 035 0170561

"This message originates from Orobix Srl and its contents and attachments are privileged and confidential and are intended only for the individual(s) or entity(ies) named above. This message should not be forwarded, distributed or disclosed. Any unauthorized use, dissemination and duplication is strictly prohibited and may be unlawful. All personal messages express views solely of the sender, which are not to be attributed to Orobix Srl, and may not be copied or distributed without this disclaimer. If you are not the intended recipient or received this message in error, please delete this message and notify the sender by reply e-mail. Opinions, conclusions and other information in this message that do not relate to the official business of Orobix Srl shall be understood as neither given nor endorsed by it."
Reply all
Reply to author
Forward
0 new messages