<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">For posterity: the value Francois was looking for was a float, and the four bytes 00 80 93 43 indeed encode the float value 295.0</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">The code to convert to float:</div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace">float * fDecoded = (float *)&decoded[0];</font></div><div class="gmail_default"><font face="monospace, monospace">std::cout << "float = " << (*fDecoded) << std::endl;</font></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 10, 2016 at 10:43 AM, Dženan Zukić <span dir="ltr"><<a href="mailto:dzenanz@gmail.com" target="_blank">dzenanz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Can you share (either with the list or just me) this DICOM image (optionally anonymized) and a runnable example which you use to read it?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 10, 2016 at 10:41 AM, <span dir="ltr"><<a href="mailto:Francois.GIRINON@ensam.eu" target="_blank">Francois.GIRINON@ensam.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><div><div>
<div>Le 10/08/2016 à 16:23, Dženan Zukić a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Does Matlab have special support for those private tags? They may have special encoding besides base64 applied by ITK DICOM dictionary.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Aug 10, 2016 at 10:13 AM, <span dir="ltr"><<a href="mailto:Francois.GIRINON@ensam.eu" target="_blank">Francois.GIRINON@ensam.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>
<div>
<div>Le 10/08/2016 à 16:05, Dženan Zukić a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
In fact, this <a href="http://www.opinionatedgeek.com/dotnet/tools/base64decode/" target="_blank">
decodes</a> to 00 80 93 43 - four bytes given here in hexadecimal notation. The decoder you linked does not seem to work correctly. I don't know why you expect 295 there.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Aug 10, 2016 at 9:58 AM, <span dir="ltr"><<a href="mailto:Francois.GIRINON@ensam.eu" target="_blank">Francois.GIRINON@ensam.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>
<div>
<div>Le 10/08/2016 à 14:35, Dženan Zukić a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Hi Francois,</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
<br>
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
is this base64 encoded? You should perhaps do base64 decode on the return string to get the binary value.</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
<br>
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Regards,</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Dženan</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Aug 10, 2016 at 7:15 AM, <span dir="ltr"><<a href="mailto:Francois.GIRINON@ensam.eu" target="_blank">Francois.GIRINON@ensam.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>I'm trying to read private dicom tags using :</p>
<p> ImageIOType::Pointer dicomIO = ImageIOType::New();<br>
...<br>
dicomIO->SetLoadPrivateTags(tr<wbr>ue);<br>
std::string offsetFromBottomStr;</p>
<p> std::string offsetFromBottom = "0863|1041";<br>
dicomIO->GetValueFromTag(offse<wbr>tFromBottom, offsetFromBottomStr);</p>
<p>The value <i>offsetFromBottomStr </i>returned is <i>AICTQw==</i><br>
How does it come and how can I fix this ?</p>
<p>Thank you,<br>
François.<br>
</p>
</div>
<br>
______________________________<wbr>_________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/community</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
</div>
<p>Thanks for your answer. You might be right, they say <a href="http://public.kitware.com/pipermail/community/2016-May/011426.html" target="_blank">
here</a> <i>private tags and encodes the with Base64 into strings.<br>
</i>Unfortunately, <i>AICTQw== </i>should correspond to 295 and according to <a href="https://www.base64decode.org/" target="_blank">
https://www.base64decode.org/</a>, <i>AICTQw==</i> is a C.<br>
Besides, I don't understand how does itksysBase64_Decode works (I'm not sure I should use this method too).<br>
</p>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
</div>
<p>In fact I have previously red the dicom using matlab and the value of the private tag 0863 1041 is 295.<br>
</p>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div></div><p>I don't know, it doesn't seem really matlab specific, <a href="https://github.com/gerddie/ginkgocadx" target="_blank">
this tool</a> also gets a dicom inspector module which displays 295.<br>
</p>
</div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>