[vtkusers] help to read DICOM image

John Doe vtkuser at yahoo.com
Tue Sep 18 12:49:03 EDT 2007


hello all, i need to read the information in DICOM images such as modality, patient sex, etc..

i have tried to use vtkMedicalImageReader2 and vtkMedicalImageProperties, but still failed to get what i need..

void main()
{
    vtkMedicalImageReader2 *reader=vtkMedicalImageReader2::New();
    reader->SetFileName("image.dcm");
    printf("%s",reader->GetMedicalImageProperties()->GetPatientSex());
    printf("%s",reader->GetMedicalImageProperties()->GetPatientAge());
    printf("%s",reader->GetMedicalImageProperties()->GetModality());
}

WHY all of the functions getpatientage, getpatientsex, etc. all return NULL value..
can someone help me with this? btw, i have tried to use vtkDICOMImageReader too, but i can only get the patientname with that class since vtkDICOMImageReader just have GetPatientName() function..
And I guarantee that my sample DICOM images are not broken..


Thanx in advance..

Regards, John..


       
---------------------------------
Shape Yahoo! in your own image.  Join our Network Research Panel today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070918/3b628631/attachment.htm>


More information about the vtkusers mailing list