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;