Skip to content
Snippets Groups Projects
Commit a61405cd authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH: add accessors

parent 1f22bcba
No related branches found
No related tags found
No related merge requests found
......@@ -105,10 +105,25 @@ public:
typedef itk::DataObject::Pointer DataObjectPointer;
typedef itk::DataObject DataObject;
typedef std::pair< std::string, std::vector<double> > PairType;
typedef std::vector< PairType > DescriptorModelsType;;
/** Descriptor model accessors. */
virtual void AddDescriptor(std::string key, std::vector<double> model);
virtual void ClearDescriptors();
void SetDescriptorModels( DescriptorModelsType model )
{
m_DescriptorModels = model;
this->Modified();
}
DescriptorModelsType GetDescriptorModels()
{
return m_DescriptorModels;
}
/** Parameter accessors. */
itkGetConstMacro(CriterionFormula, std::string);
itkSetMacro(CriterionFormula, std::string);
......@@ -146,8 +161,7 @@ private:
void operator =(const Self&); //purposely not implemented
// Descriptor bench
std::vector< std::pair<std::string, std::vector<double> > >
m_DescriptorModels;
DescriptorModelsType m_DescriptorModels;
std::vector< typename FuzzyVarType::Pointer > m_FuzzyVars;
LabelSetType m_Universe, m_Hypothesis;
double m_Bel, m_Plau;
......
......@@ -56,6 +56,7 @@ VectorDataToDSValidatedVectorDataFilter<TVectorData, TPrecision>
::AddDescriptor(std::string key, std::vector<double> model)
{
m_DescriptorModels.push_back(std::pair<std::string, std::vector<double> >(key, model));
this->Modified();
}
......
......@@ -109,7 +109,7 @@ ADD_TEST(fzTvVectorDataToDSValidatedVectorDataFilter ${Fuzzy_TESTS2}
${BASELINE_FILES}/fzTvDSValidatedRoadVectorDataOutput.shp
${TEMP}/fzTvDSValidatedRoadVectorDataOutput.shp
otbVectorDataToDSValidatedVectorDataFilter
${TEMP}/fzTvVectorDataToRoadDescriptionFilterOutput.shp
${BASELINE_FILES}/fzTvVectorDataToRoadDescriptionFilterOutput.shp
${TEMP}/fzTvDSValidatedRoadVectorDataOutput.shp
)
SET_TESTS_PROPERTIES(fzTvVectorDataToDSValidatedVectorDataFilter PROPERTIES DEPENDS fzTvVectorDataToRoadDescriptionFilter)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment