[Insight-users] bug in DeformableModelSimplexMesh ?
Dženan Zukić
dzenanz at gmail.com
Tue Jul 27 11:50:25 EDT 2010
Hi Jan,
if you think the bug 10447 should be closed as invalid, I can do it.
However, I had a problem with this example (bug 10799), which occurs only on
x64 architecture.
Regards,
Dženan
On Tue, Jul 27, 2010 at 17:38, <J.Menssen at cukz.umcn.nl> wrote:
> Dear Dan
>
> Thank you for your suggestions
>
> I agree with you to add an example that reproduces the issue. It was my
> intention to add the modified
> DeformableModelApplication.cxx file from the InsightApplications example
> "DeformableModelSimplexMesh" but I didn't know it was possible to include an
> attached file
> Therefore I described the changes to the original file, because the problem
> arises in a standard Insight Applications example/program, I hoped this was
> clear enough.
> Now I attached the modified "DeformableModelApplication", replacing the
> original with this modified on should reproduce the problem. (Lines 528-527
> are modified, comments are added)
> I also include the CmakeList.txt file, however it is the standard one
> generated for this standard ÏnsightApplications example
> "DeformableSimplexMesh. Also all other code in this examples is used
> unmodified.
>
> Indeed this described issue is related to bug 10447. However I posted bug
> 10447 some months ago. Now I'm not sure anymore my suggested solution of
> that bug is right.
>
> The "map/set iterator not dereferencable" occurs in
> iktMapContainer::GetElement. Checking m_SimplexMesh (of simplexMesh2)just
> before the crash shows that m_Geometry data has no elements. Maybe this is
> due to the fact it’s dereferences (unregistered) somewhere. Copying the
> m_Geometry data maybe the solution
>
> Due to the fact bug 10447 is still unassigned, and maybe the suggestion
> solution in that posted bug is not the correct one, I reported a new bug
> (11017) with a more general description.
>
> I hope the bug will be assigned and solved
>
> Thank you again for your suggestion, maybe this will help to solve my
> problem
>
> Kind regards
>
> Jan
>
>
> -----Original Message-----
> From: Dan Mueller [mailto:dan.muel at gmail.com]
> Sent: dinsdag 27 juli 2010 16:21
> To: Menssen, Jan
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] bug in DeformableModelSimplexMesh ?
>
> Hi Jan,
>
> A suggestion: in general, community which monitors this list is very
> helpful, but also very busy. If you want your problem resolved you
> have to make it as easy as possible for someone to (1) understand the
> problem, (2) reproduce the problem.
>
> The best way to achieve this is to provide a minimal example which
> reproduces the issue: a CMakeLists.txt and single C++ source file.
>
> In my own experience, the very act of preparing such an example can
> sometimes reveal the issue!
>
> Suggestion aside: do you think the issue you describe could be related
> to bug 10447 you previously submitted? It sounds similar...
> http://public.kitware.com/Bug/view.php?id=10447
>
> Cheers, Dan
>
> On 27 July 2010 14:37, <J.Menssen at cukz.umcn.nl> wrote:
> > Dear Dzenan
> >
> >
> >
> > As you proposed in your mail, we created an unnamed block and created a
> new
> > deform filter from scratch
> >
> > We instantiate the filter and set all parameters
> >
> >
> >
> > However, this modification results in the same error message as described
> > below
> >
> > So our problem is not yet solved
> >
> >
> >
> > Thank you for your time, kind regards
> >
> >
> >
> > Jan Menssen
> >
> >
> >
> > From: Dženan Zukić [mailto:dzenanz at gmail.com]
> > Sent: donderdag 22 juli 2010 14:56
> > To: Menssen, Jan
> > Cc: insight-users at itk.org; Nillesen, Maartje
> > Subject: Re: [Insight-users] bug in DeformableModelSimplexMesh ?
> >
> >
> >
> > I discovered few weeks back, that you cannot just change input mesh for
> > deform filter, that is
> >
> > m_DeformFilter->SetInput(m_SimplexMesh);
> >
> > this line is a problem. The workaround I used was to create unnamed block
> > and create a new deform filter from scratch (instantiate filter and set a
> > bunch of parameters) instead of just setting setting input mesh and
> calling
> > update.
> >
> >
> >
> > Regards,
> >
> > Dženan
> >
> >
> >
> > On Wed, Jul 21, 2010 at 11:37, <J.Menssen at cukz.umcn.nl> wrote:
> >
> > Dear All
> >
> > We are working on a segmentation algorithm using deformable models with a
> > refine mesh. The deformation and refinement is done in a for loop. Our
> > application is based on the DeformableModel application as given in the
> > InsightApplications example DeformableModelSimplexMesh.
> >
> > We modified the for loop in de DeformMesh method
> > (DeformableModelApplication.cxx) with a refinement of the mesh, but this
> > crashes. Below a part of (pseudo) code is given..
> >
> > for i=1:i<nr_iterations;i++
> >
> > {
> >
> > m_simplexMesh->DisconnectPipeline()
> >
> > m_deformFilter-SetInput(m_simplexMesh);
> >
> > m_deformFilter->Update(0;
> >
> > simplexMesh2 = m_deformFilter->GetOutput();
> >
> >
> >
> > m_refineMesh->SetInput(simplexMesh2);
> >
> > m_refineMesh->Update();
> >
> > m_simplexMesh=m_refineMesh->GetOutput();
> >
> > }
> >
> > m_deformFilter is a DeformableSimplexMesh3DGradientConstraintForceFilter,
> >
> > m_RefineMesh is a itkSimplexMeshAdaptTopologyFilter
> >
> >
> >
> > To isolate the bug, we started with a little modification of the
> DeformMesh
> > method in DeformableModelApplication.cxx. The modifications are given
> below
> > (line 522 in original file, InsightApplciations 3.16). Running this code
> > results also in a crash
> >
> >
> *----------------------------------------------------------------------------------------------------------------------------------------
> >
> > SimplexMeshType::Pointer simplexMesh2 = m_SimplexMesh;
> >
> > const unsigned int numberOfIterationsToGo =
> > atoi(m_IterationsValueInput->value());
> >
> > for( unsigned int i=0; i<numberOfIterationsToGo; i++ )
> >
> > {
> >
> > std::cout << " Iteration " << i << std::endl;
> >
> >
> >
> > //* -------------- start modified code
> > -------------------------------------------
> >
> > // THIS IS MODIFIED CODE THAT (WE THINK) DOESN'T VIOLATE THE ITK
> > RULES BUT THIS
> >
> > // CODE CRASHES
> >
> > m_SimplexMesh->DisconnectPipeline();
> >
> > m_DeformFilter->SetInput(m_SimplexMesh);
> >
> > m_DeformFilter->SetIterations(1);
> >
> > m_DeformFilter->Update();
> >
> > simplexMesh2 = m_DeformFilter->GetOutput();
> >
> > SimplexMesh2->DisconnectPipeline(0
> >
> > m_DeformFilter->SetInput(simplexMesh2);
> >
> > m_DeformFilter->SetIterations(1);
> >
> > m_DeformFilter->Update();
> >
> > m_SimplexMesh = m_DeformFilter->GetOutput();
> >
> > // --------------------- end modified code
> > -------------------------------------- */
> >
> > m_SimplexMeshToShow = m_SimplexMesh;
> >
> > this->RefreshMeshVisualization();
> >
> >
> >
> > // force a redraw
> >
> > axialView->redraw();
> >
> > coronalView->redraw();
> >
> > sagittalView->redraw();
> >
> > surfaceView->redraw();
> >
> > Fl::check();
> >
> > }
> >
> >
> *-------------------------------------------------------------------------------------------------------------------------------------------
> >
> > Error message (using Visual Studio 2005 and/or 2008) of the crash
> >
> > Debug Assertion Failed !
> >
> > Expression map/set iterator not dereferencable
> >
> > Do we something wrong? Using a for loop in a pipeline is dangerous but
> in
> > bug 0001080, we read it’s possible to use a for loop. Also at the Old
> Nabble
> > forum I read a message that is must be possible to use a for loop.
> > (
> http://old.nabble.com/Using-image-iterators-combined-with-filters-in-a-loop-td28684443.html
> )
> >
> > Even if we changed the code in the original example
> > DeformableModelApplication according to the above referenced Old Nabble
> > article the application crashes (see below)
> >
> >
> >
> > m_DeformFilter->SetInput( m_SimplexMesh );
> >
> > m_DeformFilter->SetIterations(1);
> >
> > m_DeformFilter->Update();
> >
> > m_SimplexMesh = m_DeformFilter->GetOutput();
> >
> > m_SimplexMesh->DisconnectPipeline();
> >
> > So is there a bug in the original ITK sources? As far as we now, ITK
> doesn’t
> > allow to change the input of a filter and we think this is what happened
> in
> > the original DeformableSimplexMesh application.
> >
> > Can someone help us with our problem ?
> >
> > We tested with ITK 2.8, ITK 3.16 and 3.18 and all crashes
> >
> > Jan Menssen
> > Research assistant
> >
> > Radboud University Nijmegen Medical Centre
> > Clinical Physics Lab - Peadiatrics
> > Huispost 833, route 833
> > P.O box 9101
> > 6500 HB Nijmegen
> > Telefoon: +31 24 36 19063
> > E-mail J.Menssen at cukz.umcn.nl
> >
> > http://www.umcn.nl
> >
> > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het
> > handelsregister onder nummer 41055629.
> > The Radboud University Nijmegen Medical Centre is listed in the
> Commercial
> > Register of the Chamber of Commerce under file number 41055629.
> >
> > _____________________________________
> > 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.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
> >
> > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het
> > handelsregister onder nummer 41055629.
> > The Radboud University Nijmegen Medical Centre is listed in the
> Commercial
> > Register of the Chamber of Commerce under file number 41055629.
> >
> > _____________________________________
> > 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.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
>
>
> Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het
> handelsregister onder nummer 41055629.
> The Radboud University Nijmegen Medical Centre is listed in the Commercial
> Register of the Chamber of Commerce under file number 41055629.
>
> _____________________________________
> 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.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100727/723c8923/attachment-0001.htm>
More information about the Insight-users
mailing list