Public Member Functions | Public Attributes | List of all members
ImageConf Class Reference

Struct for image (excluding data) More...

#include <ImageConf.h>

Inheritance diagram for ImageConf:
Inheritance graph
[legend]
Collaboration diagram for ImageConf:
Collaboration graph
[legend]

Public Member Functions

 ImageConf (const drain::Type &t=typeid(unsigned char), size_t width=0, size_t height=0, size_t imageChannels=1, size_t alphaChannels=0)
 
 ImageConf (const ImageConf &conf)
 
void setConf (const ImageConf &conf)
 
ImageConfoperator= (const ImageConf &conf)
 
template<class T >
void setCoordinatePolicy (const T &policy)
 Does not set any CoordinateHandler object.
 
void setCoordinatePolicy (EdgePolicy::index_t xUnderFlowPolicy, EdgePolicy::index_t yUnderFlowPolicy, EdgePolicy::index_t xOverFlowPolicy, EdgePolicy::index_t yOverFlowPolicy)
 
const CoordinatePolicygetCoordinatePolicy () const
 
- Public Member Functions inherited from Encoding
 Encoding (const std::type_info &t=typeid(unsigned char))
 
 Encoding (const Encoding &encoding)
 
const EncodinggetEncoding () const
 Return type and scaling.
 
EncodinggetEncoding ()
 Return type and scaling.
 
void setEncoding (const Encoding &e)
 Set type and scaling.
 
Encodingoperator= (const Encoding &e)
 
const std::type_info & getType () const
 Linear scaling. More...
 
bool typeIsSet () const
 Get the storage type.
 
void setType (const std::type_info &t)
 Set storage type.
 
template<class T >
void setType ()
 Convenience.
 
template<class T >
drain::typeLimiter< T >::value_t getLimiter () const
 
size_t getElementSize () const
 Returns the size in bytes of the storage type (1 for unsigned char, 2 for 16-bit types, etc.)
 
void setPhysicalRange (const Range< double > &range, bool rescale=false)
 Sets channel specific scaling instead of shared (image-level) scaling. More...
 
void setPhysicalRange (double min, double max, bool rescale=false)
 Sets the supported range for physical values. Does not change scaling or type.
 
void setOptimalScale ()
 
void setOptimalPhysicalScale (double min, double max)
 
template<class T >
getTypeMin () const
 Returns the minimum value supported by the current storage type. More...
 
template<class T >
getTypeMax () const
 Returns the maximum value supported by the current storage type. More...
 
double requestPhysicalMax (double defaultMax=static_cast< double >(std::numeric_limits< short int >::max())) const
 Returns the actual or guessed maximum physical value,. More...
 
double requestPhysicalMin (double defaultMin=static_cast< double >(std::numeric_limits< short int >::min())) const
 Returns the actual or guessed minimum physical value,. More...
 
- Public Member Functions inherited from ValueScaling
 ValueScaling (double scale=1.0, double offset=0.0)
 
 ValueScaling (double scale, double offset, const drain::Range< double > &range)
 
 ValueScaling (const drain::ValueScaling &scaling)
 
 ValueScaling (const drain::UniTuple< double, 2 > &scaling)
 
 ValueScaling (const drain::ValueScaling &scalingIn, const drain::ValueScaling &scalingOut)
 
ValueScalingoperator= (const drain::ValueScaling &scaling)
 
virtual void setScaling (double scale, double offset)
 Set linear scaling.
 
virtual void setScaling (const ValueScaling &scaling)
 
virtual const ValueScalinggetScaling () const
 Get linear scaling.
 
virtual ValueScalinggetScaling ()
 Get linear scaling.
 
void setAbsoluteScale ()
 If the intensities of the image correspond to an absolute value (like count) then the scale should be reset to unity with this function.
 
void setNormalScale (const std::type_info &t)
 For "small integer" types, resets offset and scale such that maximum code value corresponds to 1.0 (100% intensity). More...
 
void setConversionScale (double scale, double offset=0.0, double scaleOut=1.0, double offsetOut=0.0)
 If the intensities of the image correspond to a physical value (like temperature), then the scaling coefficient should be set with this function.
 
void setConversionScale (const drain::ValueScaling &s1, const drain::ValueScaling &s2)
 Set scaling for which scaling.inv(x) = s2.inv(s1.fwd(x))
 
void setConversionScale (const Range< double > &r1, const Range< double > &r2)
 
void setOptimalScale (const std::type_info &t)
 If storage type is integer, adjust scale such that resolution is maximized.
 
