[Insight-users] I need help please!! DeformableMesh3DFilter

Ting Chen chenting@graphics.cis.upenn.edu
Sun, 12 Jan 2003 14:23:47 -0500


HI! Waltraut,

There are some major change in itkDeformableTest in the past few weeks.

1. the itkdeformable3Dmeshfilter no longer support balloon force (I may add
the balloon force in again some time later), so there is no need for the
m_Center parameters anymore. Now the model is driven by the gradient force
derived from the original image. We are using marhcing cubes method to
create the initial deformable mesh. However, it is possible that the mesh
and gradient is of different size. ng
For example, when we segment a 100 by 100 image. before we calculate the
gradient map, we shrink it with the scale (2, 2) to reduce the processing
time, the reuslt gradient map is of the size 50 by 50 now. and the
deformable mesh is still created based on the binary mask in a 100 by 100
image. so now we need a (0.5, 0.5) m_scale to make the mesh and gradient map
work together.

2. a itk2DDeformabletest is added in itk, which shows how to use
itkspheresource and itkballoonforcefilters in 2D, however, by making some
modifications it can be converted into 3D. if you like, I can also do the
work for you.

please contact me if there are further questions

ting


----- Original Message -----
From: "Waltraud Henrich" <henrich@ira.uka.de>
To: "'Ting Chen '" <chenting@graphics.cis.upenn.edu>
Cc: <insight-users@public.kitware.com>
Sent: Sunday, January 12, 2003 6:02 AM
Subject: AW: [Insight-users] I need help please!! DeformableMesh3DFilter


