[Insight-users] Negative spacing. Is that going to get me into trouble?
Karthik Krishnan
karthik.krishnan at kitware.com
Tue May 19 17:25:54 EDT 2009
John:
Its customary to use the camera to view the data at the desired orientation
instead of changing the data.
--
karthik
On Tue, May 19, 2009 at 5:13 PM, John Drescher <drescherjm at gmail.com> wrote:
> On Tue, May 19, 2009 at 4:48 PM, kent williams
> <nkwmailinglists at gmail.com> wrote:
> > Not to get all LOLCats on you or anything but UR DOING IT RONG.
> >
> > The spacing is a size in centimeters -- usually. A negative size
> > won't do what you want.
> >
> I know but that seems to work while the correct way fails..
>
> >
> > It sounds like you're using DICOM files, but you don't say so
> > explicitly.
>
> Yes.
>
> >ITK will try and recover the proper orientation in
> > anatomical space from DICOM files.
> >
> > The way to handle this properly would be to change the ITK Direction
> > Cosines for the image. It's perfectly reasonable for the slices to be
> > ordered in the negative image direction, but you have to clue in ITK
> > and VTK how it's oriented.
> >
> > The easiest way is to load the file with ITK, and then set the
> > Direction Cosines to reflect the actual orientation of the image in 3D
> > space. In this case you'd probably specify
> >
> > 1 0 0
> > 0 1 0
> > 0 0 -1
> >
> I initially did that, but vtk had the Coronal and Sagittal views
> upside down. Having vtk flip the output lead to problems because the
> display code is doing computations like the following:
>
> origin[axis] + slice * spacing[axis];
>
> >
> > as the direction cosines. Then use the itk::OrientImageFilter to set
> > its orientation to identity, which according to
> > itk::OrientImageFilter's nomenclature is RAI.
> >
> > The other solution would be to read the slices in reverse order -- the
> > itk::ImageSeriesReader allows you to customize the ordering -- you
> > could read all the names into a std::list and then reverse the list
> > before having the Series Reader do it's thing.
> >
>
> I want the images loaded this way because I pass the image on to 2
> different libraries (c array based) that requires this orientation for
> their processing. I could have let itk read the images in
> PatientPosition and flipped but I plan to eventually display the
> result so I wanted to keep the volume and the result in memory the
> same orientation..
>
> John
> _____________________________________
> 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/20090519/7e577e53/attachment-0001.htm>
More information about the Insight-users
mailing list