void setPhysicalScale (const std::type_info &t, double min, double max)
 Sets physical range (min, max) and scales storage type accordingly.
 
void setPhysicalScale (const std::type_info &t, const drain::ValueScaling &scaling)
 Sets physical range (min, max) and scales storage type accordingly.
 
const Range< double > & getPhysicalRange () const
 Returns a typical or supported range for physical values.
 
Range< double > & getPhysicalRange ()
 Returns a typical or supported range for physical values. Modifying the range will not change scaling.
 
void setPhysicalMax (double max)
 In integer-valued images, set the physical values corresponding to [0, maxCodeValue].
 
template<class T >
void setPhysicalRange (const Range< T > &range)
 Sets the supported range for physical values. Does not change scaling or type.
 
void setPhysicalRange (double min, double max)
 Sets the supported range for physical values. Does not change scaling or type.
 
double getScale () const
 Returns the intensity scaling factor. See set setScale()
 
double getOffset () const
 Returns the intensity scaling offset, ie. b in a*x + b . See set setScale()
 
bool isScaled () const
 Returns true, if scaling has effect ie. scale!=1.0 or offset!=0.0. More...
 
double getMinPhys () const
 Returns the minimum physical value.
 
double getMaxPhys () const
 Returns the maximum physical value.
 
bool isPhysical () const
 Returns true, physical intensity range has been set.
 
void adoptScaling (const drain::ValueScaling &srcScaling, const std::type_info &srcType, const std::type_info &dstType=typeid(void))
 Sets scale and offset according to physical range and current type.
 
double fwd (double x) const
 Forward scaling: given encoded value x, returns corresponding value (possibly physically meaningful).
 
double inv (double y) const
 Inverse scaling: given physically meaningful value y, returns the corresponding code value.
 
void toStream (std::ostream &ostr) const
 
std::string str () const
 
- Public Member Functions inherited from UniTuple< double, 2 >
 UniTuple (const TT &... args)
 
 UniTuple (const UniTuple< double, N > &t)
 Copy constructor.
 
 UniTuple (std::initializer_list< S > l)
 
tuple_toperator= (const tuple_t &t)
 
tuple_toperator= (const value_type &value)
 
tuple_toperator= (std::initializer_list< S > l)
 
virtual const_iterator begin () const override final
 
virtual iterator begin () override final
 
virtual const_iterator end () const override final
 
virtual iterator end () override final
 
tuple_ttuple ()
 
const tuple_ttuple () const
 
void debug (std::ostream &ostr) const
 
- Public Member Functions inherited from TupleBase< S, N >
const S & at (size_t i) const
 Return const reference to element i. More...
 
const S & operator[] (size_t i) const
 
S & at (size_t i)
 Return reference to element i. More...
 
S & operator[] (size_t i)
 
bool operator== (const tuplebase_t &t) const
 Equality operator.
 
bool operator!= (const tuplebase_t &t) const
 Inequality operator.
 
template<class T >
T & toSequence (T &sequence) const
 Copy elements to a Sequence, like stl::list, stl::set or stl::vector.
 
void set (const tuplebase_t &t)
 
template<class T2 , size_t N2 = 2>
void set (const TupleBase< T2, N2 > &t)
 Assign tuple of different type and/or size.
 
void set (const S &arg)
 
template<typename ... SS>
void set (const S &arg, const SS &... rest)
 Set element(s).
 
template<typename T >
void set (std::initializer_list< T > l)
 
template<class T >
tuplebase_tassignSequence (T &sequence, bool LENIENT=false)
 Proposed for tuples only; derived classes should not shadow this. More...
 
void fill (S i)
 Set all the elements to i.
 
void clear ()
 
virtual std::ostream & toStream (std::ostream &ostr, char separator=',') const
 
std::string toStr (char separator=',') const
 
virtual void updateTuple ()
 
- Public Member Functions inherited from Geometry
 Geometry (size_t width=0, size_t height=0, size_t channels=1, size_t alphas=0)
 Constructor with dimensions. Channel count is one by default, allowing construction with width and height.
 
 Geometry (const Geometry &g)
 
virtual const GeometrygetGeometry () const
 
virtual GeometrygetGeometry ()
 
template<class T >
void setGeometry (const T &g)
 
void setGeometry (const Geometry &g)
 
void setGeometry (size_t width, size_t height, size_t imageChannelCount=1, size_t alphaChannelCount=0)
 
 operator const AreaGeometry & () const
 
