[Insight-users] DICOM and orientation
Luis Ibanez
luis.ibanez at kitware.com
Tue Jun 30 12:17:15 EDT 2009
Jose,
Please do *not* use FLIP.
The orientation "problem" is simply the result of not thinking
on Physical coordinates.
This is a *visualization* problem, not a data processing one.
The correct way of visualizing medical data in VTK is to
properly place the Camera. Not to fiddle around corrupting
the medical data of the image.
The reason why you see the dataset upside down is because
you have not properly oriented the Up vector of the camera,
and you may have also placed the camera in the incorrect
side of the data set.
in order to do this properly you should get a lot of coffee and
carefully study the following diagrams in this Wiki page:
http://www.itk.org/Wiki/Proposals:Orientation#DICOM_LPS_Orientation_-_Lower_Limb_Graphical_Example
http://www.itk.org/Wiki/Proposals:Orientation#DICOM_LPS_Orientation_-_Full_Body_Graphical_Example
http://www.itk.org/Wiki/Proposals:Orientation#DICOM_LPS_Differences_in_Visualization_presented_to_Radiologist_and_NeuroSurgeons
So....
Instead of going in a dangerous rampage with the Flip filter,
you should start by answering the question:
A) Are you working for a radiologist ?
or are you working for a Neurosurgeon ?
With the answer to this question, go to the third
diagram, and that will tell you where to position your camera.
Then
B) are you generating Axial slices ? Coronal ?
If you are generating an Axial Slice for a Neurosurgeon,
you should put the location of the camera at the center
of the image + a Z translation larger than the image, and
then orient the image with an Up vector equal to -Y, that
is (0.0, -1.0, 0.0). the camera should be looking at the
physical center of the image..
Once you start thinking in terms of Physical Coordinates,
most of this apparent conflicts disappear.
Please let us know if you have any questions,
Thanks
Luis
------------------------------------------------------------------------------
On Tue, Jun 30, 2009 at 10:03 AM, Lic. José M. Rodriguez Bacallao <
jmrbcu at gmail.com> wrote:
> hi, I used vtkImageFlip to do that flip but with WrapITK I could be
> use itkFlipImageFilter this way:
>
> with itk:
>
> flip = itk.FlipImageFilter[image_type].New(Input = fr.GetOutput())
> flip.SetFlipAxes((0,1))
> con.SetInput(flip.GetOutput())
>
> with vtk:
>
> flip = vtk.vtkImageFlip()
> flip.SetFilteredAxis(1)
> flip.SetInput(con.GetOutput())
>
> On 6/30/09, Amardeep Singh <amar.singh at gmx.de> wrote:
> > Hi
> >
> > I guess, you could use the itkFlipImageFilter before you pass the image
> > to VTK for visualisation.
> > Unfortunately, I don't know how to do that in WrapITK, but in the
> > following post you can see
> > an example of its use in C++:
> > http://www.nabble.com/Re:-Nifti-vs-Dicom-orientation-td23276815.html
> >
> > The following post might be of interest, as well:
> > http://www.itk.org/pipermail/insight-users/2005-April/012900.html
> >
> > HTH
> > Amardeep
> >
> > Lic. José M. Rodriguez Bacallao wrote:
> >> no, I don't miss the answer, in fact, I asked how to display the image
> >> in a correct way!!!
> >>
> >> On 6/30/09, Amardeep Singh <amar.singh at gmx.de> wrote:
> >>
> >>> Hi
> >>>
> >>> You might have missed Bill Lorensen's answer to your question. Have
> >>> another look:
> >>> http://n2.nabble.com/DICOM-and-orientation-td3176010.html#a3176022
> >>>
> >>> Regards
> >>> Amardeep
> >>>
> >>> Lic. José M. Rodriguez Bacallao wrote:
> >>>
> >>>> no one?
> >>>>
> >>>> On 6/29/09, Lic. José M. Rodriguez Bacallao <jmrbcu at gmail.com> wrote:
> >>>>
> >>>>
> >>>>> hi folks, I'm reading a dicom image with itk (WrapITK) and
> visualizing
> >>>>> with vtk but, when I try to visualize it, it show inverted in the
> >>>>> screen, this is my code to read and visualize the image:
> >>>>>
> >>>>> image_type = itk.Image[itk.SS, 2]
> >>>>>
> >>>>> image_type = itk.Image[itk.SS, 2]
> >>>>> fr = itk.ImageFileReader[image_type].New()
> >>>>> con = itk.ImageToVTKImageFilter[image_type].New()
> >>>>>
> >>>>> fr.SetFileName('/home/jmrbcu/temp/IM66.dcm')
> >>>>> con.SetInput(fr.GetOutput())
> >>>>>
> >>>>> v = vtk.vtkImageViewer2()
> >>>>> ri = vtk.vtkRenderWindowInteractor()
> >>>>> v.SetupInteractor(ri)
> >>>>> v.SetInput(con.GetOutput())
> >>>>>
> >>>>> v.Render()
> >>>>> v.SetColorWindow(255)
> >>>>> v.SetColorLevel(128)
> >>>>>
> >>>>> ri.Start()
> >>>>>
> >>>>> --
> >>>>> Lic. José M. Rodriguez Bacallao
> >>>>> Centro de Biofisica Medica
> >>>>> -----------------------------------------------------------------
> >>>>> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos
> lo
> >>>>> mismo.
> >>>>>
> >>>>> Recuerda: El arca de Noe fue construida por aficionados, el titanic
> >>>>> por profesionales
> >>>>> -----------------------------------------------------------------
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>
> >>
> >>
> >
> >
>
>
> --
> Lic. José M. Rodriguez Bacallao
> Centro de Biofisica Medica
> -----------------------------------------------------------------
> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
> mismo.
>
> Recuerda: El arca de Noe fue construida por aficionados, el titanic
> por profesionales
> -----------------------------------------------------------------
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090630/f91fd938/attachment.htm>
More information about the Insight-users
mailing list