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
- 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
===================================================*/
#include "clitkBLUTDIRGenericFilter.h"
+#include "clitkBLUTDIRCommandIterationUpdateDVF.h"
namespace clitk
{
{
InitializeImageType<2>();
InitializeImageType<3>();
- m_Verbose=true;
+ m_Verbose=false;
}
//=========================================================================//
}
if (m_ArgsInfo.output_given) SetOutputFilename(m_ArgsInfo.output_arg);
+
+ if (m_ArgsInfo.verbose_given) m_Verbose=true;
}
//=========================================================================//
template<class InputImageType>
void BLUTDIRGenericFilter::UpdateWithInputImageType()
{
+ if (m_Verbose) std::cout << "BLUTDIRGenericFilter::UpdateWithInputImageType()" << std::endl;
+
//=============================================================================
//Input
//=============================================================================
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<FixedImageType, OptimizerType, TransformType> DVFCommandType;
+ typename DVFCommandType::Pointer observerdvf = DVFCommandType::New();
+ observerdvf->SetFixedImage(fixedImage);
+ observerdvf->SetTransform(transform);
+ observerdvf->SetArgsInfo(m_ArgsInfo);
+ optimizer->AddObserver( itk::IterationEvent(), observerdvf );
+ }
}