9 #include "fwData/config.hpp" 10 #include "fwData/factory/new.hpp" 11 #include "fwData/Object.hpp" 13 fwCampAutoDeclareDataMacro((
fwData)(Histogram), FWDATA_API);
30 typedef std::vector< long > fwHistogramValues;
42 FWDATA_API
void shallowCopy(
const Object::csptr& _source )
override;
45 FWDATA_API
void cachedDeepCopy(
const Object::csptr& _source, DeepCopyCacheType& cache)
override;
55 FWDATA_API
void addPixel(
float pixel );
66 FWDATA_API
long getNbPixels(
float _min,
float _max );
75 FWDATA_API
void initialize(
float min,
float max,
float binsWidth );
84 FWDATA_API
bool isInRange(
float _pixel );
90 const float getBinsWidth()
const;
91 void setBinsWidth(
float _binsWidth);
98 fwHistogramValues& getValues();
99 const fwHistogramValues& getValues()
const;
100 void setValues(
const fwHistogramValues& _values);
107 float& getMinValue ();
108 const float& getMinValue ()
const;
109 void setMinValue (
float _minValue);
116 float& getMaxValue();
117 const float& getMaxValue()
const;
118 void setMaxValue(
float _maxValue);
138 inline const float Histogram::getBinsWidth()
const 145 inline void Histogram::setBinsWidth(
float _binsWidth)
147 this->m_binsWidth = _binsWidth;
152 inline Histogram::fwHistogramValues& Histogram::getValues()
154 return this->m_values;
159 inline const Histogram::fwHistogramValues& Histogram::getValues()
const 161 return this->m_values;
166 inline void Histogram::setValues(
const Histogram::fwHistogramValues& _values)
168 this->m_values = _values;
173 inline float& Histogram::getMinValue ()
175 return this->m_minValue;
180 inline const float& Histogram::getMinValue ()
const 182 return this->m_minValue;
187 inline void Histogram::setMinValue (
float _minValue)
189 this->m_minValue = _minValue;
194 inline float& Histogram::getMaxValue()
196 return this->m_maxValue;
201 inline const float& Histogram::getMaxValue()
const 203 return this->m_maxValue;
208 inline void Histogram::setMaxValue(
float _maxValue)
210 this->m_maxValue = _maxValue;
fwHistogramValues m_values
Histogram values.
float m_minValue
The minimum pixel value within the histogram (a default value is set to 0).
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
This class defines the histogram of an image.
float m_maxValue
The maximum pixel value within the histogram (a default value is set to 100).
float m_binsWidth
The pixel width of the bins (a default value is set to 1).
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
Base class for each data object.
Contains the representation of the data objects used in the framework.