[vtkusers] 25 Slice per second
Chasan KIOUTSOUKMOUSTAFA
chasank at yahoo.com
Thu Aug 19 07:57:01 EDT 2010
I've written the Dicom class
class Dicom
{
private:
vtkDICOMImageReader *reader;
vtkRenderWindowInteractor *iren;
vtkImageViewer *viewer;
int DataImages;
void releaseVtkObjects()
{
reader->Delete();
viewer->Delete();
iren->Delete();
}
public:
Dicom()
{
reader = vtkDICOMImageReader::New();
viewer = vtkImageViewer::New();
iren = vtkRenderWindowInteractor::New();
}
void ReadDICOMFolder(string DICOMFolder)
{
viewer->SetInput(reader->GetOutput());
reader->SetDirectoryName(DICOMFolder.c_str());
reader->Update();
DataImages = viewer->GetWholeZMax();
for(int i = 0; i < DataImages; i++)
{
viewer->SetZSlice(i);
viewer->GetRenderer()->ResetCameraClippingRange();
viewer->SetColorWindow(400);
viewer->SetColorLevel(128);
viewer->Render();
}
releaseVtkObjects();
}
void ReadDICOMImage(string DICOMImage)
{
viewer->SetInput(reader->GetOutput());
reader->SetFileName(DICOMImage.c_str());
reader->Update();
viewer->Render();
viewer->SetupInteractor(iren);
iren->Initialize();
iren->Start();
releaseVtkObjects();
}
};
When I'm calling the ReadDICOMFolder method from main ;
Dicom *dicomObj = new Dicom();
dicomObj->ReadDICOMFolder(DICOMPath.c_str());
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 ?
Chasan KIOUTSOUKMOUSTAFA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100819/3803ec47/attachment.htm>
More information about the vtkusers
mailing list