[Insight-users] How to convert header tag Rows(0028 0010) to
'int' format?
Luis Ibanez
luis.ibanez at kitware.com
Mon Dec 26 12:27:50 EST 2005
Hi Zien,
Please read the ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
In particular, you must read:
Section 7.12.6, "Printing DICOM Tags from a Series"
pdf-page 340-343.
and follow the associated source code example in
Insight/
Examples/
IO/
DicomImageReadPrintTags.cxx
In line 333 replace the DICOM tag "0010|0010" with
the one that you are looking for "0028|0010". Then
in line 368 you can extract the "char *" from the
std::string by using code like:
unsigned int numRrows = atoi( tagvalue.c_str() );
Note that the method c_str() of the std::string will
extract the "char *" that you need to pass to atoi().
Regards,
Luis
--------------
Zien wrote:
> Hi,all:
> I need your help....
> I have a problem about how to get DICOM header tag Rows(0028 0010) and
> convert it to ' int ' format.
>
> It can't use atoi to convert...
>
> Kind Regards. :)
> _______________________________________________
> 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