<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>I think the TileImageFilter may do what you want:</div><div><br></div><div><a href="http://www.itk.org/Doxygen/html/classitk_1_1TileImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1TileImageFilter.html</a></div><div><br></div><div><a href="http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume">http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume</a></div><div><br></div><div>I think if you specify a [ 0, 1, 1 ] layout with just your one image it should do the trick.</div><div><br></div><div>Brad</div><div><br><div><div>On Apr 30, 2013, at 6:35 PM, Emma Saunders &lt;<a href="mailto:emmasaunders123@gmail.com">emmasaunders123@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><div dir="ltr">Hi Bradley thanks for you help. &nbsp;This doesn't appear however to satisfy what I need. &nbsp;I have a 2D sagittal slice in 3D form with dimensions [1 128 128] with RAI orientation as defined in ITK snap. &nbsp;I permute the axis as you suggested to give [128 128 1]. &nbsp;I then use extract image filter to get the 2D slice and perform some processing. &nbsp;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. &nbsp;Is there something Im missing?<div>
<br></div><div style="">Thanks for your help</div><div style=""><br></div><div style="">Emma</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 30, 2013 at 8:18 PM, Bradley Lowekamp <span dir="ltr">&lt;<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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 class="h5"><br>
On Apr 30, 2013, at 2:46 PM, Emma Saunders &lt;<a href="mailto:emmasaunders123@gmail.com">emmasaunders123@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi everyone,<br>
&gt;<br>
&gt; I'm struggling with what I should imagine should be quite simple. &nbsp;I extract a slice from a 3D volume [128,128,128] along it'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. &nbsp;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>
</blockquote></div><br></div>
</blockquote></div><br></div></body></html>