itkSetMacro(InputName, std::string);
itkGetConstMacro(InputName, std::string);
+ itkGetConstMacro(ComputeOverlapFlag, bool);
+ itkSetMacro(ComputeOverlapFlag, bool);
+ itkBooleanMacro(ComputeOverlapFlag);
+
void Read(std::string filename);
void SetFilterOptions(typename RelPosFilterType::Pointer filter, ArgsInfoType & options);
+ void SetReferenceImageForOverlapMeasure(ImagePointer ref);
protected:
RelativePositionList();
typename SliceRelPosFilterType::Pointer mFilter;
std::vector<ArgsInfoType> mArgsInfoList;
ImagePointer m_working_input;
+ ImagePointer m_reference;
+ bool m_ComputeOverlapFlag;
}; // end class
//--------------------------------------------------------------------
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
======================================================================-====*/
+#include "clitkLabelImageOverlapMeasureFilter.h"
//--------------------------------------------------------------------
template <class TImageType>
clitk::RelativePositionList<TImageType>::
RelativePositionList() {
+ ComputeOverlapFlagOff();
+}
+//--------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------
+template <class TImageType>
+void
+clitk::RelativePositionList<TImageType>::
+SetReferenceImageForOverlapMeasure(ImagePointer ref) {
+ m_reference = ref;
+ ComputeOverlapFlagOn();
}
//--------------------------------------------------------------------
relPosFilter->Update();
m_working_input = relPosFilter->GetOutput();
StopCurrentStep<ImageType>(m_working_input);
- // clitk::PrintMemory(true, "End");
+
+ // Compute overlap with reference if needed
+ if (GetComputeOverlapFlag()) {
+ typedef clitk::LabelImageOverlapMeasureFilter<ImageType> FilterType;
+ typename FilterType::Pointer filter = FilterType::New();
+ filter->SetInput(0, m_working_input);
+ filter->SetInput(1, m_reference);
+ filter->Update();
+ }
+
}
}
//--------------------------------------------------------------------