<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div><div><br></div><div>Thanks for your reply. For dimensions, I always use the same (3D).</div><div>It is more on the component type that I am concern. Some of my images</div><div>are quite big. Some are stored as float, some as bytes. I do not want to load it as float</div><div>if all I need is a byte per scalar. Otherwise, I am using 4 times the needed memory.</div><div><br></div><div>Thanks,</div><div><br></div><div>Mathieu</div><br><div><div>On 8-Jan-09, at 1:49 PM, Bing Jian wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Mathieu,<br><br><font color="#888888">&nbsp; Here is Luis's response to one of my questions back to Nov. 2003&nbsp; <a href="http://www.itk.org/pipermail/insight-users/2003-November/005652.html">http://www.itk.org/pipermail/insight-users/2003-November/005652.html</a><br> &nbsp; Hope it helps.<br><br>Bing<br><br></font><div class="gmail_quote">On Thu, Jan 8, 2009 at 8:52 AM, Mathieu Coursolle <span dir="ltr">&lt;<a href="mailto:mcoursolle@rogue-research.com">mcoursolle@rogue-research.com</a>></span> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="">Hi ITK users,<div><br></div><div>I've been using the itk::ImageSeriesReader with itk::GDCMImageIO to read a DICOM volume from a&nbsp;</div> <div>series of slices with success.</div><div><br></div><div>Here is part of the code I've been using:</div><div><br></div><div><div style="margin: 0px;">itk::ImageSeriesReader&lt;itk::Image&lt;double, 3> >::Pointer reader = itk::ImageSeriesReader&lt;ITK3DImage>::New();</div> <div style="margin: 0px;">reader->SetFileNames(fileNames);</div><div style="margin: 0px;">reader->SetImageIO(dcmIO);</div></div><div><br></div><div>At this time, I don't know what is the scalar component type of my 3D image, so I specify double as the templated image type.</div> <div>If the image is in fact stored as bytes, I am using 8 times the memory needed, which is quite&nbsp;annoying&nbsp;for large datasets.</div><div><br></div><div>I currently cast it back to its native type once it is read.</div><div> <br></div><div>Does anybody have a suggestion on how I could check the native type of the image before reading it?</div><div>What I'd like to do is something like: read the header (not the data) to check the native type, then create my image with</div> <div>that type.&nbsp;</div><div><br></div><div>Note that I have the same issue with other image IO, so it is not a DICOM specific issue.</div><div><br></div><div>Thanks!</div><div><br></div><font color="#888888"><div>Mathieu</div> <div><br></div><div><br></div><div><br></div></font></div><br>_______________________________________________<br> Insight-users mailing list<br> <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br> <br></blockquote></div><br></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>____________________&nbsp;<br>Mathieu Coursolle, M.Ing.<span class="Apple-tab-span" style="white-space: pre; ">                </span><br>Rogue Research Inc. &nbsp; &nbsp; &nbsp; &nbsp;</div><div><a href="http://www.rogue-research.com/">www.rogue-research.com</a><br></div><div><br></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>