<br>Hi Benjamin,<br><br>Please find attached the modified DeformableRegistration example<br>that uses the filter<br><br> itkDeformableSimplexMesh3DGradientConstraintForceFilter<br><br>This attached file compiles fine.<br>
<br><br> Regards,<br><br><br> Luis<br><br><br>--------------------------------------------------------------------------------------------<br><div class="gmail_quote">On Sun, Aug 16, 2009 at 8:13 AM, Benjamin Klimczak <span dir="ltr"><<a href="mailto:klimczaks@gmx.de">klimczaks@gmx.de</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;">Hi Luis,<br>
<br>
thanks for looking into my problem.<br>
<br>
I have also tried to use the itkDeformableSimplexMesh3DGradientConstraintForceFilter.h but I ran into strange template compiler errors when I created a simplex mesh, i.e. when I used the TriangleMeshToSimplexMeshFilter. The code of this test is attached.<br>
<br>
Thanks again and best regards,<br>
Benjamin<br>
<br>
Luis Ibanez schrieb:<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>
Hi Benjamin,<br>
<br>
Thanks for sharing the images.<br>
<br>
Please find attached a modified version of the deformable model<br>
example that will read your mask, extract an isosurface from it and<br>
pass the data to the deformable model filter.<br>
<br>
With this code we have reproduced your observation that the<br>
surface doesn't propagate with the current parameters.<br>
<br>
We are now trying with the filter<br>
itkDeformableSimplexMesh3DGradientConstraintForceFilter.h<br>
<br>
which is more commonly used...<br>
<br>
<br>
<br>
Regards,<br>
<br>
<br>
Luis,<br>
<br>
<br>
-----------------------------------------<br></div><div class="im">
On Thu, Aug 13, 2009 at 9:05 AM, Benjamin Klimczak <<a href="mailto:klimczaks@gmx.de" target="_blank">klimczaks@gmx.de</a> <mailto:<a href="mailto:klimczaks@gmx.de" target="_blank">klimczaks@gmx.de</a>>> wrote:<br>
<br>
Hi Luis,<br>
<br>
thank you for the answer and I'm sorry for the late reply.<br>
I tried the suggested values from DeformableModel2.cxx in<br>
DeformableModel1.cxx, but still nothing is changed by the filter.<br>
I have uploaded the data I use here (image and segmentation):<br>
<br>
<a href="http://www.lfb.rwth-aachen.de/public/aorta_img.vtk" target="_blank">http://www.lfb.rwth-aachen.de/public/aorta_img.vtk</a><br>
<a href="http://www.lfb.rwth-aachen.de/public/aorta_seg.vtk" target="_blank">http://www.lfb.rwth-aachen.de/public/aorta_seg.vtk</a><br>
<br>
I'm working with the MITK btw. and have created the segmentation<br>
with its GUI application.<br>
<br>
Any hint why this isn't working would be welcome.<br>
<br>
Thanks a lot,<br>
Benjamin<br>
<br>
<br>
-------- Original-Nachricht --------<br>
> Datum: Sat, 8 Aug 2009 11:13:23 -0400<br>
> Von: Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a><br></div>
<mailto:<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>>><br>
> An: Benjamin Klimczak <<a href="mailto:klimczaks@gmx.de" target="_blank">klimczaks@gmx.de</a> <mailto:<a href="mailto:klimczaks@gmx.de" target="_blank">klimczaks@gmx.de</a>>><br>
> CC: <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a> <mailto:<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>><div class="im"><br>
> Betreff: Re: [Insight-users] DeformableMesh3DFilter example<br>
doesn\'t change input<br>
<br>
> Hi Benjamin,<br>
><br>
> Please look at the suggested values in DeformableModel2.cxx<br>
><br>
> If that still doesn't work for you, we may need to have access to<br>
> the image that you are using to give you more guidance.<br>
><br>
><br>
> Regards,<br>
><br>
><br>
> Luis<br>
><br>
><br>
><br>
-----------------------------------------------------------------------------------------<br>
> On Fri, Aug 7, 2009 at 6:01 AM, Benjamin Klimczak<br></div>
<<a href="mailto:klimczaks@gmx.de" target="_blank">klimczaks@gmx.de</a> <mailto:<a href="mailto:klimczaks@gmx.de" target="_blank">klimczaks@gmx.de</a>>><div class="im"><br>
> wrote:<br>
><br>
> > Hello everybody.<br>
> ><br>
> > I can't get the DeformableMesh3DFilter from the example<br>
> > Examples/Segmentation/DeformableModel1.cxx to change my input<br>
data.<br>
> Input<br>
> > and output mesh are identical. I have tried different input<br>
files and<br>
> > extreme settings of the parameters but nothing seems to work.<br>
> ><br>
> > Thanks for any help.<br>
> ><br>
> > Regards<br>
> > Benjamin<br>
> > --<br>
> > Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla<br>
Firefox 3<br>
> -<br>
> > sicherer, schneller und einfacher!<br>
<a href="http://portal.gmx.net/de/go/atbrowser" target="_blank">http://portal.gmx.net/de/go/atbrowser</a><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>
--<br>
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!<br>
Jetzt freischalten unter <a href="http://portal.gmx.net/de/go/maxdome01" target="_blank">http://portal.gmx.net/de/go/maxdome01</a><br>
<br>
<br>
</div></blockquote>
<br>
<br>void QmitkTestPluginView::testItkDeformableSimplexModel()<br>
{<br>
cout << "Test the deformable simplex model:" << endl;<br>
<br>
const unsigned int Dimension = 3;<br>
typedef double PixelType;<br>
typedef itk::Image<PixelType, Dimension> ImageType;<br>
<br>
typedef itk::Image< unsigned char, Dimension > BinaryImageType;<br>
<br>
typedef itk::Mesh<PixelType, Dimension> MeshType;<br>
typedef itk::SimplexMesh<PixelType, Dimension> SimplexMeshType;<br>
<br>
typedef itk::CovariantVector< double, Dimension > GradientPixelType;<br>
typedef itk::Image< GradientPixelType, Dimension > GradientImageType;<br>
<br>
typedef itk::GradientRecursiveGaussianImageFilter<ImageType, GradientImageType> GradientFilterType;<br>
typedef itk::GradientMagnitudeRecursiveGaussianImageFilter<ImageType,ImageType> GradientMagnitudeFilterType;<br>
<br>
typedef itk::BinaryMask3DMeshSource< BinaryImageType, MeshType > MeshSourceType;<br>
<br>
typedef itk::TriangleMeshToSimplexMeshFilter<MeshType, SimplexMeshType> TriangleToSimplexMeshFilterType;<br>
<br>
typedef itk::DeformableSimplexMesh3DGradientConstraintForceFilter<SimplexMeshType, SimplexMeshType> DeformableModelFilterType;<br>
<br>
typedef itk::ImageFileReader< ImageType > ReaderType;<br>
typedef itk::ImageFileReader< BinaryImageType > BinaryReaderType;<br>
ReaderType::Pointer imageReader = ReaderType::New();<br>
BinaryReaderType::Pointer maskReader = BinaryReaderType::New();<br>
<br>
imageReader->SetFileName( "Y:\\Data\\modified\\im7.vtk" );<br>
maskReader->SetFileName( "Y:\\Data\\modified\\seg.vtk" );<br>
<br>
GradientMagnitudeFilterType::Pointer gradientMagnitudeFilter = GradientMagnitudeFilterType::New();<br>
<br>
gradientMagnitudeFilter->SetInput( imageReader->GetOutput() );<br>
gradientMagnitudeFilter->SetSigma( 1.0 );<br>
<br>
GradientFilterType::Pointer gradientMapFilter = GradientFilterType::New();<br>
gradientMapFilter->SetInput( gradientMagnitudeFilter->GetOutput() );<br>
gradientMapFilter->SetSigma( 1.0 );<br>
<br>
try<br>
{<br>
gradientMapFilter->Update();<br>
}<br>
catch( itk::ExceptionObject & e )<br>
{<br>
std::cerr << "Exception caught while updating gradientMapFilter " << std::endl;<br>
std::cerr << e << std::endl;<br>
return;<br>
}<br>
std::cout << "The gradient map was created!" << std::endl;<br>
<br>
MeshSourceType::Pointer meshSource = MeshSourceType::New();<br>
//BinaryImageType::Pointer mask = maskReader->GetOutput();<br>
meshSource->SetInput( maskReader->GetOutput() );<br>
meshSource->SetObjectValue( 1 );<br>
<br>
std::cout << "Creating mesh..." << std::endl;<br>
try<br>
{<br>
meshSource->Update();<br>
}<br>
catch( itk::ExceptionObject & excep )<br>
{<br>
std::cerr << "Exception caught while creating the start mesh!" << std::endl;<br>
std::cerr << excep << std::endl;<br>
return;<br>
}<br>
<br>
TriangleToSimplexMeshFilterType::Pointer triangleToSimplexFilter = TriangleToSimplexMeshFilterType::New();<br>
triangleToSimplexFilter->SetInput( meshSource->GetOutput() );<br>
<br>
std::cout << "Converting mesh to simplex mesh..." << std::endl;<br>
try<br>
{<br>
triangleToSimplexFilter->Update();<br>
}<br>
catch( itk::ExceptionObject & excep )<br>
{<br>
std::cerr << "Exception caught while converting the start mesh to a simplex mesh!" << std::endl;<br>
std::cerr << excep << std::endl;<br>
return;<br>
}<br>
<br>
DeformableModelFilterType::Pointer deformableModelFilter = DeformableModelFilterType::New();<br>
deformableModelFilter->SetGradient( gradientMapFilter->GetOutput() );<br>
deformableModelFilter->SetInput( triangleToSimplexFilter->GetOutput() );<br>
<br>
std::cout << "Updating the deformable model..." << std::endl;<br>
try<br>
{<br>
deformableModelFilter->Update();<br>
}<br>
catch( itk::ExceptionObject & excep )<br>
{<br>
std::cerr << "Exception caught while updating the deformable model!" << std::endl;<br>
std::cerr << excep << std::endl;<br>
return;<br>
}<br>
std::cout << "Done." << std::endl;<br>
}<br></blockquote></div><br>