[ITK] reading private tags returns weird strings

Francois.GIRINON at ensam.eu Francois.GIRINON at ensam.eu
Wed Aug 10 09:58:17 EDT 2016


Le 10/08/2016 à 14:35, Dženan Zukić a écrit :
Hi Francois,

is this base64 encoded? You should perhaps do base64 decode on the return string to get the binary value.

Regards,
Dženan

On Wed, Aug 10, 2016 at 7:15 AM, <Francois.GIRINON at ensam.eu<mailto:Francois.GIRINON at ensam.eu>> wrote:

Hi,

I'm trying to read private dicom tags using :

    ImageIOType::Pointer dicomIO = ImageIOType::New();
    ...
    dicomIO->SetLoadPrivateTags(true);
    std::string offsetFromBottomStr;

    std::string offsetFromBottom = "0863|1041";
    dicomIO->GetValueFromTag(offsetFromBottom, offsetFromBottomStr);

The value offsetFromBottomStr returned is AICTQw==
How does it come and how can I fix this ?

Thank you,
François.

_______________________________________________
Community mailing list
Community at itk.org<mailto:Community at itk.org>
http://public.kitware.com/mailman/listinfo/community



Thanks for your answer. You might be right, they say here<http://public.kitware.com/pipermail/community/2016-May/011426.html> private tags and encodes the with Base64 into strings.
Unfortunately, AICTQw== should correspond to 295 and according to https://www.base64decode.org/, AICTQw== is a C.
Besides, I don't understand how does itksysBase64_Decode works (I'm not sure I should use this method too).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160810/01679f6b/attachment.html>


More information about the Community mailing list