<div dir="ltr">Hi Dženan,<div><br></div><div>Correct me if I'm wrong, but the Import filter assumes that I have the medical image metadata (size, resolution, etc.), and the decompressed data (the C-array). However, I do not have these. </div><div><br></div><div>All I have is a buffer <i>buf</i> containing the encoded image, i.e., <i>buf</i> is filled like so:</div><div><br></div>unsigned char buf[MAX_FILE_SIZE];<div>f = fopen("myImage.dcm", "rb");</div><div>n = fread(buf, MAX_FILE_SIZE, 1, f);</div><div><br></div><div>In other words, I'm looking for a class that can read an image from a buffer, just like ImageFileReader reads from a file. Does such a class exist?</div><div><br></div><div>Thanks,</div><div>Fijoy</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 24, 2016 at 10:57 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">Hi Fijoy,</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">that is the job of <a href="https://itk.org/Doxygen/html/classitk_1_1ImportImageFilter.html" target="_blank">Import</a> filter.</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"><div><div class="h5">On Mon, Oct 24, 2016 at 10:50 AM, Fijoy Vadakkumpadan <span dir="ltr"><<a href="mailto:tofijoy@gmail.com" target="_blank">tofijoy@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi all,</div><div><br></div>I'm wondering if ITK can decode a medical image from a buffer.<div><br></div><div>For example, if I have a DICOM file read into a buffer buf using fread(), is there an API in ITK that I can use to get an itk::Image pointer from buf?<br><br>Thank you,</div><div>Fijoy</div></div>
<br></div></div>______________________________<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><br></div>