21 #ifndef mia_3d_3dimage_hh
22 #define mia_3d_3dimage_hh
69 typedef std::shared_ptr<C3DImage >
Pointer;
82 virtual size_t size()
const = 0;
87 virtual const C3DBounds& get_size()
const = 0;
92 virtual Pointer clone()
const = 0;
99 virtual void set_voxel_size(
const C3DFVector& voxel) = 0;
127 template <
typename T>
183 void get_data_line_x(
int y,
int z, std::vector<T>& buffer)
const;
186 void get_data_line_y(
int x,
int z, std::vector<T>& buffer)
const;
189 void get_data_line_z(
int x,
int y, std::vector<T>& buffer)
const;
192 void put_data_line_x(
int y,
int z,
const std::vector<T> &buffer);
195 void put_data_line_y(
int x,
int z,
const std::vector<T> &buffer);
198 void put_data_line_z(
int x,
int y,
const std::vector<T> &buffer);
210 void put_data_plane_xy(
size_t z,
const T2DImage<T>& p);
213 void put_data_plane_yz(
size_t x,
const T2DImage<T>& p);
216 void put_data_plane_xz(
size_t y,
const T2DImage<T>& p);
220 const_reference
operator()(
size_t x,
size_t y,
size_t z)
const {
221 return m_image(x,y,z);
226 return m_image(x,y,z);
231 return m_image(l.
x,l.
y, l.
z);
236 return m_image(l.
x,l.
y, l.
z);
241 return m_image.begin();
245 const_iterator
end()
const {
246 return m_image.end();
251 return m_image.begin_range(begin, end);
256 return m_image.end_range(begin, end);
261 return m_image.begin_range(begin, end);
266 return m_image.end_range(begin, end);
276 return m_image.begin();
281 return m_image.end();
285 const_iterator
begin_at(
size_t x,
size_t y,
size_t z)
const {
286 return m_image.begin_at(x, y, z);
291 return m_image.begin_at(x, y, z);
320 return m_image.template get_gradient<float>(index);
348 template <
typename O>
356 template <
typename T>
359 copy(image.
begin(), image.
end(), result.begin());
370 return filter(*
this, image);
380 return filter(*
this, *image);
448 typedef __bind_all<T3DImage> Derived;
457 template <
typename T>
460 static void register_for(
const std::string& key);
462 PAttribute do_from_string(
const std::string& value)
const;
470 template <
typename T>
491 std::string do_as_string()
const;
492 bool do_is_equal(
const CAttribute& other)
const;
493 bool do_is_less(
const CAttribute& other)
const;
T3DImage< unsigned short > C3DUSImage
3D image with unsigned 16 bit integer values
Specific type of the 3D images that hold real pixel data.
const_iterator end() const
constant iterator
std::vector< P3DImage > C3DImageSeries
helper type for image series
reference operator()(const C3DBounds &l)
element access operator - read/write
virtual Pointer clone() const =0
C3DImage::Pointer P3DImage
define a shortcut to the 3D image shared pointer.
reference operator()(size_t x, size_t y, size_t z)
element access operator - read/write
T3DImage< signed char > C3DSBImage
3D image with signed 8 bit integer values
A templated class of a 3D data field.
const_range_iterator end_range(const C3DBounds &begin, const C3DBounds &end) const
forwarding function to access the specified range of the underlying T3DDatafield
const char * typedescr() const
base class for all filer type functors.
T3DImage< signed short > C3DSSImage
3D image with signed 16 bit integer values
virtual const C3DBounds & get_size() const
This is the template version of a 2D image that is used for holding real data.
const_reference operator()(const C3DBounds &l) const
element access operator - read only
The class of all attributes of data that is considered to ve meta-data.
T3DImage< O > operator()(const T3DImage< T > &image) const
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
FConvert3DImageToPixeltypeO< float > FCopy3DImageToFloatRepn
short name for 3DImage to float pixel repn copy functor
A collection of attributes.
C3DValueAttributeTranslator< float > CVoxelAttributeTranslator
attribute translator for a 3D floating point vector used for the voxel size
static F::result_type filter(const F &f, const B &b)
C3DImage Super
define the super class of this class for generic processing
functor to convert an image with an abitrary pixel type to single floating point pixels ...
C3DValueAttribute< int > C3DIntAttribute
a 3D integer vector
std::shared_ptr< CAttribute > PAttribute
define the shared pointer wrapped attribute pointer
iterator begin()
read/write iterator, issues copy-on-write
const_reference operator()(size_t x, size_t y, size_t z) const
element access operator - read only
a translater for 3D vectors to and from a std::string
T3DImage< double > C3DDImage
3D image with signed 64 bit floating point values
A class to translate an attribute from a string.
std::shared_ptr< C3DImageSeries > P3DImageSeries
virtual const C3DBounds & get_size() const =0
const_reference operator[](int i) const
std::shared_ptr< C3DImage > Pointer
Pointer type of the image.
virtual void set_voxel_size(const C3DFVector &voxel)=0
set the voxel size on world units
The generic base type of a 3D image.
const_iterator begin() const
constant iterator
const_iterator begin_at(size_t x, size_t y, size_t z) const
constant iterator starting at the given location
C3DValueAttribute< float > CVoxelAttribute
a 3D floating point vector used for the voxel size attribute
C3DValueAttributeTranslator< int > C3DIntAttributeTranslator
attribute translator for a 3D integer vector
C3DBounds dimsize_type
generic type for the dimension of the image
T3DImage< bool > C3DBitImage
3D image with binary values
T3DImage< unsigned int > C3DUIImage
3D image with unsigned 32 bit integer values
iterator begin_at(size_t x, size_t y, size_t z)
read/write iterator starting at the given location
iterator end()
read/write iterator, issues copy-on-write
T3DImage< unsigned char > C3DUBImage
3D image with unsigned 8 bit integer values
virtual C3DFVector get_voxel_size() const =0
T3DImage< signed int > C3DSIImage
3D image with signed 32 bit integer values
reference operator[](int i)
static const char * data_descr
data type description for the plug-in path component
virtual size_t size() const =0
range_iterator begin_range(const C3DBounds &begin, const C3DBounds &end)
forwarding function to access the specified range of the underlying T3DDatafield
C3DFVector get_gradient(int index) const
read/write access to the underlying data
a 3D vector value used in attributes
T3DImage< float > C3DFImage
3D image with signed 32 bit floating point values
const_range_iterator begin_range(const C3DBounds &begin, const C3DBounds &end) const
forwarding function to access the specified range of the underlying T3DDatafield
EXPORT_3D C3DFVectorfield get_gradient(const C3DImage &image)
range_iterator end_range(const C3DBounds &begin, const C3DBounds &end)
forwarding function to access the specified range of the underlying T3DDatafield
#define NS_MIA_END
conveniance define to end the mia namespace