<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD>
<BODY>
<DIV>
<P><FONT face=Arial size=2><SPAN class=752284001-18062003>Hello 
All:</SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN class=752284001-18062003>&nbsp;&nbsp;&nbsp; 
Thanks for a toolkit that seems to have tons of useful functionality... once I 
learn how to use it:)</SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN class=752284001-18062003>I have set up a 
pipeline to show three orthogonal views of a dataset. I know this question is on 
the list many times, but I've tried many of the solutions to no 
avail.</SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN class=752284001-18062003>If I just&nbsp;use a 
vtkImageViewer I get all three views and can slice through the dataset fine. If 
I use a vtkImageViewer2 with the same pipeline I get nothing.&nbsp;But in 
reality, neither of them really suits my need so I've set up the following 
pipeline&nbsp;so that I can&nbsp;use a vtkImageBlend at the end to show the 
results of&nbsp;two registered datasets.&nbsp;The result of the pipeline below 
is the ability to get a few partial slices of the transverse view that are 
</SPAN></FONT><FONT face=Arial size=2><SPAN class=752284001-18062003>&nbsp;in 
the top right corner (not the bottom left as with the same spacing and origin 
using a vtkImageViewer). I get no visible slices in the coronal or sagittal 
view. Any hints on what I've missed? I think that I have a misunderstanding of 
when the 3D dataset is actually "sliced" into a 2D dataset... should this be in 
the reslicer or in the image actor?</SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN 
class=752284001-18062003></SPAN></FONT>&nbsp;</P>
<P><FONT face=Arial size=2><SPAN class=752284001-18062003>Thanks in advance for 
your help.</SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN 
class=752284001-18062003></SPAN></FONT>&nbsp;</P>
<P><FONT face=Arial size=2><SPAN class=752284001-18062003>Todd 
Baker</SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN class=752284001-18062003><A 
href="mailto:tbaker@claritysolutionsllc.com">tbaker@claritysolutionsllc.com</A></SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN class=752284001-18062003>// function importing 
a pointer to an imported data array</SPAN></FONT></P>
<P><FONT size=2><FONT>GetFixedVolumeData</FONT>(PFixedVolumeData<FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeDim[0] = 
PFixedVolumeSpecs-&gt;XDim</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeDim[1] = 
PFixedVolumeSpecs-&gt;YDim</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeDim[2] = 
PFixedVolumeSpecs-&gt;ZDim</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>VolumeImportFilter-&gt;SetImportPointer( 
PFixedVolumeData</FONT><FONT face=Arial>,</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeDim[0</FONT><FONT face=Arial>] 
*</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeDim[1</FONT><FONT face=Arial>] 
*</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeDim[2], false</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT face=Arial size=2></FONT></P>
<P><FONT face=Arial size=2>// set up size</FONT></P>
<P><FONT size=2><FONT face=Arial>NativeSize[0] = NativeDim[0</FONT><FONT 
face=Arial>];</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeSize[1] = NativeDim[1</FONT><FONT 
face=Arial>];</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeSize[2] = NativeDim[2</FONT><FONT 
face=Arial>];</FONT></FONT></P>
<P><FONT face=Arial size=2>// set up start</FONT></P>
<P><FONT size=2><FONT face=Arial>NativeStart.Fill(0</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT face=Arial size=2>// set default region</FONT></P>
<P><FONT size=2><FONT face=Arial>NativeRegion.SetIndex( NativeStart</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeRegion.SetSize ( NativeSize</FONT><FONT 
face=Arial> );</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>VolumeImportFilter-&gt;SetRegion( 
NativeRegion</FONT><FONT face=Arial> );</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeSpacing[0] = 
PFixedVolumeSpecs-&gt;XSpacing</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeSpacing[1] = 
PFixedVolumeSpecs-&gt;YSpacing</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeSpacing[2] = 
PFixedVolumeSpecs-&gt;ZSpacing</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>VolumeImportFilter-&gt;SetSpacing ( 
NativeSpacing</FONT><FONT face=Arial> );</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeOrigin[0] = - PFixedVolumeSpecs-&gt;XDim 
* PFixedVolumeSpecs-&gt;XSpacing * 0.5</FONT><FONT 
face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeOrigin[1] = - PFixedVolumeSpecs-&gt;YDim 
* PFixedVolumeSpecs-&gt;YSpacing * 0.5</FONT><FONT 
face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeOrigin[2] = - PFixedVolumeSpecs-&gt;ZDim 
* PFixedVolumeSpecs-&gt;ZSpacing * 0.5</FONT><FONT 
face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>VolumeImportFilter-&gt;SetOrigin( 
NativeOrigin</FONT><FONT face=Arial> );</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>VolumeImportFilter-&gt;UpdateLargestPossibleRegion</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT face=Arial size=2>// connect the itkImportFilter to an 
itkVtkAdaptor</FONT></P>
<P><FONT size=2><FONT 
face=Arial>ivAdaptor-&gt;SetInput(VolumeImportFilter-&gt;GetOutput</FONT><FONT 
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerTrans-&gt;SetInput(MapperTrans1-&gt;GetOutput</FONT><FONT 
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerTrans-&gt;SetResliceAxesOrigin(NativeOrigin</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerTrans-&gt;SetOutputExtent(0, 
NativeDim[0] - 1, 0, NativeDim[1] - 1, 0, NativeDim[2] - 1</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerTrans-&gt;SetOutputOrigin(NativeOrigin[0], NativeOrigin[1], 
NativeOrigin[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerTrans-&gt;InterpolateOn</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerCor-&gt;SetInput(MapperCor1-&gt;GetOutput</FONT><FONT 
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerCor-&gt;InterpolateOn</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerCor-&gt;SetResliceAxesOrigin(NativeOrigin</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerCor-&gt;SetOutputExtent(0, NativeDim[0] 
- 1, 0, NativeDim[1] - 1, 0, NativeDim[2] - 1</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerCor-&gt;SetOutputOrigin(NativeOrigin[0], NativeOrigin[1], 
NativeOrigin[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerSag-&gt;SetInput(MapperSag1-&gt;GetOutput</FONT><FONT 
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerSag-&gt;InterpolateOn</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerSag-&gt;SetResliceAxesOrigin(NativeOrigin</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerSag-&gt;SetOutputExtent(0, NativeDim[0] 
- 1, 0, NativeDim[1] - 1, 0, NativeDim[2] - 1</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerSag-&gt;SetOutputOrigin(NativeOrigin[0], NativeOrigin[1], 
NativeOrigin[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerCor-&gt;SetResliceAxesDirectionCosines(1, 0, 0, 0, 0, -1, 0, 
1, 0</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerSag-&gt;SetResliceAxesDirectionCosines(0, 1, 0, 0, 0, -1, 1, 
0, 0</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerTrans-&gt;SetOutputSpacing(NativeSpacing[0], 
NativeSpacing[1], NativeSpacing[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerCor-&gt;SetOutputSpacing(NativeSpacing[0], NativeSpacing[1], 
NativeSpacing[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ReslicerSag-&gt;SetOutputSpacing(NativeSpacing[0], NativeSpacing[1], 
NativeSpacing[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT face=Arial size=2></FONT></P>
<P><FONT size=2><FONT 
face=Arial>MapperTrans1-&gt;SetInput(ivAdaptor-&gt;GetOutput</FONT><FONT 
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>MapperTrans1-&gt;UpdateWholeExtent</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ActorTrans1-&gt;SetInput(ReslicerTrans-&gt;GetOutput</FONT><FONT 
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ActorTrans1-&gt;SetDisplayExtent(0, 
PFixedVolumeSpecs-&gt;XDim - 1, 0, PFixedVolumeSpecs-&gt;YDim - 1, 0, 
PFixedVolumeSpecs-&gt;ZDim - 1</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>RenderTrans1-&gt;AddActor(ActorTrans1</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ActorTrans1-&gt;SetZSlice((ActorTrans1-&gt;GetWholeZMax() - 
ActorTrans1-&gt;GetWholeZMin()) * 0.5</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>MapperCor1-&gt;SetInput(ivAdaptor-&gt;GetOutput</FONT><FONT 
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>MapperCor1-&gt;UpdateWholeExtent</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ActorCor1-&gt;SetInput(ReslicerCor-&gt;GetOutput</FONT><FONT 
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ActorCor1-&gt;SetDisplayExtent(0, 
PFixedVolumeSpecs-&gt;XDim - 1, 0, PFixedVolumeSpecs-&gt;YDim - 1, 0, 
PFixedVolumeSpecs-&gt;ZDim - 1</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>RenderCor1-&gt;AddActor(ActorCor1</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ActorCor1-&gt;SetZSlice((ActorCor1-&gt;GetWholeZMax() - 
ActorCor1-&gt;GetWholeZMin()) * 0.5</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>MapperSag1-&gt;SetInput(ivAdaptor-&gt;GetOutput</FONT><FONT 
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>MapperSag1-&gt;UpdateWholeExtent</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ActorSag1-&gt;SetInput(ReslicerSag-&gt;GetOutput</FONT><FONT 
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ActorSag1-&gt;SetDisplayExtent(0, 
PFixedVolumeSpecs-&gt;YDim - 1, 0, PFixedVolumeSpecs-&gt;YDim - 1, 0, 
PFixedVolumeSpecs-&gt;ZDim - 1</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>RenderSag1-&gt;AddActor(ActorSag1</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>ActorSag1-&gt;SetZSlice((ActorSag1-&gt;GetWholeZMax() - 
ActorSag1-&gt;GetWholeZMin()) * 0.5</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT face=Arial size=2></FONT>&nbsp;</P>
<P><FONT size=2><FONT face=Arial>ReslicerTrans-&gt;UpdateWholeExtent</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerCor-&gt;UpdateWholeExtent</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerSag-&gt;UpdateWholeExtent</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>vtkTextActor * lblPatientName = 
vtkTextActor::New</FONT><FONT face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>vtkTextProperty * lblPatientNameProps = 
lblPatientName-&gt;GetTextProperty</FONT><FONT face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>lblPatientName-&gt;SetInput</FONT><FONT 
face=Arial>("Head, SQ\n12\\20\\2002");</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>lblPatientNameProps-&gt;SetFontFamilyToCourier</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>lblPatientName-&gt;GetPositionCoordinate()-&gt;SetCoordinateSystemToNormalizedViewport</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>lblPatientName-&gt;GetPositionCoordinate()-&gt;SetValue(0.1, 
0.75</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT 
face=Arial>RenderSag1-&gt;AddActor(lblPatientName</FONT><FONT 
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>RenderWindow-&gt;Render</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>RenderInt-&gt;Initialize</FONT><FONT 
face=Arial>();</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2>RenderInt-&gt;Start();</FONT></P></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>