<HTML>
<HEAD>
<TITLE>Re: [Insight-users] Deformable registration using FEM: Visualize Mesh</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Steve,<BR>
<BR>
Attached are two classes that should help. They do not carry along the material property information. This would need to be added.<BR>
<BR>
Vince<BR>
<BR>
<BR>
<BR>
On 3/7/10 3:55 PM, &quot;Steve Lancey&quot; &lt;<a href="steve.lancey@gmail.com">steve.lancey@gmail.com</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi Vincent,<BR>
<BR>
This is great news, just downloaded the software. It would be great sending me the code snippet for converting the mesh.<BR>
What code do you use for surface extraction?<BR>
<BR>
Thx,<BR>
<BR>
S.<BR>
<BR>
On Tue, Feb 23, 2010 at 10:39 PM, Vincent Magnotta &lt;<a href="vincent-magnotta@uiowa.edu">vincent-magnotta@uiowa.edu</a>&gt; wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Just to follow-up to Luis's e-mail.<BR>
<BR>
There is another solution to the mesh visualization question. What we have<BR>
done in some of our code is to have a parallel copy of the mesh in VTK that<BR>
we update the point locations based on the results of the FE analysis. This<BR>
can then be written to disk and visualized and animated in Paraview.<BR>
<BR>
The software that was mentioned for mesh generation (IA-FEMesh) is both a 3D<BR>
Slicer module and has a stand-alone version<BR>
(<a href="http://www.ccad.uiowa.edu/mimx">http://www.ccad.uiowa.edu/mimx</a>). Given a surface, you can generate a<BR>
hexahedral mesh and assign material properties. The mesh can be saved in VTK<BR>
format where the material properties are stored as Cell data. You will need<BR>
to write some code to create an ITK FE mesh from the resulting VTK mesh. I<BR>
have an example if that will be helpful. The ITK FEM framework is an area<BR>
where some refactoring is needed. Hopefully you will some work in this area<BR>
with the push towards ITK4.<BR>
<BR>
Vince<BR>
<BR>
<BR>
On 2/23/10 4:23 PM, &quot;Luis Ibanez&quot; &lt;<a href="luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt; wrote:<BR>
<BR>
&gt; Hi Steve,<BR>
&gt;<BR>
&gt; Option (A)<BR>
&gt;<BR>
&gt; The original FEM code in ITK has a compile flag:<BR>
&gt;<BR>
&gt;           FEM_BUILD_VISUALIZATION<BR>
&gt;<BR>
&gt; but, given that Visualization was not in the scope of<BR>
&gt; ITK, this code has probably never been exercised.    :-(<BR>
&gt;<BR>
&gt;<BR>
&gt; Option (B)<BR>
&gt;<BR>
&gt; You could use the filters that overlap a grid on an<BR>
&gt; image, and resample that grid image through the<BR>
&gt; deformation field computed by the FEM registration<BR>
&gt; method.<BR>
&gt;<BR>
&gt; See<BR>
&gt;              Insight/Code/Review/<BR>
&gt;                            itkGridImageSource.h<BR>
&gt;<BR>
&gt; and its explanation in the Insight Journal paper<BR>
&gt;<BR>
&gt;             &quot;Gridding Graphic Graticules&quot;<BR>
&gt;             Tustison N., Avants B., Gee J.<BR>
&gt;             University of Pennsylvania<BR>
&gt;             <a href="http://hdl.handle.net/1926/475">http://hdl.handle.net/1926/475</a><BR>
&gt; <a href="http://www.insight-journal.org/browse/publication/140">http://www.insight-journal.org/browse/publication/140</a><BR>
&gt;<BR>
&gt;<BR>
&gt; -----<BR>
&gt;<BR>
&gt; Regarding the process of creating a customized<BR>
&gt; Mesh:<BR>
&gt;<BR>
&gt;         We don't have such functionality in ITK.<BR>
&gt;<BR>
&gt; Mesh Generation is outside of the scope of ITK.<BR>
&gt;<BR>
&gt; You will find very useful to look at:<BR>
&gt;<BR>
&gt; <a href="http://www.na-mic.org/Wiki/index.php/NA-MIC_NCBC_Collaboration:Automated_FE_Me">http://www.na-mic.org/Wiki/index.php/NA-MIC_NCBC_Collaboration:Automated_FE_Me</a><BR>
&gt; sh_Development<BR>
&gt;<BR>
&gt; as a possible solution.<BR>
&gt;<BR>
&gt; This is an Open Source application based<BR>
&gt; on ITK and VTK<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;      Regards,<BR>
&gt;<BR>
&gt;<BR>
&gt;                Luis<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; -------------------------------------------------------<BR>
&gt; On Mon, Feb 22, 2010 at 9:52 PM, Steve Lancey &lt;<a href="steve.lancey@gmail.com">steve.lancey@gmail.com</a>&gt; wrote:<BR>
&gt;&gt; Hi,<BR>
&gt;&gt;<BR>
&gt;&gt; I have two questions:<BR>
&gt;&gt;<BR>
&gt;&gt; 1) I would like to store the generated mesh after every iteration of the<BR>
&gt;&gt; energy minimization procedure and visualize them later (as a binary images<BR>
&gt;&gt; or paths).<BR>
&gt;&gt; What is the best way to achieve this?<BR>
&gt;&gt;<BR>
&gt;&gt; 2) What is the best tool to create a mesh manually, including the assignment<BR>
&gt;&gt; of mesh element properties?<BR>
&gt;&gt;<BR>
&gt;&gt; Thanks for taking your time,<BR>
&gt;&gt;<BR>
&gt;&gt; Steve Lancey<BR>
&gt;&gt;<BR>
&gt;&gt; _____________________________________<BR>
&gt;&gt; Powered by www.kitware.com &lt;<a href="http://www.kitware.com">http://www.kitware.com</a>&gt; <BR>
&gt;&gt;<BR>
&gt;&gt; Visit other Kitware open-source projects at<BR>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
&gt;&gt;<BR>
&gt;&gt; Kitware offers ITK Training Courses, for more information visit:<BR>
&gt;&gt; <a href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a><BR>
&gt;&gt;<BR>
&gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<BR>
&gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><BR>
&gt;&gt;<BR>
&gt;&gt; Follow this link to subscribe/unsubscribe:<BR>
&gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt; _____________________________________<BR>
&gt; Powered by www.kitware.com &lt;<a href="http://www.kitware.com">http://www.kitware.com</a>&gt; <BR>
&gt;<BR>
&gt; Visit other Kitware open-source projects at<BR>
&gt; <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
&gt;<BR>
&gt; Kitware offers ITK Training Courses, for more information visit:<BR>
&gt; <a href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a><BR>
&gt;<BR>
&gt; Please keep messages on-topic and check the ITK FAQ at:<BR>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><BR>
&gt;<BR>
&gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><BR>
<BR>
----------------------<BR>
Associate Professor<BR>
Department of Radiology<BR>
0453-D JCP<BR>
200 Hawkins Drive<BR>
Iowa City, IA 52242<BR>
E-mail: <a href="vincent-magnotta@uiowa.edu">vincent-magnotta@uiowa.edu</a><BR>
Phone: 319-356-8255 Fax: 319-353-6275<BR>
Website: <a href="http://www.radiology.uiowa.edu">http://www.radiology.uiowa.edu</a><BR>
<BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
----------------------<BR>
Associate Professor<BR>
Department of Radiology<BR>
0453-D JCP<BR>
200 Hawkins Drive<BR>
Iowa City, IA 52242<BR>
E-mail: <a href="vincent-magnotta@uiowa.edu">vincent-magnotta@uiowa.edu</a><BR>
Phone: 319-356-8255 Fax: 319-353-6275<BR>
Website: <a href="http://www.radiology.uiowa.edu">http://www.radiology.uiowa.edu</a><BR>
<BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>