[Insight-users] Problem relate with deformablemesh3Dfilter.
Samuel Rodríguez Bescos
srodrigu@gbt.tfo.upm.es
Thu, 19 Sep 2002 18:43:19 +0200
Hi Luis,
I think I solved the problem.
I set the Object value of the itkBinary3DMesh source to1 instead 255 and
now this filter generates the mesh.
Now I'm going to conect the output to the deformablemesh3DFilter and I tell
you if It works.
Excuse for my mistake,
Thanks a lot for your time,
Sam
----- Original Message -----
From: "Samuel Rodríguez Bescos" <srodrigu@gbt.tfo.upm.es>
To: "Luis Ibanez" <luis.ibanez@kitware.com>;
<insight-users@public.kitware.com>
Sent: Thursday, September 19, 2002 6:00 PM
Subject: Re: [Insight-users] Problem relate with deformablemesh3Dfilter.
> Hi Luis,
>
> I'm working in Windows.
>
> I think the critical code is the following but I post all the files. I'm
> sorry if It's not totally correct, It's my first version. If you want me
to
> improve the aspect. Tell it to me.
> --------------------------------------------------------------------------
--
> ------------------------
> (....)
> m_stiff[0] = 0.00001;
> m_stiff[1] = 0.04;
> m_scale[0] = 2;
> m_scale[1] = 2;
> m_scale[2] = 2;
>
> (...)
>
>
m_BinaryMask3DMeshSource->SetBinaryImage(m_BinaryErodeImageFilter->GetOutput
> ());
> m_BinaryMask3DMeshSource->SetObjectValue(255); /* I'm not sure the
correct
> value.
> m_BinaryMask3DMeshSource->Update();
>
> m_DeformableMesh3DFilter->SetStiffness(m_stiff);
> m_DeformableMesh3DFilter->SetTimeStep(0.2);
> m_DeformableMesh3DFilter->SetStepThreshold(1);
> m_DeformableMesh3DFilter->SetScale(m_scale);
>
>
m_DeformableMesh3DFilter->SetGradient(m_GradientImageFilter->GetOutput());
>
m_DeformableMesh3DFilter->SetInput(m_BinaryMask3DMeshSource->GetOutput());
> m_DeformableMesh3DFilter->Update();
> ........
>
> Thanks a lot for your help:
>
> ----- Original Message -----
> From: "Luis Ibanez" <luis.ibanez@kitware.com>
> To: "Samuel Rodríguez Bescos" <srodrigu@gbt.tfo.upm.es>
> Cc: <insight-users@public.kitware.com>
> Sent: Thursday, September 19, 2002 5:31 PM
> Subject: Re: [Insight-users] Problem relate with deformablemesh3Dfilter.
>
>
> >
> > Hi Samuel,
> >
> > Could you please post the full piece of code
> > that you are using for your example ?
> >
> > If the problem is an illegal access to memory,
> > it could be related with the initialization of the
> > filters you are using.
> >
> > You may also want to put the Update() call
> > in a try/catch block in case there are exceptions
> > trown. Something like
> >
> > try
> > {
> > m_DeformableMesh3DFilter->Update( );
> > }
> > catch( itk::ExceptionObject & except )
> > {
> > std::cout << except << std::endl;
> > }
> >
> >
> >
> > Are you doing this on windows or unix ?
> >
> >
> > Thanks
> >
> > Luis
> >
> > ================================
> >
> > Samuel Rodríguez Bescos wrote:
> >
> > > Hi everybody,
> > >
> > >
> > >
> > > I'm implementing an example that uses the itkDeformableMesh3DFilter.
> > > I'm using the filter itkBinaryMask3DMeshSource as its input. And as
> > > the gradient image the output of the filter itkGradientImageFilter of
> > > the initial image.
> > >
> > > The problem is than when I run the program , there is an error
> > > of access violation in the line:
> > >
> > >
> > >
> > > m_DeformableMesh3DFilter->Update( );
> > >
> > >
> > >
> > > I thought that the problem is related with the BinaryMeshSource and I
> > > tried to visualizate its output but I couldn't. I think that the
> > > problem is in the parameters of it.
> > >
> > >
> > >
> > > I use as input of the BinaryMeshSource a binary Image with 1 at the
> > > pixels of the object and 0 at the background and I set the Object
> > > Value to 1.
> > >
> > >
> > >
> > > Could anybody the poblem?. I don't know if the parameters and the
> > > inputs are right or I have forgotten something.
> > >
> > >
> > >
> > > Thanks in advance,
> > >
> > >
> > >
> > > Samuel
> > >
> >
>