<!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>
<DIV><FONT face=Arial size=2>Dear Luis, vtk users and itk users</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>Luis, thank you for your great guidance in your reply of my previous mail. 
I hope you still have enough power to answer my another questions :-)</DIV>
<DIV>&nbsp;</DIV>
<DIV>I sent this mail below to the vtk mailing list but there is no reply yet, 
so I compile it again and send it to this mailing list. </DIV>
<DIV>Please ignore (forgive me :)&nbsp; ) the VTK part if you think it doesn't 
appropriate to mention here.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&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 ITK and VTK.&nbsp; Hope you can 
still enough time to help me to answer my questions. </FONT></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.&nbsp; I develop the 
application with MS VC (MFC based). 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 2D images 
(using ITK). I hope there are several methods work on 3D volume directly 
also.</FONT></DIV>
<DIV><FONT face=Arial size=2>3.&nbsp;Apply segmentation process (using ITK) on 
each 2D images or in a 3D volume. The result of this&nbsp;step feed to surface 
rendering step.</FONT></DIV>
<DIV><FONT face=Arial size=2>4. Use the itkImageToVTKImageFilter to convert the 
2D images or 3D volume 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&nbsp;of VTK 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. </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 result is not 
like what 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. Apply image processing&nbsp;methods&nbsp;of ITK, 
then feed the result&nbsp;to the VTK. Is this correct? 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>6.In the dialog module that contains VTK and ITK part, sometimes unexpected 
image (image from the previous running also) appears when the dialog window is 
displayed. The image should appears when I push the button. This is not happend 
in a dialog module that contains only VTK code. Is this because I didn't pay 
attention to the Smart Pointer or there was a mistake on my code.&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>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>&nbsp;</DIV></FONT></FONT></DIV></BODY></HTML>