X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=registration%2FclitkBLUTDIRGenericFilter.cxx;h=15afacf1b475b6f734bee22854a01dc6d6625ae8;hb=f3c961676689a38cca96888462ddb9689d9e0217;hp=c8c42f0f422f039bd30814bac37bcad99a44cd86;hpb=df51e4850f784f8f2fbaead7bb82bd6897fb9fab;p=clitk.git diff --git a/registration/clitkBLUTDIRGenericFilter.cxx b/registration/clitkBLUTDIRGenericFilter.cxx old mode 100755 new mode 100644 index c8c42f0..15afacf --- a/registration/clitkBLUTDIRGenericFilter.cxx +++ b/registration/clitkBLUTDIRGenericFilter.cxx @@ -3,7 +3,7 @@ Program: vv http://www.creatis.insa-lyon.fr/rio/vv Authors belong to: - University of LYON http://www.universite-lyon.fr/ -- Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr +- Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ It is distributed under dual licence - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef clitkBLUTDIRGenericFilter_cxx #define clitkBLUTDIRGenericFilter_cxx @@ -28,6 +28,7 @@ It is distributed under dual licence ===================================================*/ #include "clitkBLUTDIRGenericFilter.h" +#include "clitkBLUTDIRCommandIterationUpdateDVF.h" namespace clitk { @@ -78,7 +79,7 @@ namespace clitk { InitializeImageType<2>(); InitializeImageType<3>(); - m_Verbose=true; + m_Verbose=false; } //=========================================================================// @@ -93,6 +94,8 @@ namespace clitk } if (m_ArgsInfo.output_given) SetOutputFilename(m_ArgsInfo.output_arg); + + if (m_ArgsInfo.verbose_given) m_Verbose=true; } //=========================================================================// @@ -273,6 +276,8 @@ namespace clitk template void BLUTDIRGenericFilter::UpdateWithInputImageType() { + if (m_Verbose) std::cout << "BLUTDIRGenericFilter::UpdateWithInputImageType()" << std::endl; + //============================================================================= //Input //============================================================================= @@ -667,6 +672,17 @@ namespace clitk command->SetMaximize(genericMetric->GetMaximize()); command->SetMetricRegion(metricRegion); registration->AddObserver( itk::IterationEvent(), command ); + + if (m_ArgsInfo.coeff_given) + { + std::cout << std::endl << "Output coefficient images every " << m_ArgsInfo.coeffEveryN_arg << " iterations." << std::endl; + typedef CommandIterationUpdateDVF DVFCommandType; + typename DVFCommandType::Pointer observerdvf = DVFCommandType::New(); + observerdvf->SetFixedImage(fixedImage); + observerdvf->SetTransform(transform); + observerdvf->SetArgsInfo(m_ArgsInfo); + optimizer->AddObserver( itk::IterationEvent(), observerdvf ); + } }