22#ifndef mia_2d_2dimage_hh
23#define mia_2d_2dimage_hh
35#define ATTR_IMAGE_KMEANS_CLASSES "kmeans"
58 typedef std::shared_ptr<C2DImage >
Pointer;
85 virtual C2DImage *
clone() const __attribute__((warn_unused_result)) = 0;
87 virtual
std::pair<
double,
double> get_minmax_intensity() const = 0;
89 virtual
void make_single_ref() __attribute__((deprecated)) = 0;
233 const_reference operator()(
size_t x,
size_t y)
const
235 return m_image(x, y);
241 return m_image(x, y);
259 return m_image(l.
x, l.
y);
265 return m_image(l.
x, l.
y);
271 return m_image.begin();
277 return m_image.end();
283 return m_image.begin();
289 return m_image.end();
295 return m_image.begin_at(x, y);
301 return m_image.begin_at(x, y);
307 return m_image.begin_range(begin, end);
313 return m_image.end_range(begin, end);
319 return m_image.begin_range(begin, end);
325 return m_image.end_range(begin, end);
375 template <
typename T,
typename S>
383 cvdebug() << *si++ <<
" expect " << *ri++ <<
"\n";
393struct plugin_data_type<
T2DImage<S>> {
434 template <
typename T>
485 typedef __bind_all<T2DImage> Derived;
509 template <
typename T>
525 return filter(*
this, image);
536 return filter(*
this, *image);
T2DImage< uint16_t > C2DUSImage
2D image with unsigned 16 bit integer values
T2DImage< uint8_t > C2DUBImage
2D image with unsigned 8 bit integer values
T2DImage< int32_t > C2DSIImage
2D image with signed 32 bit integer values
std::shared_ptr< C2DImageSeries > P2DImageSeries
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
FConvert2DImageToPixeltypeO< float > FCopy2DImageToFloatRepn
short name for 2DImage to float pixel repn copy functor
T2DImage< double > C2DDImage
2D image with double precsion floating point values
T2DImage< bool > C2DBitImage
2D image with binary values
T2DImage< float > C2DFImage
2D image with single precsion floating point values
EXPORT_2D C2DFVectorfield get_gradient(const C2DImage &image)
std::vector< C2DImageSeries > C2DImageSeriesGroup
T2DImage< int8_t > C2DSBImage
2D image with signed 8 bit integer values
std::vector< P2DImage > C2DImageSeries
helper type for image series
bool operator!=(const C2DImage &a, const C2DImage &b)
std::map< std::string, C2DImageSeriesGroup > C2DImageGroupedSeries
T2DImage< uint32_t > C2DUIImage
2D image with unsigned 32 bit integer values
T2DImage< int64_t > C2DSLImage
2D image with signed 64 bit integer values
T2DImage< int16_t > C2DSSImage
2D image with signed 16 bit integer values
T2DImage< uint64_t > C2DULImage
2D image with unsigned 64 bit integer values
bool operator==(const CAttribute &a, const CAttribute &b)
a 2D field of floating point single accuracy 2D vectors
This is the base class for 2D images that can hold generic pixel data.
void set_pixel_size(const C2DFVector &pixel)
std::shared_ptr< C2DImage > Pointer
2D Image pointer type
virtual C2DImage * clone() const __attribute__((warn_unused_result))=0
C2DBounds dimsize_type
a definition of the image dimension type for
C2DFVector get_pixel_size() const
const C2DBounds & get_size() const
void set_origin(const C2DFVector &origin)
C2DFVector get_origin() const
EPixelType get_pixel_type() const
static const char * data_descr
A collection of attributes.
CAttributedData & operator=(const CAttributedData &org)
Assignemt operator.
a class to print out the intensity values of two images to compare them
functor to copy an image into paointer representation
A class to hold data on a regular 2D grid.
::std::vector< typename __holder_type_dispatch< T >::type > data_array
type for the flat reprentation of the 2D data field
This is the template version of a 2D image that is used for holding real data.
C2DImage Super
define the super class of this class for generic processing
const_iterator begin() const
forwarding function to access the underlying T2DDatafield
virtual C2DImage * clone() const __attribute__((warn_unused_result))
C2DFVector get_gradient(const C2DFVector &p) const
std::pair< double, double > get_minmax_intensity() const
const_reference operator[](size_t idx) const
forwarding function to access the underlying T2DDatafield
T2DImage(const T2DDatafield< T > &orig)
const_iterator begin_at(size_t x, size_t y) const
forwarding function to access the underlying T2DDatafield
T2DImage(const C2DBounds &size, const CAttributedData &attr)
T2DImage(const C2DBounds &size, const std::vector< T > &init_data)
void put_data_line_x(size_t y, const std::vector< T > &buffer)
forwarding function to access the underlying T2DDatafield
const T2DDatafield< T > & data() const
get direct access to the data field
reference operator[](size_t idx)
forwarding function to access the underlying T2DDatafield
void get_data_line_x(size_t y, std::vector< T > &buffer) const
forwarding function to access the underlying T2DDatafield
iterator begin()
forwarding function to access the underlying T2DDatafield
const_range_iterator begin_range(const C2DBounds &begin, const C2DBounds &end) const
forwarding function to access the specified range of the underlying T2DDatafield
const_reference operator()(const C2DBounds &l) const
forwarding function to access the underlying T2DDatafield
T2DImage(const T2DDatafield< T > &orig, const CAttributedData &attr)
iterator end()
forwarding function to access the underlying T2DDatafield
const_range_iterator end_range(const C2DBounds &begin, const C2DBounds &end) const
forwarding function to access the specified range of the underlying T2DDatafield
void get_data_line_y(size_t x, std::vector< T > &buffer) const
forwarding function to access the underlying T2DDatafield
const_iterator end() const
forwarding function to access the underlying T2DDatafield
range_iterator end_range(const C2DBounds &begin, const C2DBounds &end)
forwarding function to access the specified range of the underlying T2DDatafield
size_t size() const
forwarding function to access the underlying T2DDatafield
void make_single_ref() __attribute__((deprecated))
void put_data_line_y(size_t x, const std::vector< T > &buffer)
forwarding function to access the underlying T2DDatafield
T2DImage(const T2DImage &orig)
reference operator()(const C2DBounds &l)
forwarding function to access the underlying T2DDatafield
T2DImage(const C2DBounds &size, const T *init_data)
T2DImage(const C2DBounds &size)
C2DFVector get_gradient(size_t idx) const
iterator begin_at(size_t x, size_t y)
forwarding function to access the underlying T2DDatafield
reference operator()(size_t x, size_t y)
forwarding function to access the underlying T2DDatafield
range_iterator begin_range(const C2DBounds &begin, const C2DBounds &end)
forwarding function to access the specified range of the underlying T2DDatafield
T2DImage(T2DImage &&orig)
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
#define NS_MIA_END
conveniance define to end the mia namespace
static F::result_type filter(const F &f, const B &b)
functor to convert an image with an abitrary pixel type to single floating point pixels
base class for all filer type functors.