How to read Chinese characters from DICOM

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
vizlab
Posts: 1
Joined: Mon, 2011-07-25, 21:51

How to read Chinese characters from DICOM

#1 Post by vizlab »

I have some studies that have patient, study description and referring physician name in Chinese. I am using findAndGetOfString to get the values for these dicom tags. I have a feeling that the method does not return unicode or wide string, rather returns a string in ASCII replacing some characters with * ? or .

Is it possible to reconstruct the original string with the result of findAndGetOfString method? If not, what should I do get these dicom tag values?

Michael Onken
DCMTK Developer
Posts: 2055
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi,

findAndGetOFString gives you each 8 byte character as is whithout any character set interpretation. You must interpret it according to the character set defined in the Specific Character Set (0008,0005). There is no functionality for doing character set conversions (e.g. from specific japanese character sets to UTF-8 ).

For a list of character sets possible in DICOM look in part 3. It seems to me that for chinese you basically have choice between GB18030 and Unicode (UTF-8 ).

Also look into part 5 for examples how to do chinese patient names in Unicode in DICOM.

Michael

J. Riesmeier
DCMTK Developer
Posts: 2517
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#3 Post by J. Riesmeier »

As a follow-up: Today, we've completed a first version of an enhanced character set support for the DCMTK. This also includes the ISO 2022 code extension technique. If compiled with "libiconv", all affected strings in a DICOM dataset using any of the DICOM character sets can now be converted to UTF-8 (see "dcmconv --convert-to-utf8"). As already mentioned, this is only a first step of enhanced character set support ...

If you are interested in details, check our public git repository!

kamil
Posts: 63
Joined: Fri, 2009-04-17, 09:18

Re:

#4 Post by kamil »

J. Riesmeier wrote:As a follow-up: Today, we've completed a first version of an enhanced character set support for the DCMTK. This also includes the ISO 2022 code extension technique. If compiled with "libiconv", all affected strings in a DICOM dataset using any of the DICOM character sets can now be converted to UTF-8 (see "dcmconv --convert-to-utf8"). As already mentioned, this is only a first step of enhanced character set support ...

If you are interested in details, check our public git repository!
hi, I want find a way to compile libiconv used in dcmtk 3.6.1, here is my situation, any suggestion? Thanks

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests