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

Emma Saunders emmasaunders123 at gmail.com
Tue Apr 30 18:38:01 EDT 2013


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/20130430/00467569/attachment.htm>


More information about the Insight-users mailing list