[vtkusers] help to read DICOM image
J.S.Wijnhout at lumc.nl
J.S.Wijnhout at lumc.nl
Wed Sep 19 02:20:29 EDT 2007
You have to call reader->Update (), otherwise nothing is actually read.
best,
Jeroen
________________________________
From: vtkusers-bounces+j.s.wijnhout=lumc.nl at vtk.org
[mailto:vtkusers-bounces+j.s.wijnhout=lumc.nl at vtk.org] On Behalf Of John
Doe
Sent: Tuesday, September 18, 2007 6:49 PM
To: vtkusers at vtk.org
Subject: [vtkusers] help to read DICOM image
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!
<http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yaho
o_panel_invite.asp?a=7>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070919/f7b1f495/attachment.htm>
More information about the vtkusers
mailing list