<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>This was a recent contribution from the insight journal:</div><div><a href="http://www.midasjournal.org/browse/publication/729">http://www.midasjournal.org/browse/publication/729</a><br><div><br></div><div>You can also use the ImageIO factory mechanism so that you don't have to explicitly set the ImageIO. You can register it with the following line of code:</div><div><br></div><div>itk::MRCImageIOFactory::RegisterOneFactory();</div><div><br></div><div>Then you don't need to set the ImageIO, it should just be able to figure it out.</div><div><br></div><div>The orientation and the origin are not consistent across many common applications which use the MRC format. I opted not to utilize the orientation information in the file. There are some more details in the article.</div><div><br></div><div>Brad</div><div><br></div><div><br></div><div><br></div><div><div><div>On Oct 14, 2010, at 4:03 AM, Mauro Maiorca wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">indeed, thanks Shekhar, it's working now!<br><br>cheers,<br>Mauro<br><br><div class="gmail_quote">On Thu, Oct 14, 2010 at 6:57 PM, Shekhar Chandra <span dir="ltr">&lt;<a href="mailto:Shekhar.Chandra@monash.edu">Shekhar.Chandra@monash.edu</a>&gt;</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;">Hi Mauro,<br>
<br>
'undefined reference to' error means a linking problem. You need to link to the ITKIOReview library, which should have been built when u turned on the review option.<br>
<br>
HTH<br>
Cheers<br>
Shekhar<div><div></div><div class="h5"><br>
<br>
On 14/10/2010 6:07 PM, Mauro Maiorca wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hi all,<br>
<br>
thank you guys for the inputs and thanks Shekhar for pointing me the<br>
MRCImageIO (I wasn't aware of).<br>
I recompiled ITK with Use Review code ON, but when I compile my<br>
application the compiler doesn't like the:<br>
<br>
"stackReader-&gt;SetImageIO( itk::MRCImageIO::New() );"<br>
I've unsuccessfully tried few variation of it but I'm a bit clueless at<br>
the moment.<br>
<br>
<br>
this is the error message I got:<br>
<br>
CMakeFiles/mrc2dcm.dir/src/<br>
mrc2dcm.cxx.o: In function `main':<br>
mrc2dcm.cxx:(.text+0xd1): undefined reference to `typeinfo for<br>
itk::MRCImageIO'<br>
mrc2dcm.cxx:(.text+0xed): undefined reference to `typeinfo for<br>
itk::MRCImageIO'<br>
mrc2dcm.cxx:(.text+0x264): undefined reference to<br>
`itk::MRCImageIO::MRCImageIO()'<br>
collect2: ld returned 1 exit status<br>
make[2]: *** [bin/mrc2dcm] Error 1<br>
make[1]: *** [CMakeFiles/mrc2dcm.dir/all] Error 2<br>
make: *** [all] Error 2<br>
<br>
and this is the (simplified) code:<br>
<br>
#include "itkImage.h"<br>
#include "itkImageFileReader.h"<br>
#include "itkMRCImageIO.h"<br>
int main( int argc, char* argv[]){<br>
 &nbsp;typedef &nbsp; signed int &nbsp; &nbsp; &nbsp;InputPixelType;<br>
 &nbsp;const &nbsp; &nbsp; unsigned int &nbsp; &nbsp;Dimension = 3;<br>
 &nbsp;typedef itk::Image&lt; InputPixelType, Dimension &gt; &nbsp;ImageType;<br>
 &nbsp;typedef itk::ImageFileReader&lt; ImageType &gt; ReaderType;<br>
<br>
 &nbsp;ReaderType::Pointer stackReader = ReaderType::New();<br>
 &nbsp;stackReader-&gt;SetImageIO( itk::MRCImageIO::New() );<br>
 &nbsp;stackReader-&gt;SetFileName( argv[1] );<br>
 &nbsp;return 0;<br>
}<br>
<br>
thanks a lot,<br>
Mauro<br>
<br>
<br>
On Thu, Oct 14, 2010 at 9:45 AM, Shekhar Chandra<br></div></div><div class="im">
&lt;<a href="mailto:Shekhar.Chandra@monash.edu" target="_blank">Shekhar.Chandra@monash.edu</a> &lt;mailto:<a href="mailto:Shekhar.Chandra@monash.edu" target="_blank">Shekhar.Chandra@monash.edu</a>&gt;&gt; wrote:<br>
<br>
 &nbsp; &nbsp;Hi Guys,<br>
<br>
 &nbsp; &nbsp;ITK has the MRCImageIO class in the Code Review area for MRC images.<br>
 &nbsp; &nbsp;I have used it successfully.<br>
<br>
 &nbsp; &nbsp;Compile ITK with Use Review code ON and use it something like<br>
<br>
 &nbsp; &nbsp;ReaderType::Pointer stackReader = ReaderType::New();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stackReader-&gt;SetImageIO( itk::MRCImageIO::New() );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stackReader-&gt;SetFileName( argv[1] );<br>
<br>
 &nbsp; &nbsp;HTH<br>
 &nbsp; &nbsp;Cheers<br>
 &nbsp; &nbsp;Shakes<br>
<br>
<br>
 &nbsp; &nbsp;On 14/10/2010 3:23 AM, Jeff Donner wrote:<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;I have code just about ready to go - I just need to rebase the<br>
 &nbsp; &nbsp; &nbsp; &nbsp;patches<br>
 &nbsp; &nbsp; &nbsp; &nbsp;for the current build. I've been holding off because I've been<br>
 &nbsp; &nbsp; &nbsp; &nbsp;confused about the meaning of MRC's orientation, for non-orthogonal<br>
 &nbsp; &nbsp; &nbsp; &nbsp;(and maybe for any rotation at all) cases. I'm not a dev;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;perhaps I'll<br>
 &nbsp; &nbsp; &nbsp; &nbsp;post them to this list, for someone else to do the commits. If<br>
 &nbsp; &nbsp; &nbsp; &nbsp;anyone's in a hurry I can just post what I have, but otherwise I<br>
 &nbsp; &nbsp; &nbsp; &nbsp;estimate maybe 2 days.<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;On Wed, Oct 13, 2010 at 1:44 AM, Sergio<br></div>
 &nbsp; &nbsp; &nbsp; &nbsp;Vera&lt;<a href="mailto:sergio.vera@alma3d.com" target="_blank">sergio.vera@alma3d.com</a> &lt;mailto:<a href="mailto:sergio.vera@alma3d.com" target="_blank">sergio.vera@alma3d.com</a>&gt;&gt; &nbsp;wrote:<div class="im">
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Hi<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;One of the improvements of the next version of ITK (v4) will<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;be better<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;support for microscopy images:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.itk.org/Wiki/ITK_Release_4/Microscopy" target="_blank">http://www.itk.org/Wiki/ITK_Release_4/Microscopy</a><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;however, I don't know the specific file formats that ITK<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;will or will &nbsp;not<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;support.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;It may be a good idea to get in touch with some of the<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;developers to give a<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hand and/or publish your code<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;regards<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;On Wed, Oct 13, 2010 at 6:38 AM, Mauro<br></div>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Maiorca&lt;<a href="mailto:mauromaiorca@gmail.com" target="_blank">mauromaiorca@gmail.com</a> &lt;mailto:<a href="mailto:mauromaiorca@gmail.com" target="_blank">mauromaiorca@gmail.com</a>&gt;&gt;<div class="im">
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wrote:<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Hello all,<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I'm currently working with electron microscope images,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and I found &nbsp;ITK<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and related applications (i.e. itk-snap) very useful.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Unfortunately, it seems to me that ITK doesn't<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(natively) support the mrc<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;file format. Am I right? There is any plan to include<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;microscopy file<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;formats into itk?<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(At the moment I'm using a mrc-MetaIO (and vice-versa)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;converter I wrote,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I don't have any problem to publish the software<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;somewhere if useful to<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;other people).<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cheers,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Mauro<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_____________________________________<br></div>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a> &lt;<a href="http://www.kitware.com/" target="_blank">http://www.kitware.com</a>&gt;<div class="im"><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Visit other Kitware open-source projects at<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Kitware offers ITK Training Courses, for more<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;information visit:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Please keep messages on-topic and check the ITK FAQ at:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Follow this link to subscribe/unsubscribe:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sergio Vera<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Alma IT Systems<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C/ Vilana, 4B, 4º 1ª<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;08022 Barcelona<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T. (+34) 932 380 592<br></div>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.alma3d.com/" target="_blank">www.alma3d.com</a> &lt;<a href="http://www.alma3d.com/" target="_blank">http://www.alma3d.com</a>&gt;<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_____________________________________<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a> &lt;<a href="http://www.kitware.com/" target="_blank">http://www.kitware.com</a>&gt;<div class="im"><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Visit other Kitware open-source projects at<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Kitware offers ITK Training Courses, for more information visit:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Please keep messages on-topic and check the ITK FAQ at:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Follow this link to subscribe/unsubscribe:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;_____________________________________<br></div>
 &nbsp; &nbsp; &nbsp; &nbsp;Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a> &lt;<a href="http://www.kitware.com/" target="_blank">http://www.kitware.com</a>&gt;<div class="im"><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Visit other Kitware open-source projects at<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Kitware offers ITK Training Courses, for more information visit:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Please keep messages on-topic and check the ITK FAQ at:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Follow this link to subscribe/unsubscribe:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
<br>
 &nbsp; &nbsp;_____________________________________<br></div>
 &nbsp; &nbsp;Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a> &lt;<a href="http://www.kitware.com/" target="_blank">http://www.kitware.com</a>&gt;<div class="im"><br>
<br>
 &nbsp; &nbsp;Visit other Kitware open-source projects at<br>
 &nbsp; &nbsp;<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
 &nbsp; &nbsp;Kitware offers ITK Training Courses, for more information visit:<br>
 &nbsp; &nbsp;<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
 &nbsp; &nbsp;Please keep messages on-topic and check the ITK FAQ at:<br>
 &nbsp; &nbsp;<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
 &nbsp; &nbsp;Follow this link to subscribe/unsubscribe:<br>
 &nbsp; &nbsp;<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
<br>
</div></blockquote>
</blockquote></div><br>
<span>&lt;ATT00001..txt&gt;</span></blockquote></div><br></div></div></body></html>