[clitk-commits-list] Clitk branch master updated. v1.2.0-728-gc94c334
root
root at tux.creatis.insa-lyon.fr
Tue Feb 28 10:47:48 CET 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Clitk".
The branch, master has been updated
via c94c334d5e6dfc9f21b545344627b63f02669751 (commit)
from 6fbc5b0555a148aed6478cfd1ea7593f32f5dd3c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.creatis.insa-lyon.fr/pubgit/?p=clitk.git;a=commitdiff;h=c94c334d5e6dfc9f21b545344627b63f02669751
commit c94c334d5e6dfc9f21b545344627b63f02669751
Author: Romulo Pinho <romulo.pinho at lyon.unicancer.fr>
Date: Tue Feb 28 10:47:09 2012 +0100
added initial image centralization to BLUTDIR
diff --git a/registration/clitkBLUTDIRGenericFilter.cxx b/registration/clitkBLUTDIRGenericFilter.cxx
index ca10c2d..9f808e7 100644
--- a/registration/clitkBLUTDIRGenericFilter.cxx
+++ b/registration/clitkBLUTDIRGenericFilter.cxx
@@ -29,7 +29,8 @@ It is distributed under dual licence
#include "clitkBLUTDIRGenericFilter.h"
#include "clitkBLUTDIRCommandIterationUpdateDVF.h"
-
+#include "itkCenteredTransformInitializer.h"
+
namespace clitk
{
@@ -495,6 +496,20 @@ namespace clitk
itk::Vector<double,3> finalTranslation = clitk::GetTranslationPartMatrix3D(rigidTransformMatrix);
rigidTransform->SetTranslation(finalTranslation);
}
+ else
+ {
+ if(m_Verbose) std::cout<<"No itinial matrix given. Centering all images..."<<std::endl;
+
+ rigidTransform=RigidTransformType::New();
+
+ typedef itk::CenteredTransformInitializer<RigidTransformType, FixedImageType, MovingImageType > TransformInitializerType;
+ typename TransformInitializerType::Pointer initializer = TransformInitializerType::New();
+ initializer->SetTransform( rigidTransform );
+ initializer->SetFixedImage( fixedImage );
+ initializer->SetMovingImage( movingImage );
+ initializer->GeometryOn();
+ initializer->InitializeTransform();
+ }
//=======================================================
-----------------------------------------------------------------------
Summary of changes:
registration/clitkBLUTDIRGenericFilter.cxx | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
hooks/post-receive
--
Clitk
More information about the Clitk-commits-list
mailing list