Skip to content
Snippets Groups Projects
Commit 78d87740 authored by Julien Michel's avatar Julien Michel
Browse files

ENH: Adding threshold and number of iterations parameters, using macro for accessors

parent 92f37c3b
No related branches found
No related tags found
No related merge requests found
...@@ -73,28 +73,22 @@ public: ...@@ -73,28 +73,22 @@ public:
/** Sets the spatial bandwidth (or radius in the case of a uniform kernel) /** Sets the spatial bandwidth (or radius in the case of a uniform kernel)
* of the neighborhood for each pixel * of the neighborhood for each pixel
*/ */
virtual void SetSpatialBandwidth(const RealType _arg) otbSetObjectMemberMacro(MeanShiftFilter,SpatialBandwidth,RealType);
{ otbGetObjectMemberConstReferenceMacro(MeanShiftFilter,SpatialBandwidth,RealType);
this->m_MeanShiftFilter->SetSpatialBandwidth(_arg);
}
virtual RealType GetSpatialBandwidth ()
{
return this->m_MeanShiftFilter->GetSpatialBandwidth();
}
/** Sets the spectral bandwidth (or radius for a uniform kernel) for pixels /** Sets the spectral bandwidth (or radius for a uniform kernel) for pixels
* to be included in the same mode * to be included in the same mode
*/ */
virtual void SetRangeBandwidth(const RealType _arg) otbSetObjectMemberMacro(MeanShiftFilter,RangeBandwidth,RealType);
{ otbGetObjectMemberConstReferenceMacro(MeanShiftFilter,RangeBandwidth,RealType);
this->m_MeanShiftFilter->SetRangeBandwidth(_arg);
} /** Set the maximum number of iterations */
virtual RealType GetRangeBandwidth () otbSetObjectMemberMacro(MeanShiftFilter,MaxIterationNumber,unsigned int);
{ otbGetObjectMemberConstReferenceMacro(MeanShiftFilter,MaxIterationNumber,unsigned int);
return this->m_MeanShiftFilter->GetRangeBandwidth();
}
/** Set the convergence threshold */
otbSetObjectMemberMacro(MeanShiftFilter,Threshold,RealType);
otbGetObjectMemberConstReferenceMacro(MeanShiftFilter,Threshold,RealType);
/** Returns the const image of region labels */ /** Returns the const image of region labels */
const OutputLabelImageType * GetLabelOutput() const; const OutputLabelImageType * GetLabelOutput() const;
......
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