<div dir="ltr">Hi,<div><br></div><div>I'm playing with this filter to rotate an image with frames/slices.</div><div>With inmediate viewing result on vtk widget.</div><div><br></div><div>My plan is </div><div><br></div><div>1) to rotate all frames 90º each time I push a button.</div><div>2) to flip all frames horizontal or vertical each time I push a button.</div><div><br></div><div>I'm playing with the values of the range:</div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">typedef</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">itk</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">PermuteAxesImageFilter</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">float, 3</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">PermuteAxesImageFilterType</span><span style="color:rgb(0,0,0)">;</span></pre></div><div><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,128)">itk</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">FixedArray</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,128,0)">unsigned</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">3</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">order</span><span style="color:rgb(0,0,0)">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">order</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">]</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><font color="#000080">1</font><span style="color:rgb(0,0,0)">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">order</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,128)">1</span><span style="color:rgb(0,0,0)">]</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><font color="#000080">0</font><span style="color:rgb(0,0,0)">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">order</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,128)">2</span><span style="color:rgb(0,0,0)">]</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><font color="#000080">2</font><span style="color:rgb(0,0,0)">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,0)">rotateFilter</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">SetOrder</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">order</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,0)">rotateFilter</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">UpdateLargestPossibleRegion</span><span style="color:rgb(0,0,0)">();</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><div style="font-family:arial,sans-serif;white-space:normal">With (0,1,2) I get the same image. Ok. </div><div style="font-family:arial,sans-serif;white-space:normal">If I use (1,0,2), I get all frames rotated 90º AND flipped.</div><div style="font-family:arial,sans-serif;white-space:normal"><br></div><div style="font-family:arial,sans-serif;white-space:normal">Every frame has width != length, of course all frames have the same dimensions.</div><div style="font-family:arial,sans-serif;white-space:normal"><br></div><div style="font-family:arial,sans-serif;white-space:normal">I thought that maintaining the third order value as the last one, it wouldn't affect.</div><div style="font-family:arial,sans-serif;white-space:normal"><br></div><div style="font-family:arial,sans-serif;white-space:normal">Not sure if my idea is the correct.</div><div style="font-family:arial,sans-serif;white-space:normal">Please, I'd apreciate any help.</div><div style="font-family:arial,sans-serif;white-space:normal">Thank you.</div></pre></div></div>