<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I've written the Dicom class<br><br>class Dicom<br>{<br>private:<br> vtkDICOMImageReader *reader;<br> vtkRenderWindowInteractor *iren;<br> vtkImageViewer *viewer;<br> int DataImages;<br><br> void releaseVtkObjects()<br> {<br> reader->Delete();<br> viewer->Delete();<br> iren->Delete();<br> }<br><br><br>public:<br> Dicom()<br> {<br> reader = vtkDICOMImageReader::New();<br> viewer = vtkImageViewer::New();<br> iren = vtkRenderWindowInteractor::New();<br>
}<br><br> void ReadDICOMFolder(string DICOMFolder)<br> {<br> viewer->SetInput(reader->GetOutput());<br> reader->SetDirectoryName(DICOMFolder.c_str());<br> reader->Update();<br><br> DataImages = viewer->GetWholeZMax();<br><br> for(int i = 0; i < DataImages; i++)<br> {<br> viewer->SetZSlice(i);<br> viewer->GetRenderer()->ResetCameraClippingRange();<br> viewer->SetColorWindow(400);<br> viewer->SetColorLevel(128);<br><br>
viewer->Render();<br> }<br><br> releaseVtkObjects();<br> }<br><br> void ReadDICOMImage(string DICOMImage)<br> {<br> viewer->SetInput(reader->GetOutput());<br> reader->SetFileName(DICOMImage.c_str());<br> reader->Update();<br><br> viewer->Render();<br><br> viewer->SetupInteractor(iren);<br> iren->Initialize();<br> iren->Start();<br><br> releaseVtkObjects();<br> }<br>};<br><br>When I'm calling the ReadDICOMFolder method from main ;<br><br>Dicom *dicomObj =
new Dicom();<br>dicomObj->ReadDICOMFolder(DICOMPath.c_str());<br><br>it reads the dicom files, and shows very fast the slices to the screen. How can i show it for example, 25 slice per second ?<br><br>Chasan KIOUTSOUKMOUSTAFA</td></tr></table><br>