[Insight-users] DeformableMesh3DFilter example doesn't change input
Benjamin Klimczak
klimczaks at gmx.de
Tue Aug 18 04:47:18 EDT 2009
Hi Luis,
I have tried your example DeformabelModel4.cxx which uses the DeformableSimplexMesh3DGradientConstraintForceFilter. I had to change line 183 from
deformableModelFilter->SetImage( inputImage );
to
deformableModelFilter->SetImage( imageReader->GetOutput() );
to make it compile otherwise Visual Studio reported the following compiler error:
1>..\..\..\InsightToolkit-3.14.0\Examples\Segmentation\DeformableModel4.cxx(185) : error C2664: 'itk::DeformableSimplexMesh3DGradientConstraintForceFilter<TInputMesh,TOutputMesh>::SetImage': Conversion of parameter 1 from 'itk::SmartPointer<TObjectType>' to 'const itk::DeformableSimplexMesh3DGradientConstraintForceFilter<TInputMesh,TOutputMesh>::OriginalImagePointer' not possible
1> with
1> [
1> TInputMesh=SimplexMeshType,
1> TOutputMesh=SimplexMeshType
1> ]
1> and
1> [
1> TObjectType=const itk::Image<float,3>
1> ]
1> and
1> [
1> TInputMesh=SimplexMeshType,
1> TOutputMesh=SimplexMeshType
1> ]
1> No user-defined conversion-operator found for this conversion or it can't be called.
(this is a translation of the german error message, i.e. probably not the exact english error)
After I changed this line the program compiled but test runs always crashed because of an assertion failure (in Debug mode, in Release it just crashes). I stepped through the code and it seems that the increment of iterator1 in line 335 of itkTriangleMeshToSimplexMeshFilter.txx is the cause of this error. I have attached two screenshots of the assertion failure dialogs (second one appears when I press Ignore the first time).
My usual developement environment is:
Visual Studio 2008, Version 9.0.21022.8 RTM
Windows XP Professional, Version 2002, Service Pack 3
I have just made a quick test with a Debian Linux and it seems like the same Problem appears.
Any ideas? Looks like a problem with either my data or the TriangleMeshToSimplexMeshFilter to me.
Thanks again,
Benjamin
--------------------------------------------------------------------------------------------
Hi Benjamin,
Please find attached the modified DeformableRegistration example
that uses the filter
itkDeformableSimplexMesh3DGradientConstraintForceFilter
This attached file compiles fine.
Regards,
Luis
--------------------------------------------------------------------------------------------
On Sun, Aug 16, 2009 at 8:13 AM, Benjamin Klimczak <klimczaks at gmx.de> wrote:
> Hi Luis,
>
> thanks for looking into my problem.
>
> 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.
>
> Thanks again and best regards,
> Benjamin
>
> Luis Ibanez schrieb:
>
>>
>> Hi Benjamin,
>>
>> Thanks for sharing the images.
>>
>> Please find attached a modified version of the deformable model
>> example that will read your mask, extract an isosurface from it and
>> pass the data to the deformable model filter.
>>
>> With this code we have reproduced your observation that the
>> surface doesn't propagate with the current parameters.
>>
>> We are now trying with the filter
>> itkDeformableSimplexMesh3DGradientConstraintForceFilter.h
>>
>> which is more commonly used...
>>
>>
>>
>> Regards,
>>
>>
>> Luis,
>>
>>
>> -----------------------------------------
>> On Thu, Aug 13, 2009 at 9:05 AM, Benjamin Klimczak <klimczaks at gmx.de<mailto:
>> klimczaks at gmx.de>> wrote:
>>
>> Hi Luis,
>>
>> thank you for the answer and I'm sorry for the late reply.
>> I tried the suggested values from DeformableModel2.cxx in
>> DeformableModel1.cxx, but still nothing is changed by the filter.
>> I have uploaded the data I use here (image and segmentation):
>>
>> http://www.lfb.rwth-aachen.de/public/aorta_img.vtk
>> http://www.lfb.rwth-aachen.de/public/aorta_seg.vtk
>>
>> I'm working with the MITK btw. and have created the segmentation
>> with its GUI application.
>>
>> Any hint why this isn't working would be welcome.
>>
>> Thanks a lot,
>> Benjamin
>>
>>
>> -------- Original-Nachricht --------
>> > Datum: Sat, 8 Aug 2009 11:13:23 -0400
>> > Von: Luis Ibanez <luis.ibanez at kitware.com
>> <mailto:luis.ibanez at kitware.com>>
>> > An: Benjamin Klimczak <klimczaks at gmx.de <mailto:klimczaks at gmx.de>>
>> > CC: insight-users at itk.org <mailto:insight-users at itk.org>
>> > Betreff: Re: [Insight-users] DeformableMesh3DFilter example
>> doesn\'t change input
>>
>> > Hi Benjamin,
>> >
>> > Please look at the suggested values in DeformableModel2.cxx
>> >
>> > If that still doesn't work for you, we may need to have access to
>> > the image that you are using to give you more guidance.
>> >
>> >
>> > Regards,
>> >
>> >
>> > Luis
>> >
>> >
>> >
>>
>>
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_assertion_fail.png
Type: image/png
Size: 8663 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090818/8a8a5b4f/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_assertion_fail2.png
Type: image/png
Size: 8766 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090818/8a8a5b4f/attachment-0003.png>
More information about the Insight-users
mailing list