[Insight-users] 转发: [Insight-users] Question About Def
ormableMesh3dFilter
zhao yong qiang
zhao-yq at cs.sjtu.edu.cn
Tue, 16 Mar 2004 09:35:58 +0800
-----邮件原件-----
发件人: Zhao yongqiang [mailto:zhao-yq at cs.sjtu.edu.cn]
发送时间: 2004年3月15日 22:09
收件人: 'Luis Ibanez'
主题: 答复: [Insight-users] Question About DeformableMesh3dFilter
Hi Luis,
1. Can you give me an example of the clean algorithm or some detail
of the algorithm?
2. I read the example you told me, but I don’t catch what you want
to tell me.
Best Regards!!!
-----邮件原件-----
发件人: Luis Ibanez [mailto:luis.ibanez at kitware.com]
发送时间: 2004年3月12日 22:07
收件人: zhao yong qiang
抄送: insight-users at itk.org
主题: Re: [Insight-users] Question About DeformableMesh3dFilter
Hi Zhao,
The BinaryMask3DMeshSource class produces Meshes that
are not well adapted for deformable models because
they have large numbers of triangles that thin-edge
shaped.
You may have to run a cleaning algorithm on the Mesh
before using it as initialization for the deformable
model filter.
For an alternatgive approach, please look at the new
example under:
Insight/Examples/Registration/
DeformableRegistration2.cxx
Regards,
Luis
-----------------------
zhao yong qiang wrote:
> Hi all,
>
> I wrote the following code:
>
>
>
> m_stiff[0] = 0.00001;
>
> m_stiff[1] = 0.04;
>
> m_scale[0] = 1;
>
> m_scale[1] = 1;
>
> m_scale[2] = 1;
>
>
>
>
m_BinaryMask3DMeshSource->SetBinaryImage(m_CastImageFilter->GetOutput())
;
>
> m_BinaryMask3DMeshSource->SetObjectValue(200);
>
>
>
> m_GradientMapFilter->SetInput(gradientMagnitudeFilter->GetOutput());
>
> m_GradientMapFilter->SetSigma(1.0);
>
> m_GradientMapFilter->Update();
>
>
>
> m_DeformableMesh3DFilter->SetStiffness(m_stiff);
>
> m_DeformableMesh3DFilter->SetTimeStep(0.2);
>
> m_DeformableMesh3DFilter->SetStepThreshold(10);
>
> m_DeformableMesh3DFilter->SetScale(m_scale);
>
> m_DeformableMesh3DFilter->SetGradientMagnitude(0.8);
>
>
>
>
m_DeformableMesh3DFilter->SetGradient(m_GradientMapFilter->GetOutput());
>
>
m_DeformableMesh3DFilter->SetInput(m_BinaryMask3DMeshSource->GetOutput()
);
>
>
>
> try
>
> {
>
> m_DeformableMesh3DFilter->Update();//At this point, access
> violation
>
> }
>
> catch(itk::ExceptionObject & excep)
>
> {
>
> std::cerr << "Exception Caught!"<<std::endl;
>
> }
>
>
>
> I use try/catch, but I can not catch the exception, just access
> violation when m_DeformableMesh3Dfilter->Update()..
>
> Can some give me a hand?
>
> Thanks a lot!!!
>
> Regards,
> Zhao Yongqiang
> Dept. of Computer Science & Engineering
> Shanghai JiaoTong University
> Shanghai, China
> zhao-yq at cs.sjtu.edu.cn
> <mailto:zhao-yq at cs.sjtu.edu.cn>
>
>
>