[vtkusers] DICOM images

Abhi Rampal a_rampal at hotmail.com
Mon Jun 6 13:32:11 EDT 2005


Dear VtkUsers,

Currently I am reading a set of dicom images. Using vtkDicomImageReader I am 
able to read some dicom images completely and others pop up only one image 
in a series of 44 images. The error it pops up is: "No DICOM magic number 
found, but file appears to be DICOM. Proceeding without caution". Does 
anyone have a solution to this? The code used is:

vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();

    viewer->SetInput(reader->GetOutput());
    reader->SetDirectoryName("C:\\vtk\\Test");
    reader->Update();

    int VolData_Images = viewer->GetWholeZMax ();

     for (int i=0;i<=VolData_Images;i++)
     {
      viewer->SetupInteractor(iren);
	  viewer->SetZSlice(i);
	  viewer->SetColorWindow(400);
      viewer->SetColorLevel(128);
	  viewer->Render();

    }


	 iren->Start();
	reader->Delete();
    viewer->Delete();

Thank you and with kind regards,

Abhi





More information about the vtkusers mailing list