Simulation spatial orientation

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
François de Kermenguy
Posts: 13
Joined: Sat Oct 02, 2021 12:08 am

Simulation spatial orientation

Post by François de Kermenguy » Tue Jan 11, 2022 7:27 am

Hello!
I have a question about the spatial orientation of the simulation generated by SimVascular. In Simvascular, we have access to this file regarding the image details:

Code: Select all

  Image (0000024CA1D69E80)
     Dimension: 3
     Dimensions: 512 512 299 
     Channel: Unnamed []
     PixelType: 
     BytesPerElement: 4
     ComponentType: int
     NumberOfComponents: 1
     BitsPerComponent: 32

     TimeGeometry:     ProportionalTimeGeometry (xxx)
       TimeSteps: 1
       FirstTimePoint: -1.79769e+308
       StepDuration: inf ms
       Time Bounds: -1.79769e+308 - 1.79769e+308

       GetGeometryForTimeStep(0):       SlicedGeometry3D (xxx)
         IndexToWorldTransform: 
        Matrix: 
          0.117188 0 0 
          0 0.117188 0 
          0 0 0.2 
        Offset: [-29.9414, -51.2414, -43]
        Center: [0, 0, 0]
        [b]Translation: [-29.9414, -51.2414, -43][/b]
        Inverse: 
          8.53333 0 0 
          0 8.53333 0 
          0 0 5 
        Scale : 1 1 1 
         BoundingBox:         ( 0,512 0,512 0,299  )
         Origin: [-29.9414, -51.2414, -43]
         ImageGeometry: 1
         Spacing: [0.117188, 0.117188, 0.2]
         EvenlySpaced: 1
         DirectionVector: [0, 0, 1]
         Slices: 299
In Paraview, when I load my .vtu file from Simvascular and the original DICOM image, the 2 do not overlap.
  • The simulation is scaled 1/10 compared to the image (normal because when we load the image in SimVascular, we are proposed to apply a scalling of 1/10) => I apply the "Transform" filter of paraview with a scale of 10
  • The spatial origin of the simulation is not the same as the image => I translate the simulation from [-29.9414, -51.2414, -43] (according to "Translation" in the file), still with the "Transform" filter.
  • The simulation is now superimposed on the image, but not in the right "direction". Which rotation should I apply? The file gives a matrix "Matrix" and a matrix "Inverse", but they do not look like 3D rotation matrices. For example, the "Matrix" matrix simply has the spacing of the image on its diagonal. I consulted the MITK documentation (https://docs.mitk.org/nightly/GeometryOverviewPage.html) but it is not very clear I think:
position information in form of a Euclidean transform in respect to world coordinates (i.e. a linear transformation matrix and offset) to convert (discrete or continuous) index coordinates to world coordinates and vice versa, to be accessed by mitk::BaseGeometry::GetIndexToWorldTransform(). See also: Introduction to Geometries
Thanks in advance for your help!
fderkerm

User avatar
David Parker
Posts: 1705
Joined: Tue Aug 23, 2005 2:43 pm

Re: Simulation spatial orientation

Post by David Parker » Tue Jan 11, 2022 1:52 pm

Hi fderkerm,

I believe the orientation difference you are seeing between ParaView and SV is caused by the way MITK transforms an input DICOM image to conform to the LPS (Left, Posterior, Superior) anatomical coordinate system uses, the center is always set to (0,0,0). I don't know how ParaView sets the DICOM coordinate system.

The Matrix you mention is a vtkMatrix4x4 object used to set axes spacing for the ITK toolkit used by MITK. It is not an affine image space transformation like you would expect.

Cheers,
Dave

POST REPLY