size_t getWidth () const
 
size_t getHeight () const
 
template<typename S , size_t N>
void setArea (const TupleBase< S, N > &a)
 
void setArea (size_t width, size_t height)
 
size_t getArea () const
 
size_t getChannelCount () const
 Set...
 
void setChannelCount (size_t imageChannels, size_t alphaChannels)
 
void setChannelCount (const ChannelGeometry &geom)
 
const size_t getImageChannelCount () const
 
void setImageChannelCount (size_t imageChannels)
 
const size_t getAlphaChannelCount () const
 
void setAlphaChannelCount (size_t alphaChannels)
 
bool hasAlphaChannel () const
 
size_t getChannelIndex (const std::string &index) const
 Returns numeric channel index from "r", "g", "b", or "a" or a non-negative number in string format. More...
 
size_t getVolume () const
 
bool isEmpty () const
 
bool operator== (const Geometry &g) const
 
bool operator!= (const Geometry &g) const
 
- Public Member Functions inherited from UniTuple< size_t, 4 >
 UniTuple (const TT &... args)
 
 UniTuple (const UniTuple< size_t, N > &t)
 Copy constructor.
 
 UniTuple (std::initializer_list< S > l)
 
tuple_toperator= (const tuple_t &t)
 
tuple_toperator= (const value_type &value)
 
tuple_toperator= (std::initializer_list< S > l)
 
virtual const_iterator begin () const override final
 
virtual iterator begin () override final
 
virtual const_iterator end () const override final
 
virtual iterator end () override final
 
tuple_ttuple ()
 
const tuple_ttuple () const
 
void debug (std::ostream &ostr) const
 

Public Attributes

CoordinatePolicy coordinatePolicy
 Rules to handle under- and overflows of horizontal and vertical coordinates.
 
- Public Attributes inherited from Encoding
Caster caster
 In base class(es), mainly for storing storage type. In derived classes, also for value conversions.
 
size_t byteSize
 
std::string type
 Information of the current type.
 
- Public Attributes inherited from ValueScaling
double & scale
 Multiplicative coefficient \i a in: y = ax + b.
 
double & offset
 Additive coefficient \i b in: y = ax + b.
 
drain::Range< double > physRange
 Minimum and maximum physical value of the imaged quantity (not limited to corresponding to minCodeValue?).
 
- Public Attributes inherited from Geometry
AreaGeometry area
 
ChannelGeometry channels
 

Additional Inherited Members

- Public Types inherited from UniTuple< double, 2 >
typedef double value_type
 
typedef UniTuple< double, N > tuple_t
 
typedef double * iterator
 
typedef const double * const_iterator
 
- Public Types inherited from TupleBase< S, N >
typedef TupleBase< S, N > tuplebase_t
 
typedef S value_type
 
typedef S * iterator
 
typedef S const * const_iterator
 
- Public Types inherited from UniTuple< size_t, 4 >
typedef size_t value_type
 
typedef UniTuple< size_t, N > tuple_t
 
typedef size_t * iterator
 
typedef const size_t * const_iterator
 
- Static Public Member Functions inherited from TupleBase< S, N >
static size_t size ()
 Return the number of elements. More...
 
- Static Public Attributes inherited from UniTuple< double, 2 >
static const size_t tuple_size
 
- Static Public Attributes inherited from TupleBase< S, N >
static const size_t storageTypeSize = sizeof(S)
 
- Static Public Attributes inherited from UniTuple< size_t, 4 >
static const size_t tuple_size
 
- Protected Member Functions inherited from UniTuple< double, 2 >
 UniTuple (UniTuple< double, N2 > &tuple, size_t i)
 
double & next ()
 
- Protected Member Functions inherited from TupleBase< S, N >
void setIndexed (size_t i)
 Argument stack endpoint function; final step of variadic argument set(arg, ...) .
 
template<typename T2 , typename ... TT>
void setIndexed (size_t i, T2 arg, const TT &... rest)
 Worker called by set(T2 arg, T2 arg2, ...)
 
- Protected Member Functions inherited from UniTuple< size_t, 4 >
 UniTuple (UniTuple< size_t, N2 > &tuple, size_t i)
 
size_t & next ()
 
- Protected Attributes inherited from UniTuple< double, 2 >
const iterator start
 
- Protected Attributes inherited from UniTuple< size_t, 4 >
const iterator start
 

Detailed Description

Struct for image (excluding data)


The documentation for this class was generated from the following file: