<br>HI Maarten,<br><br><br>0) How does the Insight Journal works ?<br><br> Answer:<br><a href="http://www.vtk.org/Wiki/ITK_Procedure_for_Contributing_New_Classes_and_Algorithms">http://www.vtk.org/Wiki/ITK_Procedure_for_Contributing_New_Classes_and_Algorithms</a><br>
<br> In short, yes, you write an article (a technical report, of a couple of pages)<br> and add to it your source code, data and parameters.<br><br> Any reader of the Journal should be able to get your code and<br>
simply do on it:<br><br> cmake .<br> make <br> ctest<br><br> and obtain the *SAME* results that you describe in your paper<br> (or technical report).<br><br> You may want to take a look at other papers to get a feeling <br>
for the process. <br><br> Here is a good model:<br><br> <a href="http://www.insight-journal.org/browse/publication/318">http://www.insight-journal.org/browse/publication/318</a><br><br><br><br>1) you can convert all the Amira images to 3D ITK images,<br>
Then you check their Z size, and if it is == 1, then you<br> pass them through the itkExtractImageFilter, get a 2D<br> image and pass it to a 2D pipeline.<br><br> Yes, that means that your application should compile <br>
*BOTH* a 3D pipeline and a 2D pipeline. There is no<br> much mistery beyond that.<br><br><br><br> Regards,<br><br><br> Luis<br><br><br><br>------------------------------<br><div class="gmail_quote">On Thu, Jul 2, 2009 at 7:37 PM, Maarten Beek <span dir="ltr"><<a href="mailto:mbeek@sri.utoronto.ca">mbeek@sri.utoronto.ca</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 class="im"><br>
<br>
Luis Ibanez wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi Maarten,<br>
<br>
Yes,<br>
ITK doesn't consider a 3D image of 1 slice<br>
to be equivalent to a 2D image.<br>
</blockquote></div>
<...><div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
or...<br>
<br>
You could use the itkExtractImageFilter in order to extract a 2D slice<br>
from a 3D image. In this case, the output is really an itk 2D image<br>
that you can feed as input to a 2D pipeline.<br>
<br>
</blockquote></div>
I didn't know of the existence of this class. I'll have a look at it. But at the moment I don't see how it will help me, since one cannot determine a template variable during runtime. Amira works with modules (=class) and I am creating modules that internally use functionality found in ITK. Amira uses the same class for 2d and 3d images, nonetheless I would like my modules to work on all images without having to create a 2d and 3d version of each module...<br>
Maybe I can check for the dimension of the Amira image before creating the module with ITK code and then use template specialization to create the correct itk::Image.... Hmmm<div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
BTW: It will be great if you contribute these conversion classes<br>
to the Insight Journal.<br>
<br>
<a href="http://www.insight-journal.org/" target="_blank">http://www.insight-journal.org/</a><br>
<br>
I'm sure that many users of Amira and ITK will find useful<br>
to have a mechanism for exchanging images between the<br>
two systems.<br>
<br>
</blockquote></div>
How does this work?<br>
Do I just upload the code and everyone can use it, or is there some review involved and do I need to write an article describing the code?<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Regards,<br>
<br>
<br>
Luis<br>
<br>
<br>
<br>
----------------------------------------------------------------------------------------<div class="im"><br>
On Thu, Jul 2, 2009 at 2:33 PM, Maarten Beek <<a href="mailto:mbeek@sri.utoronto.ca" target="_blank">mbeek@sri.utoronto.ca</a> <mailto:<a href="mailto:mbeek@sri.utoronto.ca" target="_blank">mbeek@sri.utoronto.ca</a>>> wrote:<br>
<br>
<br>
I wrote classes to convert Amira's HxUniformScalarField3 into<br>
Itk's itk::Image and vice versa.<br>
I hard-coded the dimension of the itk::Image to 3 (since Amira's<br>
class represents a 3d image as well).<br>
<br>
However, I have noticed that some itk filters don't work correctly<br>
after converting a 2d HxUniformScalarField3 (e.g. one slice) into<br>
an itk::Image<type,3>. I think this has to do with the iterators<br>
in Itk (these are templated over the dimension as well).<br>
<br>
Is this true and is there some work-around to get every<br>
HxUniformScalarField3 (2d and 3d) converted into a itk::Image<type,3>?<br>
<br>
Thanks - Maarten<br>
_____________________________________<br></div>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><div class="im"><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<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>