John Doe
2007-09-18 16:49:03 UTC
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!
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!