<!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>
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 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. But in
reality, neither of them really suits my need so I've set up the following
pipeline so that I can use a vtkImageBlend at the end to show the
results of two registered datasets. 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> 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> </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> </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->XDim</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeDim[1] =
PFixedVolumeSpecs->YDim</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeDim[2] =
PFixedVolumeSpecs->ZDim</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>VolumeImportFilter->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->SetRegion(
NativeRegion</FONT><FONT face=Arial> );</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeSpacing[0] =
PFixedVolumeSpecs->XSpacing</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeSpacing[1] =
PFixedVolumeSpecs->YSpacing</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeSpacing[2] =
PFixedVolumeSpecs->ZSpacing</FONT><FONT face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>VolumeImportFilter->SetSpacing (
NativeSpacing</FONT><FONT face=Arial> );</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeOrigin[0] = - PFixedVolumeSpecs->XDim
* PFixedVolumeSpecs->XSpacing * 0.5</FONT><FONT
face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeOrigin[1] = - PFixedVolumeSpecs->YDim
* PFixedVolumeSpecs->YSpacing * 0.5</FONT><FONT
face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>NativeOrigin[2] = - PFixedVolumeSpecs->ZDim
* PFixedVolumeSpecs->ZSpacing * 0.5</FONT><FONT
face=Arial>;</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>VolumeImportFilter->SetOrigin(
NativeOrigin</FONT><FONT face=Arial> );</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>VolumeImportFilter->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->SetInput(VolumeImportFilter->GetOutput</FONT><FONT
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ReslicerTrans->SetInput(MapperTrans1->GetOutput</FONT><FONT
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ReslicerTrans->SetResliceAxesOrigin(NativeOrigin</FONT><FONT
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerTrans->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->SetOutputOrigin(NativeOrigin[0], NativeOrigin[1],
NativeOrigin[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerTrans->InterpolateOn</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ReslicerCor->SetInput(MapperCor1->GetOutput</FONT><FONT
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerCor->InterpolateOn</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ReslicerCor->SetResliceAxesOrigin(NativeOrigin</FONT><FONT
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerCor->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->SetOutputOrigin(NativeOrigin[0], NativeOrigin[1],
NativeOrigin[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ReslicerSag->SetInput(MapperSag1->GetOutput</FONT><FONT
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerSag->InterpolateOn</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ReslicerSag->SetResliceAxesOrigin(NativeOrigin</FONT><FONT
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerSag->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->SetOutputOrigin(NativeOrigin[0], NativeOrigin[1],
NativeOrigin[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ReslicerCor->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->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->SetOutputSpacing(NativeSpacing[0],
NativeSpacing[1], NativeSpacing[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ReslicerCor->SetOutputSpacing(NativeSpacing[0], NativeSpacing[1],
NativeSpacing[2</FONT><FONT face=Arial>]);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ReslicerSag->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->SetInput(ivAdaptor->GetOutput</FONT><FONT
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>MapperTrans1->UpdateWholeExtent</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ActorTrans1->SetInput(ReslicerTrans->GetOutput</FONT><FONT
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ActorTrans1->SetDisplayExtent(0,
PFixedVolumeSpecs->XDim - 1, 0, PFixedVolumeSpecs->YDim - 1, 0,
PFixedVolumeSpecs->ZDim - 1</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>RenderTrans1->AddActor(ActorTrans1</FONT><FONT
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ActorTrans1->SetZSlice((ActorTrans1->GetWholeZMax() -
ActorTrans1->GetWholeZMin()) * 0.5</FONT><FONT
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>MapperCor1->SetInput(ivAdaptor->GetOutput</FONT><FONT
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>MapperCor1->UpdateWholeExtent</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ActorCor1->SetInput(ReslicerCor->GetOutput</FONT><FONT
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ActorCor1->SetDisplayExtent(0,
PFixedVolumeSpecs->XDim - 1, 0, PFixedVolumeSpecs->YDim - 1, 0,
PFixedVolumeSpecs->ZDim - 1</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>RenderCor1->AddActor(ActorCor1</FONT><FONT
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ActorCor1->SetZSlice((ActorCor1->GetWholeZMax() -
ActorCor1->GetWholeZMin()) * 0.5</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>MapperSag1->SetInput(ivAdaptor->GetOutput</FONT><FONT
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>MapperSag1->UpdateWholeExtent</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ActorSag1->SetInput(ReslicerSag->GetOutput</FONT><FONT
face=Arial>());</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ActorSag1->SetDisplayExtent(0,
PFixedVolumeSpecs->YDim - 1, 0, PFixedVolumeSpecs->YDim - 1, 0,
PFixedVolumeSpecs->ZDim - 1</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>RenderSag1->AddActor(ActorSag1</FONT><FONT
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>ActorSag1->SetZSlice((ActorSag1->GetWholeZMax() -
ActorSag1->GetWholeZMin()) * 0.5</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT face=Arial size=2></FONT> </P>
<P><FONT size=2><FONT face=Arial>ReslicerTrans->UpdateWholeExtent</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerCor->UpdateWholeExtent</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>ReslicerSag->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->GetTextProperty</FONT><FONT face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>lblPatientName->SetInput</FONT><FONT
face=Arial>("Head, SQ\n12\\20\\2002");</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>lblPatientNameProps->SetFontFamilyToCourier</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>lblPatientName->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>lblPatientName->GetPositionCoordinate()->SetValue(0.1,
0.75</FONT><FONT face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT
face=Arial>RenderSag1->AddActor(lblPatientName</FONT><FONT
face=Arial>);</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>RenderWindow->Render</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial>RenderInt->Initialize</FONT><FONT
face=Arial>();</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2>RenderInt->Start();</FONT></P></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>