<div dir="ltr">Hi Bradley, thanks for your help<div><br></div><div>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.</div>

<div><br></div><div>Example I have a 2D slice saved as a 3D with [200 200 1] and RAI code RAI call image A</div><div><br></div><div>I have another 2D slice [1 200 200] again with RAI code RAI call Image B</div><div><br></div>

<div>I would like to compare image A and B in a viewer (ITK snap).</div><div><br></div><div>If I permute the image A to obtain [1 200 200] this will change the RAI code</div><div><br></div><div>If I change the direction this also changes the RAI code.</div>

<div><br></div><div>Is there anyway in ITK to do such a task.</div><div><br></div><div>Many thanks</div><div><br></div><div>Emma</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 30, 2013 at 11:38 PM, Emma Saunders <span dir="ltr">&lt;<a href="mailto:emmasaunders123@gmail.com" target="_blank">emmasaunders123@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im">Hi Bradley thanks for you help.  This doesn&#39;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&#39;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><div><div class="h5"><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Bradley Lowekamp</b> <span dir="ltr">&lt;<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>&gt;</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 &lt;<a href="mailto:emmasaunders123@gmail.com" target="_blank">emmasaunders123@gmail.com</a>&gt;<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 &lt;<a href="mailto:emmasaunders123@gmail.com" target="_blank">emmasaunders123@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi everyone,<br>
&gt;<br>
&gt; I&#39;m struggling with what I should imagine should be quite simple.  I extract a slice from a 3D volume [128,128,128] along it&#39;s first dimension, thus setting the size[0]=0;<br>
&gt;<br>
&gt; 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>



&gt;<br>
&gt; Any help appreciated?<br>
&gt;<br>
&gt; Kind regards<br>
&gt;<br>
&gt; Emma<br>
</div></div>&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <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></div></div>
</blockquote></div><br></div>