<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear vtk users</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Forgive me for just asking you without giving any 
contribution yet, since I am still newbie in this field.&nbsp; Hope you can 
still enough time to help me to answer my questions. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I want to read a series of CT medical images 
(Dicom) format, apply image processing methods to obtain the desired quality of 
images and render the volume using volume rendering or surface 
rendering.&nbsp;For these purposes I&nbsp; will combine VTK and ITK since as far 
as I know these two brother is suitable for these tasks. Below are the steps I 
will do:</FONT></DIV>
<DIV><FONT face=Arial size=2>1. Read Dicom files&nbsp;(using ITK)</FONT></DIV>
<DIV><FONT face=Arial size=2>2. Apply image processing methods on each images 
(using ITK)</FONT></DIV>
<DIV><FONT face=Arial size=2>3.&nbsp;Apply segmentation process for surface 
rendering (using ITK)</FONT></DIV>
<DIV><FONT face=Arial size=2>4. Use the itkImageToVTKImageFilter to convert the 
images to the format recognized by VTK.</FONT></DIV>
<DIV><FONT face=Arial size=2>5. Apply volume rendering or surface 
rendering.</FONT></DIV>
<DIV><FONT face=Arial size=2>6. Make a render window that contains 4 different 
renderers, one renderer to display volume or surface rendering result, and the 
rest (3 renderers)&nbsp;are used to display the 3 desired slices. 
&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Here are&nbsp;the list of what I've done: 
</FONT></DIV>
<DIV><FONT face=Arial size=2>1. Try to open image file by ITK function and 
convert it to VTK format and display it with VTK. I tried this and succeed to 
open one image file as illustrated in the code below. </FONT></DIV>
<DIV><FONT face=Arial size=2>2.&nbsp;Convert medical3.cxx example to MFC based 
so I can add control button (slider, spinner, checkbox,etc). I succeed to do 
this although the speed is slower than its original version. The code I 
mentioned in my previous mail.</FONT></DIV>
<DIV><FONT face=Arial size=2>3. Modify the result where there are 4 vtkRenderer 
instead of one, so the 3D is displayed in one vtkRenderer, and the rest will 
displays the slices in axial, sagittal, coronal plane.&nbsp;The code of this 
module is illustrated below.&nbsp;The result is not like I expect since the 3 
renderer display the same image. I also add two button to navigate from one 
slice to another.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Here&nbsp; are my questions and the problems I 
have:</FONT></DIV>
<DIV><FONT face=Arial size=2>1. Is the step mention above are correct to achieve 
the goal I need?</FONT></DIV>
<DIV><FONT face=Arial size=2>2. Is it correct to apply image 
processing&nbsp;methods&nbsp;before it is feed in&nbsp;into the VTK or do with 
VTK functions is enough?&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>3. Based on the book, milist and&nbsp;the result of 
the trial I made, I make an assumption that to display the resliced images from 
a volume, it is used vtkImageActor instead of vtkImgeViewer. Is this 
correct?</FONT></DIV>
<DIV><FONT face=Arial size=2>4. I have a difficulties to find a good way how to 
reslice the volume and display it in 3 renderer, since these 3 renderers produce 
the same images, and&nbsp;I cannot navigate from one slice to another slice in 
each direction (sagittal,axial,coronal).&nbsp;Please&nbsp;show me what the 
mistakes I've done in the code?&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>5. As I mentioned above I have 4 renderer, lets say 
ren1,ren2,ren3,ren4. The ren1 is used&nbsp;for the 3D visualization, and the 
other are used to display the 3 resliced images.&nbsp;I want&nbsp;to change the 
default interaction mode of the vtkRenderWindowInteractor in ren2,ren3 and ren4 
by issuing ren2-&gt;interactiveOff(). This function run incorrectly 
since&nbsp;when I click the mouse on ren2 area it influence ren1 so the&nbsp;3D 
object in ren1 is moving.&nbsp;How to avoid this problem so 3D object 
is&nbsp;moving just by the interaction in ren1.&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thank you in advance. </FONT></DIV>
<DIV><FONT face=Arial size=2>Paulus</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>// THE CODE TO READ IMAGE AND CONVERT ITK TO&nbsp; 
VTK</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#include "itkImage.h"<BR>#include 
"itkImageFileReader.h"<BR>#include "itkImageFileReader.h"<BR>#include 
"vtkImageViewer.h"<BR>#include "vtkRenderWindowInteractor.h"<BR>#include 
"itkImageToVTKImageFilter.h"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><FONT face=Arial size=2>
<DIV><BR>int main( int argc, char ** argv )<BR>{<BR>&nbsp; typedef unsigned 
short&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PixelType;<BR>&nbsp; const&nbsp;&nbsp; 
unsigned int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dimension = 2;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; typedef itk::Image&lt; PixelType, Dimension &gt;&nbsp;&nbsp; 
ImageType;<BR>&nbsp; typedef itk::ImageFileReader&lt; ImageType 
&gt;&nbsp;&nbsp;&nbsp; ReaderType;<BR>&nbsp; typedef 
itk::ImageToVTKImageFilter&lt; ImageType &gt; ConnectorType;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; ReaderType::Pointer reader = ReaderType::New();<BR>&nbsp; 
ConnectorType::Pointer connector = ConnectorType::New();<BR>&nbsp; 
reader-&gt;SetFileName( argv[1] );<BR>&nbsp; //reader-&gt;Update();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; connector-&gt;SetInput(reader-&gt;GetOutput()); &nbsp;&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; vtkImageViewer *viewer=vtkImageViewer::New();<BR>&nbsp; 
vtkRenderWindowInteractor *renderWindowInteractor=vtkRenderWindowInteractor 
::New();<BR>&nbsp; viewer-&gt;SetupInteractor(renderWindowInteractor);<BR>&nbsp; 
viewer-&gt;SetInput(connector-&gt;GetOutput());<BR>&nbsp; 
viewer-&gt;Render();<BR>&nbsp; viewer-&gt;SetColorWindow(255);<BR>&nbsp; 
viewer-&gt;SetColorLevel(128);<BR>&nbsp; 
//renderWindowInteractor-&gt;Start();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; return 0;<BR>}<BR></DIV>
<DIV>// THE CODE TO READ QUARTER IMAGES, CREATE THE&nbsp;VOLUME AND DISPLAY THE 
3 RESLICE OF IT IN 3 DIFFERENT RENDERER</DIV>
<DIV>// MedicalSDIView.cpp : implementation of the CMedicalSDIView 
class<BR>//</DIV>
<DIV>&nbsp;</DIV>
<DIV>#include "stdafx.h"<BR>#include "MedicalSDI.h"</DIV>
<DIV>&nbsp;</DIV>
<DIV>#include "MedicalSDIDoc.h"<BR>#include "MedicalSDIView.h"</DIV>
<DIV>&nbsp;</DIV>
<DIV>#ifdef _DEBUG<BR>#define new DEBUG_NEW<BR>#undef THIS_FILE<BR>static char 
THIS_FILE[] = __FILE__;<BR>#endif</DIV>
<DIV>&nbsp;</DIV>
<DIV>/////////////////////////////////////////////////////////////////////////////<BR>// 
CMedicalSDIView</DIV>
<DIV>&nbsp;</DIV>
<DIV>IMPLEMENT_DYNCREATE(CMedicalSDIView, CFormView)</DIV>
<DIV>&nbsp;</DIV>
<DIV>BEGIN_MESSAGE_MAP(CMedicalSDIView, 
CFormView)<BR>&nbsp;//{{AFX_MSG_MAP(CMedicalSDIView)<BR>&nbsp;ON_WM_CREATE()<BR>&nbsp;ON_BN_CLICKED(IDC_BTNDOWN, 
OnBtndown)<BR>&nbsp;ON_BN_CLICKED(IDC_BTNUP, OnBtnup)<BR>&nbsp;&nbsp;&nbsp; 
//ON_WM_ERASEBKGND() <BR>&nbsp;//}}AFX_MSG_MAP<BR>END_MESSAGE_MAP()</DIV>
<DIV>&nbsp;</DIV>
<DIV>/////////////////////////////////////////////////////////////////////////////<BR>// 
CMedicalSDIView construction/destruction</DIV>
<DIV>&nbsp;</DIV>
<DIV>CMedicalSDIView::CMedicalSDIView()<BR>&nbsp;: 
CFormView(CMedicalSDIView::IDD)<BR>{<BR>&nbsp;//{{AFX_DATA_INIT(CMedicalSDIView)<BR>&nbsp;&nbsp;// 
NOTE: the ClassWizard will add member initialization 
here<BR>&nbsp;//}}AFX_DATA_INIT<BR>&nbsp;// TODO: add construction code 
here<BR>&nbsp; this-&gt;volumeRenderer&nbsp;&nbsp; = vtkRenderer::New();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; this-&gt;renWin = vtkRenderWindow::New();<BR>&nbsp; this-&gt;iren = 
vtkRenderWindowInteractor::New();<BR>&nbsp; this-&gt;v16 = 
vtkVolume16Reader::New();<BR>&nbsp; this-&gt;skinExtractor = 
vtkContourFilter::New();<BR>&nbsp; this-&gt;skinNormals = 
vtkPolyDataNormals::New();<BR>&nbsp; this-&gt;skinStripper = 
vtkStripper::New();<BR>&nbsp; this-&gt;skinMapper = 
vtkPolyDataMapper::New();<BR>&nbsp; this-&gt;skin = vtkActor::New();<BR>&nbsp; 
this-&gt;boneExtractor = vtkContourFilter::New();<BR>&nbsp; this-&gt;boneNormals 
= vtkPolyDataNormals::New();<BR>&nbsp; this-&gt;boneStripper = 
vtkStripper::New();<BR>&nbsp; this-&gt;boneMapper = 
vtkPolyDataMapper::New();<BR>&nbsp; this-&gt;bone = vtkActor::New();<BR>&nbsp; 
this-&gt;outlineData = vtkOutlineFilter::New();<BR>&nbsp; this-&gt;mapOutline = 
vtkPolyDataMapper::New();<BR>&nbsp; this-&gt;outline = 
vtkActor::New();<BR>&nbsp; this-&gt;bwLut = vtkLookupTable::New();<BR>&nbsp; 
this-&gt;hueLut = vtkLookupTable::New();<BR>&nbsp; this-&gt;satLut = 
vtkLookupTable::New();<BR>&nbsp; this-&gt;saggitalColors = 
vtkImageMapToColors::New();<BR>&nbsp; this-&gt;saggital = 
vtkImageActor::New();<BR>&nbsp; this-&gt;axialColors = 
vtkImageMapToColors::New();<BR>&nbsp; this-&gt;axial = 
vtkImageActor::New();<BR>&nbsp; this-&gt;coronalColors = 
vtkImageMapToColors::New();<BR>&nbsp; this-&gt;coronal = 
vtkImageActor::New();<BR>&nbsp; this-&gt;aCamera = vtkCamera::New();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; this-&gt;coronalShiftScale=vtkImageShiftScale::New(); <BR>&nbsp; 
this-&gt;coronalRenderer&nbsp; = vtkRenderer::New();<BR>&nbsp; 
this-&gt;coronalImgActor = vtkImageActor::New();<BR>&nbsp; 
this-&gt;coronalTransform = vtkTransform::New();<BR>&nbsp; this-&gt;coronalSlice 
= vtkImageReslice::New();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; this-&gt;sagittalShiftScale=vtkImageShiftScale::New(); <BR>&nbsp; 
this-&gt;sagittalRenderer = vtkRenderer::New();<BR>&nbsp; 
this-&gt;sagittalImgActor = vtkImageActor::New();<BR>&nbsp; 
this-&gt;sagittalTransform = vtkTransform::New();<BR>&nbsp; 
this-&gt;sagittalSlice = vtkImageReslice::New();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; this-&gt;axialShiftScale=vtkImageShiftScale::New(); <BR>&nbsp; 
this-&gt;axialRenderer&nbsp;&nbsp;&nbsp; = vtkRenderer::New();<BR>&nbsp; 
this-&gt;axialImgActor = vtkImageActor::New();<BR>&nbsp; this-&gt;axialTransform 
= vtkTransform::New();<BR>&nbsp; this-&gt;axialSlice = 
vtkImageReslice::New();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; this-&gt;shiftScale=vtkImageShiftScale::New(); <BR>&nbsp; 
coronalDisp&nbsp; = 0.0;<BR>&nbsp; sagittalDisp = 0.0;<BR>&nbsp; 
axialDisp&nbsp;&nbsp;&nbsp; = 0.0;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>CMedicalSDIView::~CMedicalSDIView()<BR>{<BR>&nbsp; 
v16-&gt;Delete();<BR>&nbsp; skinExtractor-&gt;Delete();<BR>&nbsp; 
skinNormals-&gt;Delete();<BR>&nbsp; skinStripper-&gt;Delete();<BR>&nbsp; 
skinMapper-&gt;Delete();<BR>&nbsp; skin-&gt;Delete();<BR>&nbsp; 
boneExtractor-&gt;Delete();<BR>&nbsp; boneNormals-&gt;Delete();<BR>&nbsp; 
boneStripper-&gt;Delete();<BR>&nbsp; boneMapper-&gt;Delete();<BR>&nbsp; 
bone-&gt;Delete();<BR>&nbsp; outlineData-&gt;Delete();<BR>&nbsp; 
mapOutline-&gt;Delete();<BR>&nbsp; outline-&gt;Delete();<BR>&nbsp; 
bwLut-&gt;Delete();<BR>&nbsp; hueLut-&gt;Delete();<BR>&nbsp; 
satLut-&gt;Delete();<BR>&nbsp; saggitalColors-&gt;Delete();<BR>&nbsp; 
saggital-&gt;Delete();<BR>&nbsp; axialColors-&gt;Delete();<BR>&nbsp; 
axial-&gt;Delete();<BR>&nbsp; coronalColors-&gt;Delete();<BR>&nbsp; 
coronal-&gt;Delete();<BR>&nbsp; aCamera-&gt;Delete();<BR>&nbsp; 
renWin-&gt;Delete();<BR>&nbsp; iren-&gt;Delete();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; volumeRenderer-&gt;Delete();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; coronalRenderer-&gt;Delete();<BR>&nbsp; 
coronalSlice-&gt;Delete();<BR>&nbsp; coronalTransform-&gt;Delete();<BR>&nbsp; 
coronalImgActor-&gt;Delete();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; sagittalRenderer-&gt;Delete();<BR>&nbsp; 
sagittalSlice-&gt;Delete();<BR>&nbsp; sagittalTransform-&gt;Delete();<BR>&nbsp; 
sagittalImgActor-&gt;Delete();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; axialRenderer-&gt;Delete();<BR>&nbsp; 
axialSlice-&gt;Delete();<BR>&nbsp; axialTransform-&gt;Delete();<BR>&nbsp; 
axialImgActor-&gt;Delete();</DIV>
<DIV>&nbsp;</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>void CMedicalSDIView::DoDataExchange(CDataExchange* 
pDX)<BR>{<BR>&nbsp;CFormView::DoDataExchange(pDX);<BR>&nbsp;//{{AFX_DATA_MAP(CMedicalSDIView)<BR>&nbsp;&nbsp;// 
NOTE: the ClassWizard will add DDX and DDV calls 
here<BR>&nbsp;//}}AFX_DATA_MAP<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>BOOL CMedicalSDIView::PreCreateWindow(CREATESTRUCT&amp; 
cs)<BR>{<BR>&nbsp;// TODO: Modify the Window class or styles here by 
modifying<BR>&nbsp;//&nbsp; the CREATESTRUCT cs</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;return CFormView::PreCreateWindow(cs);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>void 
CMedicalSDIView::OnInitialUpdate()<BR>{<BR>&nbsp;CFormView::OnInitialUpdate();<BR>&nbsp;GetParentFrame()-&gt;RecalcLayout();<BR>&nbsp;ResizeParentToFit();</DIV>
<DIV>&nbsp;</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>/////////////////////////////////////////////////////////////////////////////<BR>// 
CMedicalSDIView diagnostics</DIV>
<DIV>&nbsp;</DIV>
<DIV>#ifdef _DEBUG<BR>void CMedicalSDIView::AssertValid() 
const<BR>{<BR>&nbsp;CFormView::AssertValid();<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>void CMedicalSDIView::Dump(CDumpContext&amp; dc) 
const<BR>{<BR>&nbsp;CFormView::Dump(dc);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>CMedicalSDIDoc* CMedicalSDIView::GetDocument() // non-debug version is 
inline<BR>{<BR>&nbsp;ASSERT(m_pDocument-&gt;IsKindOf(RUNTIME_CLASS(CMedicalSDIDoc)));<BR>&nbsp;return 
(CMedicalSDIDoc*)m_pDocument;<BR>}<BR>#endif //_DEBUG</DIV>
<DIV>&nbsp;</DIV>
<DIV>/////////////////////////////////////////////////////////////////////////////<BR>// 
CMedicalSDIView message handlers</DIV>
<DIV>&nbsp;</DIV>
<DIV>void CMedicalSDIView::Pipeline()<BR>{<BR>&nbsp;&nbsp;&nbsp; 
renWin-&gt;AddRenderer(volumeRenderer);<BR>&nbsp;&nbsp;&nbsp; 
renWin-&gt;AddRenderer(coronalRenderer);<BR>&nbsp;&nbsp;&nbsp; 
renWin-&gt;AddRenderer(axialRenderer);<BR>&nbsp;&nbsp;&nbsp; 
renWin-&gt;AddRenderer(sagittalRenderer);<BR>&nbsp;&nbsp;&nbsp; iren&nbsp; 
-&gt;SetRenderWindow(renWin);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; v16-&gt;SetDataDimensions(64,64);<BR>&nbsp;&nbsp;&nbsp; 
v16-&gt;SetDataByteOrderToLittleEndian();<BR>&nbsp;&nbsp;&nbsp; 
v16-&gt;SetFilePrefix ("..\\data\\headsq\\quarter");<BR>&nbsp;&nbsp;&nbsp; 
v16-&gt;SetImageRange(1, 93);<BR>&nbsp;&nbsp;&nbsp; v16-&gt;SetDataSpacing (3.2, 
3.2, 1.5);</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp;skinExtractor-&gt;SetInput( 
v16-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; skinExtractor-&gt;SetValue(0, 
500);<BR>&nbsp;&nbsp;&nbsp; 
skinNormals-&gt;SetInput(skinExtractor-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
skinNormals-&gt;SetFeatureAngle(60.0);<BR>&nbsp;&nbsp;&nbsp; 
skinStripper-&gt;SetInput(skinNormals-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
skinMapper-&gt;SetInput(skinStripper-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
skinMapper-&gt;ScalarVisibilityOff();<BR>&nbsp;&nbsp;&nbsp; 
skin-&gt;SetMapper(skinMapper);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; skin-&gt;GetProperty()-&gt;SetDiffuseColor(1, 49, 
25);<BR>&nbsp;&nbsp;&nbsp; 
skin-&gt;GetProperty()-&gt;SetSpecular(.3);<BR>&nbsp;&nbsp;&nbsp; 
skin-&gt;GetProperty()-&gt;SetSpecularPower(20);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; boneExtractor-&gt;SetInput((vtkDataSet *) 
v16-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; boneExtractor-&gt;SetValue(0, 
1150);<BR>&nbsp;&nbsp;&nbsp; 
boneNormals-&gt;SetInput(boneExtractor-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
boneNormals-&gt;SetFeatureAngle(60.0);<BR>&nbsp;&nbsp;&nbsp; 
boneStripper-&gt;SetInput(boneNormals-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
boneMapper-&gt;SetInput(boneStripper-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
boneMapper-&gt;ScalarVisibilityOff();<BR>&nbsp;&nbsp;&nbsp; 
bone-&gt;SetMapper(boneMapper);<BR>&nbsp;&nbsp;&nbsp; 
bone-&gt;GetProperty()-&gt;SetDiffuseColor(1, 1, .9412);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; outlineData-&gt;SetInput((vtkDataSet *) 
v16-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
mapOutline-&gt;SetInput(outlineData-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
outline-&gt;SetMapper(mapOutline);<BR>&nbsp;&nbsp;&nbsp; 
outline-&gt;GetProperty()-&gt;SetColor(0,0,0);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; bwLut-&gt;SetTableRange (0, 2000);<BR>&nbsp;&nbsp;&nbsp; 
bwLut-&gt;SetSaturationRange (0, 0);<BR>&nbsp;&nbsp;&nbsp; bwLut-&gt;SetHueRange 
(0, 0);<BR>&nbsp;&nbsp;&nbsp; bwLut-&gt;SetValueRange (0, 1);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; hueLut-&gt;SetTableRange (0, 
2000);<BR>&nbsp;&nbsp;&nbsp; hueLut-&gt;SetHueRange (0, 
1);<BR>&nbsp;&nbsp;&nbsp; hueLut-&gt;SetSaturationRange (1, 
1);<BR>&nbsp;&nbsp;&nbsp; hueLut-&gt;SetValueRange (1, 1);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; satLut-&gt;SetTableRange (0, 
2000);<BR>&nbsp;&nbsp;&nbsp; satLut-&gt;SetHueRange (.6, 
6);<BR>&nbsp;&nbsp;&nbsp; satLut-&gt;SetSaturationRange (0, 
1);<BR>&nbsp;&nbsp;&nbsp; satLut-&gt;SetValueRange (1, 1);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 
saggitalColors-&gt;SetInput(v16-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
saggitalColors-&gt;SetLookupTable(bwLut);<BR>&nbsp;&nbsp;&nbsp; 
saggital-&gt;SetInput(saggitalColors-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
saggital-&gt;SetDisplayExtent(32,32, 0,63, 0,92);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 
axialColors-&gt;SetInput(v16-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
axialColors-&gt;SetLookupTable(hueLut);<BR>&nbsp;&nbsp;&nbsp; 
axial-&gt;SetInput(axialColors-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
axial-&gt;SetDisplayExtent(0,63, 0,63, 46,46);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 
coronalColors-&gt;SetInput(v16-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
coronalColors-&gt;SetLookupTable(satLut);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 
coronal-&gt;SetInput(coronalColors-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; 
coronal-&gt;SetDisplayExtent(0,63, 32,32, 0,92);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; aCamera-&gt;SetViewUp (0, 0, -1);<BR>&nbsp;&nbsp;&nbsp; 
aCamera-&gt;SetPosition (0, 1, 0);<BR>&nbsp;&nbsp;&nbsp; 
aCamera-&gt;SetFocalPoint (0, 0, 0);<BR>&nbsp;&nbsp;&nbsp; 
aCamera-&gt;ComputeViewPlaneNormal();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 
volumeRenderer-&gt;AddActor(outline);<BR>&nbsp;&nbsp;&nbsp; 
volumeRenderer-&gt;AddActor(saggital);<BR>&nbsp;&nbsp;&nbsp; 
volumeRenderer-&gt;AddActor(axial);<BR>&nbsp;&nbsp;&nbsp; 
volumeRenderer-&gt;AddActor(coronal);<BR>&nbsp;&nbsp;&nbsp; 
volumeRenderer-&gt;AddActor(axial);<BR>&nbsp;&nbsp;&nbsp; 
volumeRenderer-&gt;AddActor(coronal);<BR>&nbsp;&nbsp;&nbsp; 
volumeRenderer-&gt;AddActor(skin);<BR>&nbsp;&nbsp;&nbsp; 
volumeRenderer-&gt;AddActor(bone);</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp; coronalTransform -&gt;Translate(0,coronalDisp,0);<BR>&nbsp; 
sagittalTransform-&gt;Translate(sagittalDisp,0,0);<BR>&nbsp; 
axialTransform&nbsp;&nbsp; -&gt;Translate(0,0,axialDisp);<BR>// 
coronal<BR>&nbsp; coronalSlice-&gt;SetInput(v16-&gt;GetOutput());<BR>&nbsp; 
coronalSlice-&gt;SetResliceTransform(coronalTransform);<BR>&nbsp; 
coronalSlice-&gt;InterpolateOn();<BR>&nbsp; 
coronalSlice-&gt;SetInterpolationModeToCubic();<BR>&nbsp; 
coronalSlice-&gt;SetBackgroundLevel(1023);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; 
coronalShiftScale-&gt;SetInput(coronalSlice-&gt;GetOutput());<BR>&nbsp; 
coronalShiftScale-&gt;SetShift(0);<BR>&nbsp; 
coronalShiftScale-&gt;SetScale(0.07);<BR>&nbsp; 
coronalShiftScale-&gt;SetOutputScalarTypeToUnsignedChar();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; 
coronalImgActor-&gt;SetInput(coronalShiftScale-&gt;GetOutput());<BR>&nbsp; 
coronalRenderer-&gt;AddActor(coronalImgActor);<BR>&nbsp; 
coronalRenderer-&gt;InteractiveOff();<BR>// sagital<BR>&nbsp; 
sagittalSlice-&gt;SetInput(v16-&gt;GetOutput());<BR>&nbsp; 
sagittalSlice-&gt;SetResliceTransform(sagittalTransform);<BR>&nbsp; 
sagittalSlice-&gt;InterpolateOn();<BR>&nbsp; 
sagittalSlice-&gt;SetInterpolationModeToCubic();<BR>&nbsp; 
sagittalSlice-&gt;SetBackgroundLevel(1023);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; 
sagittalShiftScale-&gt;SetInput(sagittalSlice-&gt;GetOutput());<BR>&nbsp; 
sagittalShiftScale-&gt;SetShift(0);<BR>&nbsp; 
sagittalShiftScale-&gt;SetScale(0.07);<BR>&nbsp; 
sagittalShiftScale-&gt;SetOutputScalarTypeToUnsignedChar();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; 
sagittalImgActor-&gt;SetInput(sagittalShiftScale-&gt;GetOutput());<BR>&nbsp; 
sagittalRenderer-&gt;AddActor(sagittalImgActor);<BR>&nbsp; 
sagittalRenderer-&gt;InteractiveOff();<BR>// axial<BR>&nbsp; 
axialSlice-&gt;SetInput(v16-&gt;GetOutput());<BR>&nbsp; 
axialSlice-&gt;SetResliceTransform(axialTransform);<BR>&nbsp; 
axialSlice-&gt;InterpolateOn();<BR>&nbsp; 
axialSlice-&gt;SetInterpolationModeToCubic();<BR>&nbsp; 
axialSlice-&gt;SetBackgroundLevel(1023);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; <BR>&nbsp; 
axialShiftScale-&gt;SetInput(axialSlice-&gt;GetOutput());<BR>&nbsp; 
axialShiftScale-&gt;SetShift(0);<BR>&nbsp; 
axialShiftScale-&gt;SetScale(0.07);<BR>&nbsp; 
axialShiftScale-&gt;SetOutputScalarTypeToUnsignedChar();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; 
axialImgActor-&gt;SetInput(axialShiftScale-&gt;GetOutput());<BR>&nbsp; 
axialRenderer-&gt;AddActor(axialImgActor);<BR>&nbsp; 
axialRenderer-&gt;InteractiveOff();<BR>&nbsp; // Turn off bone for this 
example.<BR>&nbsp; bone-&gt;VisibilityOff();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; // Set skin to semi-transparent.<BR>&nbsp; 
skin-&gt;GetProperty()-&gt;SetOpacity(0.5);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; // An initial camera view is created.&nbsp; The Dolly() method moves 
<BR>&nbsp; // the camera towards the FocalPoint, thereby enlarging the 
image.<BR>&nbsp; volumeRenderer-&gt;SetActiveCamera(aCamera);<BR>&nbsp; 
volumeRenderer-&gt;ResetCamera ();<BR>&nbsp; aCamera-&gt;Dolly(1.5);</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp; // Set a background color for the renderer and set the size of 
the<BR>&nbsp; // render window (expressed in pixels).<BR>&nbsp; 
volumeRenderer-&gt;SetBackground(1,1,1);<BR>&nbsp; 
//renWin-&gt;SetSize(512,512);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; // Note that when camera movement occurs (as it does in the 
Dolly()<BR>&nbsp; // method), the clipping planes often need adjusting. Clipping 
planes<BR>&nbsp; // consist of two planes: near and far along the view 
direction. The <BR>&nbsp; // near plane clips out objects in front of the plane; 
the far plane<BR>&nbsp; // clips out objects behind the plane. This way only 
what is drawn<BR>&nbsp; // between the planes is actually rendered.<BR>&nbsp; 
volumeRenderer-&gt;ResetCameraClippingRange ();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; // interact with data<BR>&nbsp; //iren-&gt;Initialize();<BR>&nbsp; 
//iren-&gt;Start(); </DIV>
<DIV>&nbsp;</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>void CMedicalSDIView::OnDraw(CDC* pDC) <BR>{<BR>&nbsp; CPaintDC dc(this); 
// device context for painting<BR>&nbsp;<BR>&nbsp;// TODO: Add your message 
handler code here<BR>&nbsp;<BR>&nbsp; CMedicalSDIDoc* pDoc = 
GetDocument();<BR>&nbsp; ASSERT_VALID(pDoc);<BR>&nbsp;// TODO: Add your 
specialized code here and/or call the base class<BR>&nbsp; if ( 
!this-&gt;iren-&gt;GetInitialized() )<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; CRect 
rect;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; this-&gt;GetClientRect(&amp;rect);<BR>&nbsp;&nbsp;&nbsp; 
this-&gt;iren-&gt;Initialize();<BR>&nbsp;&nbsp;&nbsp; 
this-&gt;renWin-&gt;SetPosition(250,0);<BR>&nbsp;&nbsp;&nbsp; 
//this-&gt;renWin-&gt;SetSize(rect.right-rect.left-100,rect.bottom-rect.top-100);<BR>&nbsp;&nbsp;&nbsp; 
this-&gt;renWin-&gt;SetSize(1024,1024);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; this-&gt;volumeRenderer-&gt;ResetCamera();<BR>&nbsp; 
}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; // Invoke the pipeline<BR>&nbsp; Pipeline();<BR>&nbsp; 
this-&gt;renWin-&gt;Render();</DIV>
<DIV>&nbsp;</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>int CMedicalSDIView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
<BR>{<BR>&nbsp;if (CFormView::OnCreate(lpCreateStruct) == 
-1)<BR>&nbsp;&nbsp;return -1;<BR>&nbsp;<BR>&nbsp;// TODO: Add your specialized 
creation code here<BR>&nbsp; 
this-&gt;volumeRenderer-&gt;SetViewport(0.0,0.0,0.5,0.5);<BR>&nbsp; 
this-&gt;volumeRenderer-&gt;SetBackground(0.2,0.3,0.3); <BR>&nbsp; 
this-&gt;renWin-&gt;AddRenderer(this-&gt;volumeRenderer);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; 
this-&gt;sagittalRenderer-&gt;SetViewport(0.5,0.0,1.0,0.5);<BR>&nbsp; 
this-&gt;sagittalRenderer-&gt;SetBackground(0.2,0.3,0.3); <BR>&nbsp; 
this-&gt;renWin-&gt;AddRenderer(this-&gt;sagittalRenderer);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; this-&gt;axialRenderer-&gt;SetViewport(0.0,0.5,0.5,1.0);<BR>&nbsp; 
this-&gt;axialRenderer-&gt;SetBackground(0.2,0.3,0.3); <BR>&nbsp; 
this-&gt;renWin-&gt;AddRenderer(this-&gt;axialRenderer);<BR>&nbsp; <BR>&nbsp; 
this-&gt;coronalRenderer-&gt;SetViewport(0.5,0.5,1.0,1.0);<BR>&nbsp; 
this-&gt;coronalRenderer-&gt;SetBackground(0.2,0.3,0.3); <BR>&nbsp; 
this-&gt;renWin-&gt;AddRenderer(this-&gt;coronalRenderer);<BR>&nbsp; <BR>&nbsp; 
// setup the parent window<BR>&nbsp; 
this-&gt;renWin-&gt;SetParentId(this-&gt;m_hWnd);<BR>&nbsp; 
this-&gt;iren-&gt;SetRenderWindow(this-&gt;renWin);<BR>&nbsp; <BR>&nbsp; return 
0;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>void CMedicalSDIView::OnBtndown() <BR>{<BR>&nbsp;// TODO: Add your control 
notification handler code here<BR>&nbsp;coronalDisp&nbsp; = coronalDisp&nbsp; - 
0.1;<BR>&nbsp;sagittalDisp = sagittalDisp - 
0.1;<BR>&nbsp;axialDisp&nbsp;&nbsp;&nbsp; = axialDisp&nbsp;&nbsp;&nbsp; - 
0.1;<BR>&nbsp;InvalidateRect(NULL,FALSE);<BR>&nbsp;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>void CMedicalSDIView::OnBtnup() <BR>{<BR>&nbsp;// TODO: Add your control 
notification handler code here<BR>&nbsp;coronalDisp&nbsp; = coronalDisp&nbsp; + 
0.1;<BR>&nbsp;sagittalDisp = sagittalDisp + 
0.1;<BR>&nbsp;axialDisp&nbsp;&nbsp;&nbsp; = axialDisp&nbsp;&nbsp;&nbsp; + 
0.1;<BR>&nbsp;InvalidateRect(NULL,FALSE);<BR>&nbsp;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></FONT></BODY></HTML>