itkSetMacro(ObjectCCLSelectionIgnoreSingleCCLFlag, bool);
itkBooleanMacro(ObjectCCLSelectionIgnoreSingleCCLFlag);
+ itkGetConstMacro(VerboseSlicesFlag, bool);
+ itkSetMacro(VerboseSlicesFlag, bool);
+ itkBooleanMacro(VerboseSlicesFlag);
+
protected:
SliceBySliceRelativePositionFilter();
virtual ~SliceBySliceRelativePositionFilter() {}
int m_ObjectCCLSelectionDimension;
int m_ObjectCCLSelectionDirection;
bool m_ObjectCCLSelectionIgnoreSingleCCLFlag;
+ bool m_VerboseSlicesFlag;
private:
SliceBySliceRelativePositionFilter(const Self&); //purposely not implemented
SetObjectCCLSelectionDimension(0);
SetObjectCCLSelectionDirection(1);
ObjectCCLSelectionIgnoreSingleCCLFlagOff();
+ VerboseSlicesFlagOff();
}
//--------------------------------------------------------------------
this->template StopCurrentStep<ImageType>(m_working_object);
*/
+ DD(input->GetLargestPossibleRegion());
+ DD(m_working_object->GetLargestPossibleRegion());
+
// Compute union of bounding boxes in X and Y
static const unsigned int dim = ImageType::ImageDimension;
typedef itk::BoundingBox<unsigned long, dim> BBType;
m_working_input,
this->GetObjectBackgroundValue());
+ // Index can be negative in some cases, and lead to problem with
+ // some filter. So we correct it.
+ m_working_input = clitk::RemoveNegativeIndexFromRegion<ImageType>(m_working_input);
+ m_working_object = clitk::RemoveNegativeIndexFromRegion<ImageType>(m_working_object);
+
// End
this->template StopCurrentStep<ImageType>(m_working_input);
}
typedef clitk::AddRelativePositionConstraintToLabelImageFilter<SliceType> RelPosFilterType;
typename RelPosFilterType::Pointer relPosFilter = RelPosFilterType::New();
relPosFilter->VerboseStepFlagOff();
+ if (GetVerboseSlicesFlag()) {
+ std::cout << "Slice " << i << std::endl;
+ relPosFilter->VerboseStepFlagOn();
+ }
relPosFilter->WriteStepFlagOff();
// relPosFilter->VerboseMemoryFlagOn();
relPosFilter->SetCurrentStepBaseId(this->GetCurrentStepId()+"-"+toString(i));