[Insight-users] getmetadata from dicom image with java

Luis Ibanez luis.ibanez at kitware.com
Fri May 30 10:52:27 EDT 2008


Hi Wells,

Are you using the standard wrapping or are you using WrapITK ?

The MetaDataObject types are not instantiated in at all in
the standard wrapping.

They are not instantiated either in WrapITK, but they are easier
to add there. You may have to add a wrap_...cmake file.

You may want to use as example, the file in ExplicitITK:

Insight/Wrapping/ExplicitITK/Modules/Common
                       wrap_itkMetaDataObject.cmake

and make sure that you add inside the types of the meta data
elements that you want to extract from the MetaDataDictionary.

Currently you will only find:

$ cat wrap_itkMetaDataObject.cmake
WRAP_CLASS("itk::MetaDataObject")
WRAP_TEMPLATE("D" "double")
WRAP_TEMPLATE("F" "float")
WRAP_TEMPLATE("UI" "unsigned int")
WRAP_TEMPLATE("UL" "unsigned long")
END_WRAP_CLASS()


    Regards,


        Luis


------------
wells wrote:
> HI, Insight-users:
>     I try to get metadata information from dicom image using java  
> language.source code as following:
> 
> 
>     itkImageFileReaderUS2_Pointer reader =  
> itkImageFileReaderUS2.itkImageFileReaderUS2_New();
>     itkGDCMImageIO_Pointer dicomIO = itkGDCMImageIO.itkGDCMImageIO_New();
>     reader.SetImageIO(dicomIO.GetPointer());
>     reader.SetFileName("IM-0001-0001.dcm");
>     reader.Update();
>     System.out.println(reader.GetMetaDataDictionary());
> 
>     I get the quote of SWIGTYPE_p_itk__MetaDataDictionary ,but can not  
> get concrete information.
>     How can I get and edit the metadata information? can anyone help 
> me!  Thanks!
> 
> 
> 
> Name         : wells wang
> address      : Rm. 1808, Jianda Mansion, No.223, Zhongshan Road(N),   
> Nanjing,  China, 210009
> Mobile Phone : (+86)013814039704
> Wells' Blog    : http://blog.163.com/jake_wang1013
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list