Thank you for all your comments. I have finished writing this piece of code, most of them are from this. <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><a href="http://elastix.isi.uu.nl/doxygen/a00228.html" target="_blank" style="color: rgb(42, 93, 176); ">http://elastix.isi.uu.nl/doxygen/a00228.html</a></span><br>
<br><div class="gmail_quote">On 11 May 2010 10:26, Magnotta, Vincent A <span dir="ltr"><<a href="mailto:vincent-magnotta@uiowa.edu">vincent-magnotta@uiowa.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
<p><font size="2">Xi,<br>
<br>
I would think that this would be easier to implement using a ThinPlateSpline Transform.<br>
<br>
Vince<br>
<br>
<br>
----------------------<br>
Associate Professor<br>
Department of Radiology<br>
0453-D JCP<br>
200 Hawkins Drive<br>
Iowa City, IA 52242<br>
E-mail: <a href="mailto:vincent-magnotta@uiowa.edu" target="_blank">vincent-magnotta@uiowa.edu</a><br>
Phone: 319-356-8255 Fax: 319-353-6275<br>
Website: <a href="http://www.radiology.uiowa.edu" target="_blank">http://www.radiology.uiowa.edu</a></font></p><font size="2"><div><div></div><div class="h5"><br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:insight-users-bounces@itk.org" target="_blank">insight-users-bounces@itk.org</a> on behalf of Xi Liang<br>
Sent: Sun 5/9/2010 7:50 PM<br>
To: Luis Ibanez<br>
Cc: <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>
Subject: Re: [Insight-users] modify transformation parameters by usingitkBSplineDeformableTransform<br>
<br>
Hi Luis,<br>
<br>
Thank you for the response. I think I did not make my question clear, and<br>
the following is the purpose to write the code.<br>
<br>
My goal is not to create a Transform filter to be used in a registration. I<br>
want to create a simulated motion (include nonrigid and rigid deformations).<br>
I have a random nonrigid bspline deformation transformation parameters (can<br>
be easily get the corresponding deformation field), and a segment mask<br>
image. These two are my input. I want the output to be a nonrigid<br>
deformation field. This generated deformation field will be used on a image<br>
that has nonrigid and rigid structures, where the rigid area is the same as<br>
the input segment mask. Therefore I need to either modify the transformation<br>
parameters, or the corresponding deformation field to achieve a partial<br>
rigid deformations.<br>
<br>
I am currently modifying a filter based on<br>
<a href="http://elastix.isi.uu.nl/doxygen/a00228.html" target="_blank">http://elastix.isi.uu.nl/doxygen/a00228.html</a>. I am reading the ITK software<br>
guide and try to understand how it works. The author Marius Staring told me<br>
It can be easily modified to fill my need -- assigning a subset of a<br>
deformation field with its mean value.<br>
<br>
Luis, you suggest that there are better ways to implement a Transform that<br>
behaved as a Translation (or rigid) transformation in some regions and as<br>
Deformable in others. What is that? Is that similar to the above method? to<br>
modify the deformation field. Or you suggest a different scheme?<br>
<br>
<br>
1) If you want to implement a Transform that behaves as<br>
a Translation (or Rigid) transform in some regions and<br>
as Deformable in others, there are better ways of<br>
implementing such class, than fiddling with the parameters<br>
of the BSplineDeformable transfrom.<br>
<br>
On 10 May 2010 07:50, Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>> wrote:<br>
<br>
> Hi Xi,<br>
><br>
><br>
> 1) If you want to implement a Transform that behaves as<br>
> a Translation (or Rigid) transform in some regions and<br>
> as Deformable in others, there are better ways of<br>
> implementing such class, than fiddling with the parameters<br>
> of the BSplineDeformable transfrom.<br>
><br>
> 2) But, just to answer your question. The parameter array<br>
> of the BSpline transform has the components of the<br>
> deformation vectors at every node of the BSpline grid.<br>
><br>
> Given a BSpline grid with N nodes in 3D, you will have<br>
><br>
> 3 x N parameters<br>
><br>
> and they are arranged as:<br>
><br>
> X1,X2,X3....... Xn, Y1,Y2,Y3.....YN,...Z1, Z2, Z3,... ZN<br>
><br>
><br>
> 3) You can change those parameters manually.<br>
> Simply have to figure out which BSpline nodes<br>
> are on top of the regions for which you want to<br>
> allow only Translations, and change those<br>
> accordingly.<br>
><br>
><br>
><br>
><br>
> Regards,<br>
><br>
><br>
> Luis<br>
><br>
><br>
><br>
> ---------------------------------------------<br>
> On Wed, May 5, 2010 at 6:58 AM, Xi Liang <<a href="mailto:liangxi1986317@hotmail.com" target="_blank">liangxi1986317@hotmail.com</a>><br>
> wrote:<br>
> > Dear all,<br>
> > I want to change the some control point parameters got by running<br>
> > registration by using itkBSplineDeformableTransform.h. The reason is to<br>
> > manually modify a set of control points such that only translation is<br>
> > applied on the corresponding regions. The question I would like to ask is<br>
> > whether this should be done manually, or we have a filter to change those<br>
> > parameters?<br>
> > If I have to do this manually, I will have to understand of the format of<br>
> > parameters. I understand the number of parameters get<br>
> > from itkBSplineDeformableTransform is ImageDimension *<br>
> > (numberOfGridNodesInOneDimension + BsplineOrder). Which value is for<br>
> > lower/upper borders, and which are for nodes? I think I will only need to<br>
> > modify the node values to enforce the translation transformations.<br>
> > This method is introduced by Tanner in Volume and Shape Preservation of<br>
> > Enhancing Lesions when applying nonrigid registration to a time series of<br>
> > contrast enhancing MR breast Images. It couples the control points of a<br>
> > bspline deformation to enforce rigidity on certain structures.<br>
> > Kind regards,<br>
> > Xi<br>
> ><br>
> ><br>
> > _____________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Kitware offers ITK Training Courses, for more information visit:<br>
> > <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
> ><br>
> > Please keep messages on-topic and check the ITK FAQ at:<br>
> > <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
> ><br>
> ><br>
><br>
><br>
<br>
</div></div></font>
<p></p>
</div>
</blockquote></div><br>