[vtkusers] Dicom Header File

José M. Rodriguez Bacallao jmrbcu at gmail.com
Tue Mar 20 08:46:28 EDT 2012


why don't you just use the vtkGDCMImageReader from gdcm project, it's
easy to use and has all the features you are looking for!!!

for example (code in python, but you could easy read it and write your
own in C++)

----------------------------------------------------------------------------------------------------
import vtkgdcm


reader = vtkGDCmImageReader()
reader.SetFileName('/path/to/file.dcm')
reader.Update()

image_properties = reader.GetMedicalImageProperties()
print image_properties.GetPatientName()
----------------------------------------------------------------------------------------------------


On Mon, Mar 19, 2012 at 4:33 PM, Hellice <saouli-abdelhak at hotmail.com> wrote:
> Is vtkMedicalImageReader2 realy  has bugs cose today i was mining the forum
> then i found somthing about
> it they said that i can us'it to get access to the DICOM extra information
> but the problem is it didnt work
>
> here is my code :
> *void main()
> {
>  vtkMedicalImageReader2*reader=vtkMedicalImageReader2::New();
>  reader->SetFileName("image.dcm");
>
>  reader->Update();
>
>  printf("%s",reader->GetMedicalImageProperties()->GetPatientSex());
>
>  printf("%s",reader->GetMedicalImageProperties()->GetPatientAge());
> }*
>
> the out put is NULL; othere thing when i use c++ output for printing like
>
> cout << GetMedicalImageProperties()->GetPatientSex();
> I get crush after debugin just like violent access to memorie
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Dicom-Header-File-tp5560527p5578412.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list