]> Creatis software - clitk.git/commitdiff
correct intermediate spacing flag
authordsarrut <dsarrut>
Thu, 3 Mar 2011 10:12:12 +0000 (10:12 +0000)
committerdsarrut <dsarrut>
Thu, 3 Mar 2011 10:12:12 +0000 (10:12 +0000)
itk/clitkSliceBySliceRelativePositionFilter.h
itk/clitkSliceBySliceRelativePositionFilter.txx

index 4a3ebda53998ae7212b7b3c432dcc01700e6c7f5..0da64dc76179a67f10746f2c615d88a627a6e157 100644 (file)
@@ -78,9 +78,9 @@ namespace clitk {
     itkSetMacro(UniqueConnectedComponentBySlice, bool);
     itkBooleanMacro(UniqueConnectedComponentBySlice);
 
-    itkGetConstMacro(IgnoreEmptySliceObject, bool);
-    itkSetMacro(IgnoreEmptySliceObject, bool);
-    itkBooleanMacro(IgnoreEmptySliceObject);
+    itkGetConstMacro(IgnoreEmptySliceObjectFlag, bool);
+    itkSetMacro(IgnoreEmptySliceObjectFlag, bool);
+    itkBooleanMacro(IgnoreEmptySliceObjectFlag);
 
   protected:
     SliceBySliceRelativePositionFilter();
@@ -96,7 +96,7 @@ namespace clitk {
     ImagePointer m_working_object;
     bool         m_UniqueConnectedComponentBySlice;
     int          m_Direction;
-    bool         m_IgnoreEmptySliceObject;
+    bool         m_IgnoreEmptySliceObjectFlag;
 
   private:
     SliceBySliceRelativePositionFilter(const Self&); //purposely not implemented
index e3801024bf389f93a0188ae367afb6ae168107a7..eafb41608e3e8ae68f1e30b10360d5d96607e830 100644 (file)
@@ -32,7 +32,8 @@ SliceBySliceRelativePositionFilter():
 {
   SetDirection(2);
   UniqueConnectedComponentBySliceOff();
-  SetIgnoreEmptySliceObject(false);
+  SetIgnoreEmptySliceObjectFlag(false);
+  this->SetCombineWithOrFlag(false);
 }
 //--------------------------------------------------------------------
 
@@ -70,7 +71,7 @@ PrintOptions()
   DD(this->GetDirection());
   DD((int)this->GetObjectBackgroundValue());
   DDV(this->GetOrientationTypeString(), (uint)this->GetNumberOfAngles());
-  DD(this->GetResampleBeforeRelativePositionFilter());
+  DD(this->GetIntermediateSpacingFlag());
   DD(this->GetIntermediateSpacing());
   DD(this->GetFuzzyThreshold());
   DD(this->GetUniqueConnectedComponentBySlice());
@@ -175,15 +176,15 @@ GenerateOutputInformation()
     // Select main CC in each object slice (required ?)
     int nb=0;
     mObjectSlices[i] = LabelizeAndCountNumberOfObjects<SliceType>(mObjectSlices[i], 0, true, 1, nb);
-    if ((!GetIgnoreEmptySliceObject()) || (nb!=0)) {
+    if ((!GetIgnoreEmptySliceObjectFlag()) || (nb!=0)) {
       mObjectSlices[i] = KeepLabels<SliceType>(mObjectSlices[i], 0, 1, 1, 1, true);
 
       // Relative position
       typedef clitk::AddRelativePositionConstraintToLabelImageFilter<SliceType> RelPosFilterType;
       typename RelPosFilterType::Pointer relPosFilter = RelPosFilterType::New();
+
       relPosFilter->VerboseStepFlagOff();
       relPosFilter->WriteStepFlagOff();
-      relPosFilter->SetCurrentStepBaseId(this->GetCurrentStepId());
       relPosFilter->SetBackgroundValue(this->GetBackgroundValue());
       relPosFilter->SetInput(mInputSlices[i]); 
       relPosFilter->SetInputObject(mObjectSlices[i]); 
@@ -194,7 +195,7 @@ GenerateOutputInformation()
       relPosFilter->SetInverseOrientationFlag(this->GetInverseOrientationFlag());
       //relPosFilter->SetOrientationType(this->GetOrientationType());
       relPosFilter->SetIntermediateSpacing(this->GetIntermediateSpacing());
-      relPosFilter->SetResampleBeforeRelativePositionFilter(this->GetResampleBeforeRelativePositionFilter());
+      relPosFilter->SetIntermediateSpacingFlag(this->GetIntermediateSpacingFlag());
       relPosFilter->SetFuzzyThreshold(this->GetFuzzyThreshold());
       relPosFilter->AutoCropFlagOff(); // important ! because we join the slices after this loop
       relPosFilter->SetCombineWithOrFlag(this->GetCombineWithOrFlag());