Re: [ITK-users] Problem calculating surface ITK mesh

Dženan Zukić <[email protected]> Sun, 06 May 2018 15:49:05 +0000
Newsgroups gmane.comp.lib.itk.user
Message-ID <CAPf2UMSeN8j9MG+iTQSKT_B0UC0efucncSwR+xtPFOCVtfiHdA@mail.gmail.com>
--===============1443244293==
Content-Type: multipart/alternative; boundary="000000000000e0423f056b8b7ebd"

--000000000000e0423f056b8b7ebd
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Elisabeth,

you could try using BinaryImageToStatisticsLabelMapFilter
<https://itk.org/Doxygen/html/classitk_1_1BinaryImageToStatisticsLabelMapFi=
lter.html>
or some other filter from the same group
<https://itk.org/Doxygen/html/group__ITKLabelMap.html>. The feature you
want to pay attention to is 'perimeter'.

Regards,
D=C5=BEenan

On Sat, May 5, 2018 at 2:09 AM Elisabeth Pfaehler <[email protected]>
wrote:

> Dear all,
>
> I am facing a problem calculating the surface of an ITK mesh.
> Originally I have an image mask and converted this mask to a triangle
> mesh. In order to calculate the surface, I wanted to convert this mesh to=
 a
> simplex mesh using:
>
>     typedef itk::SimplexMesh< float, 3 > TSimplex;
>     typedef itk::TriangleMeshToSimplexMeshFilter< MeshType, TSimplex >
> TConvert;
>
>     // Convert the triangle mesh to a simplex mesh.
>     TConvert::Pointer convert =3D TConvert::New();
>     convert->SetInput(meshSource->GetOutput());
>     convert->Update();
>
> As I found it in one example. But in this case my software starts
> calculating and never stops.
>
> So, now I tried to calculate the surface of every cell and add these
> surfaces. But is there maybe another, nicer way?
>
> Thanks a lot in advance
>
> Elli
>
> The ITK community is transitioning from this mailing list to
> discourse.itk.org. Please join us there!
> ________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> https://itk.org/mailman/listinfo/insight-users
>

--000000000000e0423f056b8b7ebd
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:verdana,=
sans-serif;font-size:small">Hi Elisabeth,</div><div class=3D"gmail_default"=
 style=3D"font-family:verdana,sans-serif;font-size:small"><br></div><div cl=
ass=3D"gmail_default" style=3D"font-family:verdana,sans-serif;font-size:sma=
ll">you could try using <a href=3D"https://itk.org/Doxygen/html/classitk_1_=
1BinaryImageToStatisticsLabelMapFilter.html">BinaryImageToStatisticsLabelMa=
pFilter</a> or some other filter from the same <a href=3D"https://itk.org/D=
oxygen/html/group__ITKLabelMap.html">group</a>. The feature you want to pay=
 attention to is &#39;perimeter&#39;.</div><div class=3D"gmail_default" sty=
le=3D"font-family:verdana,sans-serif;font-size:small"><br></div><div class=
=3D"gmail_default" style=3D"font-family:verdana,sans-serif;font-size:small"=
>Regards,</div><div class=3D"gmail_default" style=3D"font-family:verdana,sa=
ns-serif;font-size:small">D=C5=BEenan</div></div><br><div class=3D"gmail_qu=
ote"><div dir=3D"ltr">On Sat, May 5, 2018 at 2:09 AM Elisabeth Pfaehler &lt=
;<a href=3D"mailto:[email protected]">[email protected]</a>&gt;=
 wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">
Dear all,<br>
<br>
I am facing a problem calculating the surface of an ITK mesh.<br>
Originally I have an image mask and converted this mask to a triangle=20
mesh. In order to calculate the surface, I wanted to convert this mesh=20
to a simplex mesh using:<br>
<br>
=C2=A0=C2=A0=C2=A0 typedef itk::SimplexMesh&lt; float, 3 &gt; TSimplex;<br>
=C2=A0=C2=A0=C2=A0 typedef itk::TriangleMeshToSimplexMeshFilter&lt; MeshTyp=
e, TSimplex &gt; TConvert;<br>
<br>
=C2=A0=C2=A0=C2=A0 // Convert the triangle mesh to a simplex mesh.<br>
=C2=A0=C2=A0=C2=A0 TConvert::Pointer convert =3D TConvert::New();<br>
=C2=A0=C2=A0=C2=A0 convert-&gt;SetInput(meshSource-&gt;GetOutput());<br>
=C2=A0=C2=A0=C2=A0 convert-&gt;Update();<br>
<br>
As I found it in one example. But in this case my software starts calculati=
ng and never stops.
<br>
<br>
So, now I tried to calculate the surface of every cell and add these surfac=
es. But is there maybe another, nicer way?<br>
<br>
Thanks a lot in advance<br>
<br>
Elli

<div dir=3D"ltr" class=3D"m_1224443643335091353gmail_signature" data-smartm=
ail=3D"gmail_signature"><br></div></div>
The ITK community is transitioning from this mailing list to <a href=3D"htt=
p://discourse.itk.org" rel=3D"noreferrer" target=3D"_blank">discourse.itk.o=
rg</a>. Please join us there!<br>
________________________________<br>
Powered by <a href=3D"http://www.kitware.com" rel=3D"noreferrer" target=3D"=
_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href=3D"http://www.kitware.com/opensource/opensource.html" rel=3D"norefe=
rrer" target=3D"_blank">http://www.kitware.com/opensource/opensource.html</=
a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href=3D"http://www.kitware.com/products/protraining.php" rel=3D"noreferr=
er" target=3D"_blank">http://www.kitware.com/products/protraining.php</a><b=
r>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href=3D"http://www.itk.org/Wiki/ITK_FAQ" rel=3D"noreferrer" target=3D"_b=
lank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"https://itk.org/mailman/listinfo/insight-users" rel=3D"noreferre=
r" target=3D"_blank">https://itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div>

--000000000000e0423f056b8b7ebd--

--===============1443244293==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

The ITK community is transitioning from this mailing list to discourse.itk.org. Please join us there!
________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
https://itk.org/mailman/listinfo/insight-users

--===============1443244293==--