<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [Insight-users] modify transformation parameters by usingitkBSplineDeformableTransform</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<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: vincent-magnotta@uiowa.edu<BR>
Phone: 319-356-8255 Fax: 319-353-6275<BR>
Website: <A HREF="http://www.radiology.uiowa.edu">http://www.radiology.uiowa.edu</A><BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: insight-users-bounces@itk.org on behalf of Xi Liang<BR>
Sent: Sun 5/9/2010 7:50 PM<BR>
To: Luis Ibanez<BR>
Cc: insight-users@itk.org<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">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>
&nbsp;&nbsp; a Translation (or Rigid) transform in some regions and<BR>
&nbsp;&nbsp; as Deformable in others, there are better ways of<BR>
&nbsp;&nbsp; implementing such class, than fiddling with the parameters<BR>
&nbsp;&nbsp; of the BSplineDeformable transfrom.<BR>
<BR>
On 10 May 2010 07:50, Luis Ibanez &lt;luis.ibanez@kitware.com&gt; wrote:<BR>
<BR>
&gt; Hi Xi,<BR>
&gt;<BR>
&gt;<BR>
&gt; 1) If you want to implement a Transform that behaves as<BR>
&gt;&nbsp;&nbsp;&nbsp; a Translation (or Rigid) transform in some regions and<BR>
&gt;&nbsp;&nbsp;&nbsp; as Deformable in others, there are better ways of<BR>
&gt;&nbsp;&nbsp;&nbsp; implementing such class, than fiddling with the parameters<BR>
&gt;&nbsp;&nbsp;&nbsp; of the BSplineDeformable transfrom.<BR>
&gt;<BR>
&gt; 2) But, just to answer your question. The parameter array<BR>
&gt;&nbsp;&nbsp;&nbsp; of the BSpline transform has the components of the<BR>
&gt;&nbsp;&nbsp;&nbsp; deformation vectors at every node of the BSpline grid.<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp; Given a BSpline grid with N nodes in 3D, you will have<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 x N&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parameters<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp; and they are arranged as:<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X1,X2,X3....... Xn,&nbsp; Y1,Y2,Y3.....YN,...Z1, Z2, Z3,... ZN<BR>
&gt;<BR>
&gt;<BR>
&gt; 3) You can change those parameters manually.<BR>
&gt;&nbsp;&nbsp;&nbsp; Simply have to figure out which BSpline nodes<BR>
&gt;&nbsp;&nbsp;&nbsp; are on top of the regions for which you want to<BR>
&gt;&nbsp;&nbsp;&nbsp; allow only Translations, and change those<BR>
&gt;&nbsp;&nbsp;&nbsp; accordingly.<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp; Regards,<BR>
&gt;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Luis<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; ---------------------------------------------<BR>
&gt; On Wed, May 5, 2010 at 6:58 AM, Xi Liang &lt;liangxi1986317@hotmail.com&gt;<BR>
&gt; wrote:<BR>
&gt; &gt; Dear all,<BR>
&gt; &gt; I want to change the some control point parameters got by running<BR>
&gt; &gt; registration by using itkBSplineDeformableTransform.h. The reason is to<BR>
&gt; &gt; manually modify a set of control points such that only translation is<BR>
&gt; &gt; applied on the corresponding regions. The question I would like to ask is<BR>
&gt; &gt; whether this should be done manually, or we have a filter to change those<BR>
&gt; &gt; parameters?<BR>
&gt; &gt; If I have to do this manually, I will have to understand of the format of<BR>
&gt; &gt; parameters. I understand the number of parameters get<BR>
&gt; &gt; from itkBSplineDeformableTransform is ImageDimension *<BR>
&gt; &gt; (numberOfGridNodesInOneDimension + BsplineOrder). Which value is for<BR>
&gt; &gt; lower/upper borders, and which are for nodes? I think I will only need to<BR>
&gt; &gt; modify the node values to enforce the translation transformations.<BR>
&gt; &gt; This method is introduced by Tanner in Volume and Shape Preservation of<BR>
&gt; &gt; Enhancing Lesions when applying nonrigid registration to a time series of<BR>
&gt; &gt; contrast enhancing MR breast Images. It couples the control points of a<BR>
&gt; &gt; bspline deformation to enforce rigidity on certain structures.<BR>
&gt; &gt; Kind regards,<BR>
&gt; &gt; Xi<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt; _____________________________________<BR>
&gt; &gt; Powered by www.kitware.com<BR>
&gt; &gt;<BR>
&gt; &gt; Visit other Kitware open-source projects at<BR>
&gt; &gt; <A HREF="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>
&gt; &gt;<BR>
&gt; &gt; Kitware offers ITK Training Courses, for more information visit:<BR>
&gt; &gt; <A HREF="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</A><BR>
&gt; &gt;<BR>
&gt; &gt; Please keep messages on-topic and check the ITK FAQ at:<BR>
&gt; &gt; <A HREF="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</A><BR>
&gt; &gt;<BR>
&gt; &gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; &gt; <A HREF="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt;<BR>
&gt;<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>