<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
I think the problem is with this:<BR>
&nbsp;<BR>
<FONT size=4><FONT color=#c0c0c0>&nbsp;&nbsp;&nbsp;&nbsp; </FONT>reslice<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetResliceAxesOrigin<SPAN style="COLOR: rgb(0,0,0)">(</SPAN><SPAN style="COLOR: rgb(0,0,128)">10</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(0,0,128)">20</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(0,0,128)">20</SPAN><SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT><BR><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>reslice<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetResliceAxes<SPAN style="COLOR: rgb(0,0,0)">(</SPAN>resliceAxes<SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT></PRE>
The SetResliceAxes overwrites what SetResliceAxesOrigin does.<BR><BR>Xiaofeng Zhao<BR><BR><BR><BR>&nbsp;<BR>

<HR id=stopSpelling>
Date: Mon, 4 Oct 2010 14:22:03 +0100<BR>From: jothybasu@gmail.com<BR>To: vtkusers@vtk.org<BR>Subject: [vtkusers] vtkImageReslice problem<BR><BR>
<DIV dir=ltr>Hi all,<BR><BR>I am using vtkImageReslice to slice an 3D image data. But the problem is whatever slice value I set, it return the same image.<BR><BR>Can someone have a look at the transformation matrix and the code, please?<BR><BR><SPAN style="COLOR: rgb(192,192,192)"></SPAN><FONT size=2><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">Calculate</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">the</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">center</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">of</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">the</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">volume</SPAN></FONT> <PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>center<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><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>origin<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><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>spacing<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><SPAN style="COLOR: rgb(0,0,128)">0.5</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><SPAN style="COLOR: rgb(0,0,0)">(</SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>extent<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><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>extent<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></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>center<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><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>origin<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><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>spacing<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><SPAN style="COLOR: rgb(0,0,128)">0.5</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><SPAN style="COLOR: rgb(0,0,0)">(</SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>extent<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><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>extent<SPAN style="COLOR: rgb(0,0,0)">[</SPAN><SPAN style="COLOR: rgb(0,0,128)">3</SPAN><SPAN style="COLOR: rgb(0,0,0)">]);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>center<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><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>origin<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><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>spacing<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><SPAN style="COLOR: rgb(0,0,128)">0.5</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><SPAN style="COLOR: rgb(0,0,0)">(</SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>extent<SPAN style="COLOR: rgb(0,0,0)">[</SPAN><SPAN style="COLOR: rgb(0,0,128)">4</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(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>extent<SPAN style="COLOR: rgb(0,0,0)">[</SPAN><SPAN style="COLOR: rgb(0,0,128)">5</SPAN><SPAN style="COLOR: rgb(0,0,0)">]);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>qDebug<SPAN style="COLOR: rgb(0,0,0)">()&lt;&lt;</SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>center<SPAN style="COLOR: rgb(0,0,0)">[</SPAN><SPAN style="COLOR: rgb(0,0,128)">0</SPAN><SPAN style="COLOR: rgb(0,0,0)">]&lt;&lt;</SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>center<SPAN style="COLOR: rgb(0,0,0)">[</SPAN><SPAN style="COLOR: rgb(0,0,128)">1</SPAN><SPAN style="COLOR: rgb(0,0,0)">]&lt;&lt;</SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>center<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></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">Matrices</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">for</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">axial,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">coronal,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">sagittal,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">oblique</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">view</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">orientations</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">       </SPAN><SPAN style="COLOR: rgb(0,128,0)">double</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">axialElements[16]</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">=</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">{</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">               </SPAN><SPAN style="COLOR: rgb(0,128,0)">1,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">               </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">1,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">1,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">               </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">1,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">sliceA,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">               </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">1</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">};</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(128,128,0)">static</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(128,128,0)">double</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>coronalElements<SPAN style="COLOR: rgb(0,0,0)">[</SPAN><SPAN style="COLOR: rgb(0,0,128)">16</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><SPAN style="COLOR: rgb(0,0,0)">{</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">               </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,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,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,128)">0</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">               </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,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,128)">1</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>sliceA<SPAN style="COLOR: rgb(0,0,0)">,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">               </SPAN><SPAN style="COLOR: rgb(0,0,128)">0</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,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,128)">0</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">               </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,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,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,128)">1</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,0)">};</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">static</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">double</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">sagittalElements[16]</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">=</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">{</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">               </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,-1,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">               </SPAN><SPAN style="COLOR: rgb(0,128,0)">1,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">               </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,-1,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">               </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">1</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">};</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//static</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">double</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">obliqueElements[16]</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">=</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">{</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">         </SPAN><SPAN style="COLOR: rgb(0,128,0)">1,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">         </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0.866025,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">-0.5,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">         </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0.5,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0.866025,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">         </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">0,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">1</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">};</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">Set</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">the</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">slice</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">orientation</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkMatrix4x4<SPAN style="COLOR: rgb(0,0,0)">&gt;</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>resliceAxes<SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,0)">=</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">        </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkMatrix4x4<SPAN style="COLOR: rgb(0,0,0)">&gt;::</SPAN>New<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>resliceAxes<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>DeepCopy<SPAN style="COLOR: rgb(0,0,0)">(</SPAN>coronalElements<SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">Set</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">the</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">point</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">through</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">which</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">to</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">slice</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>resliceAxes<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetElement<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,128)">3</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>center<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></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>resliceAxes<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetElement<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,128)">3</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>center<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></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>resliceAxes<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetElement<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,128)">3</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>center<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></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">Extract</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">a</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">slice</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">in</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">the</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">desired</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">orientation</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkImageReslice<SPAN style="COLOR: rgb(0,0,0)">&gt;</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>reslice<SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,0)">=</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">        </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkImageReslice<SPAN style="COLOR: rgb(0,0,0)">&gt;::</SPAN>New<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>reslice<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetInput<SPAN style="COLOR: rgb(0,0,0)">(</SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>imgData<SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>reslice<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetOutputDimensionality<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></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>reslice<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetResliceAxesOrigin<SPAN style="COLOR: rgb(0,0,0)">(</SPAN><SPAN style="COLOR: rgb(0,0,128)">10</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(0,0,128)">20</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(0,0,128)">20</SPAN><SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>reslice<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetResliceAxes<SPAN style="COLOR: rgb(0,0,0)">(</SPAN>resliceAxes<SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>reslice<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetInterpolationModeToLinear<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">reslice-&gt;GetOutput()-&gt;UpdateInformation();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">reslice-&gt;GetOutput()-&gt;UpdateData();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">       </SPAN><SPAN style="COLOR: rgb(0,128,0)">reslice-&gt;GetOutput()-&gt;Update();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">Create</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">a</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">greyscale</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">lookup</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">table</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkLookupTable<SPAN style="COLOR: rgb(0,0,0)">&gt;</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>table<SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,0)">=</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">        </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkLookupTable<SPAN style="COLOR: rgb(0,0,0)">&gt;::</SPAN>New<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>table<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetRange<SPAN style="COLOR: rgb(0,0,0)">(-</SPAN><SPAN style="COLOR: rgb(0,0,128)">300</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,128)">900</SPAN><SPAN style="COLOR: rgb(0,0,0)">);</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">image</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">intensity</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">range</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>table<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetValueRange<SPAN style="COLOR: rgb(0,0,0)">(</SPAN><SPAN style="COLOR: rgb(0,0,128)">0.0</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,128)">1.0</SPAN><SPAN style="COLOR: rgb(0,0,0)">);</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">from</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">black</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">to</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">white</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>table<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetSaturationRange<SPAN style="COLOR: rgb(0,0,0)">(</SPAN><SPAN style="COLOR: rgb(0,0,128)">0.0</SPAN><SPAN style="COLOR: rgb(0,0,0)">,</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,128)">0.0</SPAN><SPAN style="COLOR: rgb(0,0,0)">);</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">no</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">color</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">saturation</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>table<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetRampToLinear<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>table<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>Build<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">Map</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">the</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">image</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">through</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">the</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">lookup</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">table</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkImageMapToColors<SPAN style="COLOR: rgb(0,0,0)">&gt;</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>color<SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,0)">=</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">        </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkImageMapToColors<SPAN style="COLOR: rgb(0,0,0)">&gt;::</SPAN>New<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>color<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetLookupTable<SPAN style="COLOR: rgb(0,0,0)">(</SPAN>table<SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>color<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetInput<SPAN style="COLOR: rgb(0,0,0)">(</SPAN>reslice<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>GetOutput<SPAN style="COLOR: rgb(0,0,0)">());</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">Display</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">the</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">image</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">    </SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>actor<SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,0)">=</SPAN>vtkImageActor<SPAN style="COLOR: rgb(0,0,0)">::</SPAN>New<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>actor<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetInput<SPAN style="COLOR: rgb(0,0,0)">(</SPAN>color<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>GetOutput<SPAN style="COLOR: rgb(0,0,0)">());</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkRenderer<SPAN style="COLOR: rgb(0,0,0)">&gt;</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>renderer<SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,0)">=</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">        </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkRenderer<SPAN style="COLOR: rgb(0,0,0)">&gt;::</SPAN>New<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>renderer<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>AddActor<SPAN style="COLOR: rgb(0,0,0)">(</SPAN>actor<SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">vtkSmartPointer&lt;vtkRenderWindow&gt;</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">window</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">=</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)">        </SPAN><SPAN style="COLOR: rgb(0,128,0)">vtkSmartPointer&lt;vtkRenderWindow&gt;::New();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>ui<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>AxialWidget<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>GetRenderWindow<SPAN style="COLOR: rgb(0,0,0)">()-&gt;</SPAN>AddRenderer<SPAN style="COLOR: rgb(0,0,0)">(</SPAN>renderer<SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">Set</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">up</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">the</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">interaction</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkInteractorStyleImage<SPAN style="COLOR: rgb(0,0,0)">&gt;</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>imageStyle<SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,0)">=</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">        </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkInteractorStyleImage<SPAN style="COLOR: rgb(0,0,0)">&gt;::</SPAN>New<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkRenderWindowInteractor<SPAN style="COLOR: rgb(0,0,0)">&gt;</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN>interactor<SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,0,0)">=</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">        </SPAN>vtkSmartPointer<SPAN style="COLOR: rgb(0,0,0)">&lt;</SPAN>vtkRenderWindowInteractor<SPAN style="COLOR: rgb(0,0,0)">&gt;::</SPAN>New<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN>interactor<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>SetInteractorStyle<SPAN style="COLOR: rgb(0,0,0)">(</SPAN>imageStyle<SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>ui<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>AxialWidget<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>GetRenderWindow<SPAN style="COLOR: rgb(0,0,0)">()-&gt;</SPAN>SetInteractor<SPAN style="COLOR: rgb(0,0,0)">(</SPAN>interactor<SPAN style="COLOR: rgb(0,0,0)">);</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">      </SPAN><SPAN style="COLOR: rgb(128,128,0)">this</SPAN><SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>ui<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>AxialWidget<SPAN style="COLOR: rgb(0,0,0)">-&gt;</SPAN>GetRenderWindow<SPAN style="COLOR: rgb(0,0,0)">()-&gt;</SPAN>Render<SPAN style="COLOR: rgb(0,0,0)">();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><FONT size=4><SPAN style="COLOR: rgb(192,192,192)">     </SPAN><SPAN style="COLOR: rgb(0,128,0)">//</SPAN><SPAN style="COLOR: rgb(192,192,192)"> </SPAN><SPAN style="COLOR: rgb(0,128,0)">this-&gt;ui-&gt;AxialWidget-&gt;show();</SPAN></FONT></PRE><PRE style="TEXT-INDENT: 0px"><BR></PRE>Thanks,<BR><BR>Jothy<BR clear=all><BR>-- <BR>
<DIV dir=ltr>Research Scholar<BR>Dept. of Medical Physics<BR>Clatterbridge Centre for Oncology<BR>UK<BR></DIV><BR></DIV><BR>_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers                                               </body>
</html>