<!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> </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> </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 :) ) the VTK part if you think it doesn't
appropriate to mention here.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </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. 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. For these purposes I will combine VTK and ITK since as far
as I know these two brother is suitable for these tasks. 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 (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. Apply segmentation process (using ITK) on
each 2D images or in a 3D volume. The result of this 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) are used to display the 3 desired slices.
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here are 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. Convert medical3.cxx example 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. 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> </DIV>
<DIV><FONT face=Arial size=2>Here 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 methods of ITK,
then feed the result to the VTK. Is this correct? Or do with VTK functions
is enough? </FONT></DIV>
<DIV><FONT face=Arial size=2>3. Based on the book, milist and 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 I cannot navigate from one slice to another slice in
each direction (sagittal,axial,coronal). Please show me what the
mistakes I've done in the code? </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 for the 3D visualization, and the
other are used to display the 3 resliced images. I want to change the
default interaction mode of the vtkRenderWindowInteractor in ren2,ren3 and ren4
by issuing ren2->interactiveOff(). This function run incorrectly
since when I click the mouse on ren2 area it influence ren1 so the 3D
object in ren1 is moving. How to avoid this problem so 3D object
is moving just by the interaction in ren1. </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. </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>// THE CODE TO READ IMAGE AND CONVERT ITK TO
VTK</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </DIV><FONT face=Arial size=2>
<DIV><BR>int main( int argc, char ** argv )<BR>{<BR> typedef unsigned
short PixelType;<BR> const
unsigned int Dimension = 2;</DIV>
<DIV> </DIV>
<DIV> typedef itk::Image< PixelType, Dimension >
ImageType;<BR> typedef itk::ImageFileReader< ImageType
> ReaderType;<BR> typedef
itk::ImageToVTKImageFilter< ImageType > ConnectorType;</DIV>
<DIV> </DIV>
<DIV> ReaderType::Pointer reader = ReaderType::New();<BR>
ConnectorType::Pointer connector = ConnectorType::New();<BR>
reader->SetFileName( argv[1] );<BR> //reader->Update();</DIV>
<DIV> </DIV>
<DIV> connector->SetInput(reader->GetOutput()); </DIV>
<DIV> </DIV>
<DIV> vtkImageViewer *viewer=vtkImageViewer::New();<BR>
vtkRenderWindowInteractor *renderWindowInteractor=vtkRenderWindowInteractor
::New();<BR> viewer->SetupInteractor(renderWindowInteractor);<BR>
viewer->SetInput(connector->GetOutput());<BR>
viewer->Render();<BR> viewer->SetColorWindow(255);<BR>
viewer->SetColorLevel(128);<BR>
//renderWindowInteractor->Start();</DIV>
<DIV> </DIV>
<DIV> return 0;<BR>}<BR></DIV>
<DIV> </DIV></FONT></FONT></DIV></BODY></HTML>