>
>
> Hallo
>
>
> I have recognized that if i add SetScale() then I get a sphere. But the
> speher is allways the same wherever I click on the image. When I click on
> the image I get my x,y,z coordinates for my SetCenter(x,y,z).
> I unterstood it like this: that when I click on the image the sphere
begins
> to grow biginning from that point up to the gradient image. Is that right?
> I have noticed that m_Center appeared in the old version of
> itkDeformableMesh3DFilter.txx that is:
> m_ObjectLabel = m_Potential->GetPixel(m_Center)
> but it doesen't appear at all in the new Version. Why?
> But in the new Version m_Scale appears not so in the old version.
> My last version is from 28.11.2002.
>
>  Thanks a lot.
>
>  Waltraut Henrich
>
> -----Originalnachricht-----
> Von: Ting Chen
> An: Waltraud Henrich
> Gesendet: 09.01.03 22:02
> Betreff: Re: [Insight-users] I need help please!! DeformableMesh3DFilter
>
> Hi! I write the code for deformable 3D mesh. I checked the code after
> reviewing your last email.
>
> I checked in a new version of itkDeformableTest and
> itkedeformable3Dmeshfilter on 12/19 to fix some possible bugs. I am
> sorry it
> did not solve your problem.
> the fact that I did not develope an itk2vtk application make it
> difficult
> for me to understand what could be the possible problems.
> I will try explain the code as clear as possible to help you to search
> for
> the problems.
>
>
> ----- Original Message -----
> From: "Waltraud Henrich" <henrich@ira.uka.de>
> To: <insight-users@public.kitware.com>
> Sent: Thursday, January 09, 2003 5:31 AM
> Subject: [Insight-users] I need help please!! DeformableMesh3DFilter
>
>
> >
> > Hallo,
> >
> > at 16 December I had written my problem in the mailing list.
> Unfortunately
> > I received still no answer and I did not repair the problem .
> > I have a newer version of ITK and I  downloaded InsightToolkit-1.0.0
> to
> > 28.11.2002.
> > Where can I look for the errors?
> > What are the meaning of the parameters: Stiffness, Scale,Time Step and
> Step
> > Threshold in the  ItkDeformableMesh3DFilter?
> stiffness help to set the stiffness on the deformable surface.
> the scale factors are used to make the deformable mesh with with
> gradient
> maps of different size.
>
> the time step control the magnitude of deformation in each iteration.
> the
> step threshold define however steps is need to stop the filter. I am not
> sure if this parameter is still in the newest version of itk.
> one anothere thing is that I notice you are using a setcenter function,
> which are not included in 12/19's update. i am not sure what could be
> the
> problem, did you use cvs to update the code from time to time?
>
> hope to talk with more about the existing problems. thanks for your
> efforts.
>
>
> ting
>
>
>
> > In the example itkDeformableTest.cxx it does not use these parameters.
> Why?
> they ARE used in itkdeformabletest, I checked in a new verion of
> itkdeformabletest on 12/19 and I used all theses parameter there.
>
>
> > Is sufficient in such a way?
> > I have tried it also without these parameters and it  does not go.
> >  I tried with this parameter:
> >
> >
> > double m_stiff[2];
> > m_stiff[0]=0.001;
> > m_stiff[1]=0.04;
> >
> > myIndexType m_center={{SEEDX, SEEDY, SEEDZ}};
> >
> > Deformable3DFilterType::Pointer m_bfilter =
> > Deformable3DFilterType::New();
> >
> > m_bfilter->SetCenter(m_center);
> > m_bfilter->SetStiffness(m_stiff);
> > m_bfilter->SetTimeStep(0.001);
> > m_bfilter->SetStepThreshold(20);
> > m_bfilter->SetGradient(gradient->GetOutput());
> > m_bfilter->SetInput(m_spheresource->GetOutput());
> > m_bfilter->SetInput(initmesh);
> > m_bfilter->Update();
> >
> > The mail from 16.12 was:
> > "
> > 1) I work with itkDeformableMesh3DFilter and now I get the
> OutputWindow.
> >
> > Debug: In
> >
> d:\programme\development\insighttoolkit-1.0.0\code\common\itkpointset.tx
> x,
> > line 74
> > Mesh (088D9178): returning Points container of VectorContainer
> (013B4AA8)
> >   Reference Count: 2
> >   Modified Time: 9838
> >   Debug: Off
> >   Observers:
> >     none
> >
> >
> >
> > Debug: In
> >
> D:\Programme\Development\InsightToolkit-1.0.0\Code\Common\itkDataObject.
> cxx,
> > line 239
> > Mesh (088D9178): disconnecting source  088D7D98, source output index 0
> >
> > Debug: In
> >
> D:\Programme\Development\InsightToolkit-1.0.0\Code\Common\itkObject.cxx,
> > line 288
> > Mesh (088D9178): UnRegistered, ReferenceCount = 0
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1061
> > Mesh (088D9178): Mesh Destructor
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1078
> > Mesh (088D9178): Mesh  ReleaseCellsMemory method
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1104
> > Mesh (088D9178): m_CellsContainer->GetReferenceCount()= 1
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1149
> > Mesh (088D9178): CellsAllocatedDynamicallyCellByCell
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1168
> > Mesh (088D9178): Mesh  ReleaseBoundariesMemory method
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1195
> > Mesh (088D9178): Mesh  ReleaseBoundariesMemory(unsigned int) method
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1286
> > Mesh (088D9178): Boundaries already deleted.
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1195
> > Mesh (088D9178): Mesh  ReleaseBoundariesMemory(unsigned int) method
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1286
> > Mesh (088D9178): Boundaries already deleted.
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1195
> > Mesh (088D9178): Mesh  ReleaseBoundariesMemory(unsigned int) method
> >
> > Debug: In
> > d:\programme\development\insighttoolkit-1.0.0\code\common\itkmesh.txx,
> line
> > 1286
> > Mesh (088D9178): Boundaries already deleted.
> >
> > Debug: In
> >
> D:\Programme\Development\InsightToolkit-1.0.0\Code\Common\itkObject.cxx,
> > line 447
> > Object (088D9178): Destructing!
> >
> >
> > 2) When I save vtkUnstructuredGrid in a file and when I look this file
> I
> get
> > following:
> >
> > # vtk DataFile Version 3.0
> > vtk output
> > ASCII
> > DATASET UNSTRUCTURED_GRID
> > POINTS 402 float
> > -1.#INF -1.#INF 1.#INF -1.#INF -1.#INF 1.#INF -1.#INF -1.#INF 1.#INF
> > -1.#INF -1.#INF 1.#INF -1.#INF -1.#INF 1.#INF -1.#INF -1.#INF 1.#INF
> > -1.#INF -1.#INF 1.#INF -1.#INF -1.#INF 1.#INF -1.#INF -1.#INF 1.#INF
> > -1.#INF -1.#INF 1.#INF -1.#INF -1.#INF 1.#INF -1.#INF -1.#INF 1.#INF
> > -1.#INF -1.#INF 1.#INF -1.#INF -1.#INF 1.#IN.......etc
> >
> > My problem is that in vtk2itkDouble.cxx this coordinates are #INF..
> >
> > pcoordinates[0] = pp[0];
> > pcoordinates[1] = pp[1];
> > pcoordinates[2] = pp[2];
> >
> > Can you tell me where the problem is?
> >
> > 3) I can disply my SphereSource with vtk2itkDouble. The coordinates
> are OK
> > here."
> >
> > Thanks a lot.
> >
> > Waltraut Henrich
> >
> >
> >
> >
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users@public.kitware.com
> > http://public.kitware.com/mailman/listinfo/insight-users
> >
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users