27 #ifndef VALUE_HOLDER_H
28 #define VALUE_HOLDER_H
45 #define USE_ROW_ORDER 1
49 namespace ost {
namespace img {
namespace image_state {
112 return data_[i.
u*height_depth_ + i.
v*depth_ +i.
w];
115 return data_[i.
w*width_height_ + i.
v*height_ +i.
u];
128 return data_[i.
u*height_depth_ + i.
v*depth_ +i.
w];
131 return data_[i.
w*width_height_ + i.
v*height_ +i.
u];
147 std::size_t height_depth_;
150 std::size_t width_height_;
154 std::vector<V> data_;
class encapsulating 1D to 3D size
static DataType GetDataType()
ValueHolder & operator=(const ValueHolder< V > &h)
assignement provides full copy!
const V & Value(const Index &i) const
return direct ro access to the value without boundary check
std::size_t MemSize() const
~ValueHolder()
free allocated memory upon destruction
ValueHolder(const Size &s, const Size &ps)
initialization with size and physical size
ValueHolder(const ValueHolder< V > &h)
copy ctor provides full copy!
ValueHolder(const Size &s)
initialization with size
ConstVPtr GetData() const
const version of GetData()
V & Value(const Index &i)
return direct r/w access to the value without boundary check
VPtr GetData()
return pointer to raw data
void Swap(ValueHolder &vh)
swap data with another value holder
void ReleaseAndReconstruct()