[vtkusers] Help
Jyothilekshmi
lekshmijyothi at cdactvm.in
Mon May 30 23:31:59 EDT 2011
I have to read 20 dicom images from a folder.For that I use the code as
follows
#include "stdafx.h"
#include "vtkDICOMImageReader.h"
#include "vtkImageViewer.h"
//#include <conio.h>
int main()
{
vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
reader->SetDirectoryName("D:/Sristi/SRISTI/Images/MCH_IMAGES/DICOM/11040811/
39580000/test1");
vtkImageViewer *viewer1 = vtkImageViewer::New();
viewer1->SetInput(reader->GetOutput());
int VolData_Images = viewer1->GetWholeZMax();
for (int j=0;j<=100;j++)
{
for (int i=0;i<=VolData_Images;i++)
{
viewer1->SetZSlice(i);
viewer1->SetColorWindow(500);
viewer1->SetColorLevel(128);
viewer1->SetSize(300,300);
viewer1->Render();
//_getch();
}
}
reader->Delete();
viewer1->Delete();
return EXIT_SUCCESS;
}
First time this gives the eror but now gave an error at the execution
Viewer1->Render();
Is there any problem in the code .Please help me
Thanks in advance
Jyothi
______________________________________
Scanned and protected by Email scanner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110531/36f300c0/attachment.htm>
More information about the vtkusers
mailing list