<div dir="ltr">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?<div>
<br></div><div>Thanks for your help</div><div><br></div><div>Emma</div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Bradley Lowekamp</b> <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span><br>
Date: Tue, Apr 30, 2013 at 8:18 PM<br>Subject: Re: [Insight-users] Extract 2D slice put back as 3D correct orientation<br>To: Emma Saunders <<a href="mailto:emmasaunders123@gmail.com" target="_blank">emmasaunders123@gmail.com</a>><br>
<br><br>Hello Emma,<br>
<br>
Perhaps the PermuteAxesImageFilter will help you:<br>
<br>
<a href="http://www.itk.org/Doxygen/html/classitk_1_1PermuteAxesImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1PermuteAxesImageFilter.html</a><br>
<br>
Brad<br>
<div><div><br>
On Apr 30, 2013, at 2:46 PM, Emma Saunders <<a href="mailto:emmasaunders123@gmail.com" target="_blank">emmasaunders123@gmail.com</a>> wrote:<br>
<br>
> Hi everyone,<br>
><br>
> 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;<br>
><br>
> 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]?<br>
><br>
> Any help appreciated?<br>
><br>
> Kind regards<br>
><br>
> Emma<br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
</div><br></div>