]> Creatis software - clitk.git/blobdiff - registration/clitkMultiResolutionPDEDeformableRegistration.txx
Remove clitkAffineRegistrationLib compilation when CLTK_USE_REGISTRATION is OFF
[clitk.git] / registration / clitkMultiResolutionPDEDeformableRegistration.txx
index 5c6b0aeaf55c38e2e3361f2d683a15a4c7d1b927..c8312e6e173085225a1a53181e01897c83123a6c 100644 (file)
@@ -43,7 +43,7 @@ MultiResolutionPDEDeformableRegistration<TFixedImage,TMovingImage,TDeformationFi
   m_MovingImagePyramid  = MovingImagePyramidType::New();
   m_FixedImagePyramid     = FixedImagePyramidType::New();
   m_FieldExpander     = FieldExpanderType::New();
-  m_InitialDeformationField = NULL;
+  m_InitialDeformationField = ITK_NULLPTR;
 
   m_NumberOfLevels = 3;
   m_NumberOfIterations.resize( m_NumberOfLevels );
@@ -219,7 +219,7 @@ void
 MultiResolutionPDEDeformableRegistration<TFixedImage,TMovingImage,TDeformationField,TRealType>
 ::GenerateData()
 {
-  // Check for NULL images and pointers
+  // Check for ITK_NULLPTR images and pointers
   MovingImageConstPointer movingImage = this->GetMovingImage();
   FixedImageConstPointer  fixedImage = this->GetFixedImage();
 
@@ -266,7 +266,7 @@ MultiResolutionPDEDeformableRegistration<TFixedImage,TMovingImage,TDeformationFi
   unsigned int fixedLevel = vnl_math_min( (int) m_CurrentLevel, 
                                          (int) m_FixedImagePyramid->GetNumberOfLevels() );
 
-  DeformationFieldPointer tempField = NULL;
+  DeformationFieldPointer tempField = ITK_NULLPTR;
 
   DeformationFieldPointer inputPtr =
     const_cast< DeformationFieldType * >( this->GetInput(0) );
@@ -323,7 +323,7 @@ MultiResolutionPDEDeformableRegistration<TFixedImage,TMovingImage,TDeformationFi
     m_FieldExpander->SetOutputDirection( fi->GetDirection());
 
     m_FieldExpander->UpdateLargestPossibleRegion();
-    m_FieldExpander->SetInput( NULL );
+    m_FieldExpander->SetInput( ITK_NULLPTR );
     tempField = m_FieldExpander->GetOutput();
     tempField->DisconnectPipeline();
     }
@@ -335,11 +335,7 @@ MultiResolutionPDEDeformableRegistration<TFixedImage,TMovingImage,TDeformationFi
       
       if( tempField.IsNull() )
        {
-#if ITK_VERSION_MAJOR >= 4
-         m_RegistrationFilter->SetInitialDisplacementField( NULL );
-#else
-         m_RegistrationFilter->SetInitialDeformationField( NULL );
-#endif
+         m_RegistrationFilter->SetInitialDisplacementField( ITK_NULLPTR );
        }
       else
        {
@@ -357,16 +353,11 @@ MultiResolutionPDEDeformableRegistration<TFixedImage,TMovingImage,TDeformationFi
       m_FieldExpander->SetOutputSpacing( fi->GetSpacing());
 
       m_FieldExpander->UpdateLargestPossibleRegion();
-      m_FieldExpander->SetInput( NULL );
+      m_FieldExpander->SetInput( ITK_NULLPTR );
       tempField = m_FieldExpander->GetOutput();
       tempField->DisconnectPipeline();
 
-#if ITK_VERSION_MAJOR >= 4
       m_RegistrationFilter->SetInitialDisplacementField( tempField );
-#else
-      m_RegistrationFilter->SetInitialDeformationField( tempField );
-#endif
-
       }
 
     // setup registration filter and pyramids 
@@ -439,9 +430,9 @@ MultiResolutionPDEDeformableRegistration<TFixedImage,TMovingImage,TDeformationFi
       }
 
     // Release memory
-    m_FieldExpander->SetInput( NULL );
+    m_FieldExpander->SetInput( ITK_NULLPTR );
     m_FieldExpander->GetOutput()->ReleaseData();
-    m_RegistrationFilter->SetInput( NULL );
+    m_RegistrationFilter->SetInput( ITK_NULLPTR );
     m_RegistrationFilter->GetOutput()->ReleaseData();
 
 }