22 #ifndef mia_2d_2dimage_hh 23 #define mia_2d_2dimage_hh 35 #define ATTR_IMAGE_KMEANS_CLASSES "kmeans" 57 typedef std::shared_ptr<C2DImage >
Pointer;
84 virtual C2DImage* clone() const __attribute__((warn_unused_result)) = 0;
124 template <typename T>
198 virtual C2DImage* clone() const __attribute__((warn_unused_result));
201 const_reference operator()(
size_t x,
size_t y)
const {
222 return m_image(l.
x,l.
y);
227 return m_image(l.
x,l.
y);
232 return m_image.begin();
236 const_iterator
end()
const {
237 return m_image.end();
242 return m_image.begin();
247 return m_image.end();
252 return m_image.begin_at(x, y);
257 return m_image.begin_at(x, y);
262 return m_image.begin_range(begin, end);
267 return m_image.end_range(begin, end);
272 return m_image.begin_range(begin, end);
277 return m_image.end_range(begin, end);
287 void get_data_line_x(
size_t y, std::vector<T>& buffer)
const;
290 void get_data_line_y(
size_t x, std::vector<T>& buffer)
const;
293 void put_data_line_x(
size_t y,
const std::vector<T>& buffer);
296 void put_data_line_y(
size_t x,
const std::vector<T>& buffer);
321 template <
typename T,
typename S>
328 cvdebug() << *si++ <<
" expect " << *ri++ <<
"\n";
336 template <
typename S>
337 struct plugin_data_type<T2DImage<S> > {
377 template <
typename T>
429 typedef __bind_all<T2DImage> Derived;
445 template <
typename O>
453 template <
typename T>
456 copy(image.
begin(), image.
end(), result.begin());
467 return filter(*
this, image);
477 return filter(*
this, *image);
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
std::map< std::string, C2DImageSeriesGroup > C2DImageGroupedSeries
T2DImage< signed int > C2DSIImage
2D image with signed 32 bit integer values
functor to convert an image with an abitrary pixel type to single floating point pixels ...
iterator end()
forwarding function to access the underlying T2DDatafield
std::vector< C2DImageSeries > C2DImageSeriesGroup
functor to copy an image into paointer representation
T2DImage< double > C2DDImage
2D image with double precsion floating point values
base class for all filer type functors.
This is the template version of a 2D image that is used for holding real data.
class EXPORT_CORE CMeans private
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
A collection of attributes.
T2DImage< unsigned short > C2DUSImage
2D image with unsigned 16 bit integer values
T2DImage< float > C2DFImage
2D image with single precsion floating point values
static F::result_type filter(const F &f, const B &b)
const_iterator end() const
forwarding function to access the underlying T2DDatafield
EXPORT_2D bool operator==(const C2DImage &a, const C2DImage &b)
bool operator!=(const C2DImage &a, const C2DImage &b)
range_iterator begin_range(const C2DBounds &begin, const C2DBounds &end)
forwarding function to access the specified range of the underlying T2DDatafield
reference operator[](size_t idx)
forwarding function to access the underlying T2DDatafield
T2DImage< signed short > C2DSSImage
2D image with signed 16 bit integer values
iterator begin_at(size_t x, size_t y)
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
T2DImage< unsigned int > C2DUIImage
2D image with unsigned 32 bit integer values
EXPORT_2D C2DFVectorfield get_gradient(const C2DImage &image)
const_iterator begin() const
forwarding function to access the underlying T2DDatafield
std::shared_ptr< C2DImage > Pointer
2D Image pointer type
static const char * data_descr
A class to hold data on a regular 2D grid.
C2DImage Super
define the super class of this class for generic processing
const_reference operator[](size_t idx) const
forwarding function to access the underlying T2DDatafield
T2DImage< unsigned char > C2DUBImage
2D image with unsigned 8 bit integer values
reference operator()(size_t x, size_t y)
forwarding function to access the underlying T2DDatafield
const_iterator begin_at(size_t x, size_t y) const
forwarding function to access the underlying T2DDatafield
std::shared_ptr< C2DImageSeries > P2DImageSeries
range_iterator end_range(const C2DBounds &begin, const C2DBounds &end)
forwarding function to access the specified range of the underlying T2DDatafield
FConvert2DImageToPixeltypeO< float > FCopy2DImageToFloatRepn
short name for 2DImage to float pixel repn copy functor
const_range_iterator end_range(const C2DBounds &begin, const C2DBounds &end) const
forwarding function to access the specified range of the underlying T2DDatafield
This is the base class for 2D images that can hold generic pixel data.
C2DBounds dimsize_type
a definition of the image dimension type for
T2DImage< bool > C2DBitImage
2D image with binary values
T2DImage< signed char > C2DSBImage
2D image with signed 8 bit integer values
a class to print out the intensity values of two images to compare them
const C2DBounds & get_size() const
::std::vector< T > data_array
type for the flat reprentation of the 2D data field
std::vector< P2DImage > C2DImageSeries
helper type for image series
T2DImage< signed long > C2DSLImage
2D image with signed 64 bit integer values
T2DImage< unsigned long > C2DULImage
2D image with unsigned 64 bit integer values
const_reference operator()(const C2DBounds &l) const
forwarding function to access the underlying T2DDatafield
reference operator()(const C2DBounds &l)
forwarding function to access the underlying T2DDatafield
#define NS_MIA_END
conveniance define to end the mia namespace