[Insight-users] Extract 2D slice put back as 3D correct orientation

Emma Saunders emmasaunders123 at gmail.com
Wed May 1 09:15:22 EDT 2013


Hi Bradley, thanks for your help

The tile image filter will therefore just create a 3D volume from 1 slice.
 I need however to be able to change the orientation of the image without
changing the name tag.

Example I have a 2D slice saved as a 3D with [200 200 1] and RAI code RAI
call image A

I have another 2D slice [1 200 200] again with RAI code RAI call Image B

I would like to compare image A and B in a viewer (ITK snap).

If I permute the image A to obtain [1 200 200] this will change the RAI code

If I change the direction this also changes the RAI code.

Is there anyway in ITK to do such a task.

Many thanks

Emma


On Tue, Apr 30, 2013 at 11:38 PM, Emma Saunders
<emmasaunders123 at gmail.com>wrote:

> Hi Bradley thanks for you help.  This doesn't appear however to satisfy
> what I need.  I have a 2D sagittal slice in 3D form with dimensions [1 128
> 128] with RAI orientation as defined in ITK snap.  I permute the axis as
> you suggested to give [128 128 1].  I then use extract image filter to get
> the 2D slice and perform some processing.  I would then like to put the 2D
> slice back into it's original form, I therefore use cast Image filter to
> again make it a 3D image, I then permute once again to get [1 128 128]
> dimensions, this however changes the orientation to another form and will
> not allow me to reproduce the original image.  Is there something Im
> missing?
>
> Thanks for your help
>
> Emma
>
> ---------- Forwarded message ----------
> From: Bradley Lowekamp <blowekamp at mail.nih.gov>
> Date: Tue, Apr 30, 2013 at 8:18 PM
> Subject: Re: [Insight-users] Extract 2D slice put back as 3D correct
> orientation
> To: Emma Saunders <emmasaunders123 at gmail.com>
>
>
> Hello Emma,
>
> Perhaps the PermuteAxesImageFilter will help you:
>
> http://www.itk.org/Doxygen/html/classitk_1_1PermuteAxesImageFilter.html
>
> Brad
>
> On Apr 30, 2013, at 2:46 PM, Emma Saunders <emmasaunders123 at gmail.com>
> wrote:
>
> > Hi everyone,
> >
> > I'm struggling with what I should imagine should be quite simple.  I
> extract a slice from a 3D volume [128,128,128] along it's first dimension,
> thus setting the size[0]=0;
> >
> > I would like to then put this back into the 3D volume but the
> orientation is incorrect when using cast Image filter to load back as a 3D
> as it only saves it as a transaxial slice in the volume, not a sagittal.  I
> have attempted re-orienting the direction cosines of the images but this
> just laves me with an image with a different orientation, what I would like
> is to somehow switch the pixel values in a given dimensions from [1 128
> 128] to [128 128 1]?
> >
> > Any help appreciated?
> >
> > Kind regards
> >
> > Emma
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > 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/20130501/3a17f20b/attachment.htm>


More information about the Insight-users mailing list