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;
86 virtual
std::pair<
double,
double> get_minmax_intensity() const = 0;
88 virtual
void make_single_ref() = 0;
128 template <typename T>
202 virtual C2DImage* clone() const __attribute__((warn_unused_result));
205 const_reference operator()(
size_t x,
size_t y)
const {
226 return m_image(l.
x,l.
y);
231 return m_image(l.
x,l.
y);
236 return m_image.begin();
240 const_iterator
end()
const {
241 return m_image.end();
246 return m_image.begin();
251 return m_image.end();
256 return m_image.begin_at(x, y);
261 return m_image.begin_at(x, y);
266 return m_image.begin_range(begin, end);
271 return m_image.end_range(begin, end);
276 return m_image.begin_range(begin, end);
281 return m_image.end_range(begin, end);
291 void get_data_line_x(
size_t y, std::vector<T>& buffer)
const;
294 void get_data_line_y(
size_t x, std::vector<T>& buffer)
const;
297 void put_data_line_x(
size_t y,
const std::vector<T>& buffer);
300 void put_data_line_y(
size_t x,
const std::vector<T>& buffer);
317 std::pair<double, double> get_minmax_intensity()
const;
319 void make_single_ref();
330 template <
typename T,
typename S>
337 cvdebug() << *si++ <<
" expect " << *ri++ <<
"\n";
345 template <
typename S>
346 struct plugin_data_type<T2DImage<S> > {
386 template <
typename T>
438 typedef __bind_all<T2DImage> Derived;
454 template <
typename O>
462 template <
typename T>
465 copy(image.
begin(), image.
end(), result.begin());
476 return filter(*
this, image);
486 return filter(*
this, *image);
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
std::map< std::string, C2DImageSeriesGroup > C2DImageGroupedSeries
const_range_iterator begin_range(const C2DBounds &begin, const C2DBounds &end) const
forwarding function to access the specified range of the underlying T2DDatafield
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 ...
const_iterator end() const
forwarding function to access the underlying T2DDatafield
iterator end()
forwarding function to access the underlying T2DDatafield
std::vector< C2DImageSeries > C2DImageSeriesGroup
const_iterator begin() const
forwarding function to access the underlying T2DDatafield
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_range_iterator end_range(const C2DBounds &begin, const C2DBounds &end) const
forwarding function to access the specified range of 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
T2DImage< unsigned int > C2DUIImage
2D image with unsigned 32 bit integer values
EXPORT_2D C2DFVectorfield get_gradient(const C2DImage &image)
std::shared_ptr< C2DImage > Pointer
2D Image pointer type
static const char * data_descr
const_reference operator[](size_t idx) const
forwarding function to access the underlying T2DDatafield
A class to hold data on a regular 2D grid.
const_reference operator()(const C2DBounds &l) const
forwarding function to access the underlying T2DDatafield
C2DImage Super
define the super class of this class for generic processing
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
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_iterator begin_at(size_t x, size_t y) const
forwarding function to access the underlying T2DDatafield
const C2DBounds & get_size() const
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
::std::vector< typename __holder_type_dispatch< T >::type > 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
reference operator()(const C2DBounds &l)
forwarding function to access the underlying T2DDatafield
#define NS_MIA_END
conveniance define to end the mia namespace