}
// Execute
- void Execute(itk::Object *caller, const itk::EventObject & event) {
+ void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE {
Execute( (const itk::Object *)caller, event);
}
- void Execute(const itk::Object * object, const itk::EventObject & event) {
+ void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE {
if ( !(itk::IterationEvent().CheckEvent( &event )) ) {
return;
}
// Two arguments are passed to the Execute() method: the first
// is the pointer to the object which invoked the event and the
// second is the event that was invoked.
- void Execute(itk::Object * object, const itk::EventObject & event) {
+ void Execute(itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE {
if ( !(itk::IterationEvent().CheckEvent( &event )) ) {
return;
}
}
}
- void Execute(const itk::Object * , const itk::EventObject & ) {
+ void Execute(const itk::Object * , const itk::EventObject & ) ITK_OVERRIDE {
return;
}
// If given, we connect a mask to reference or target
//============================================================================
typedef itk::ImageMaskSpatialObject< InputImageType::ImageDimension > MaskType;
- typename MaskType::Pointer fixedMask=NULL;
+ typename MaskType::Pointer fixedMask=ITK_NULLPTR;
if (m_ArgsInfo.referenceMask_given) {
fixedMask= MaskType::New();
typedef itk::Image< unsigned char, InputImageType::ImageDimension > ImageMaskType;
}
typedef itk::ImageMaskSpatialObject< InputImageType::ImageDimension > MaskType;
- typename MaskType::Pointer movingMask=NULL;
+ typename MaskType::Pointer movingMask=ITK_NULLPTR;
if (m_ArgsInfo.targetMask_given) {
movingMask= MaskType::New();
typedef itk::Image< unsigned char, InputImageType::ImageDimension > ImageMaskType;
typename MetricType::Pointer metric=genericMetric->GetMetricPointer();
if (movingMask) metric->SetMovingImageMask(movingMask);
- if (threadsGiven) metric->SetNumberOfThreads( threads );
+ if (threadsGiven) {
+#if ITK_VERSION_MAJOR <= 4
+ metric->SetNumberOfThreads( threads );
+#else
+ metric->SetNumberOfWorkUnits( threads );
+#endif
+ }
//============================================================================
// Initialize using image moments.