33 #include "dcmtk/config/osconfig.h"
35 #include "dcmtk/dcmimage/dicopxt.h"
36 #include "dcmtk/dcmimgle/discalet.h"
71 const signed long left_pos,
72 const signed long top_pos,
73 const Uint16 src_cols,
74 const Uint16 src_rows,
75 const Uint16 dest_cols,
76 const Uint16 dest_rows,
79 const int interpolate)
80 :
DiColorPixelTemplate<T>(pixel, OFstatic_cast(unsigned long, dest_cols) * OFstatic_cast(unsigned long, dest_rows) * frames),
81 DiScaleTemplate<T>(3, columns, rows, left_pos, top_pos, src_cols, src_rows, dest_cols, dest_rows, frames, bits)
83 if ((pixel != NULL) && (pixel->
getCount() > 0))
85 if (pixel->
getCount() == OFstatic_cast(
unsigned long, columns) * OFstatic_cast(
unsigned long, rows) * frames)
86 scale(OFstatic_cast(
const T **, OFconst_cast(
void *, pixel->
getData())), interpolate);
88 DCMIMAGE_WARN(
"could not scale image ... corrupted data");
107 inline void scale(
const T *pixel[3],
108 const int interpolate)
110 if (this->
Init(pixel))
void scale(const T *pixel[3], const int interpolate)
scale pixel data
DiColorScaleTemplate(const DiColorPixel *pixel, const Uint16 columns, const Uint16 rows, const signed long left_pos, const signed long top_pos, const Uint16 src_cols, const Uint16 src_rows, const Uint16 dest_cols, const Uint16 dest_rows, const Uint32 frames, const int bits, const int interpolate)
constructor
void scaleData(const T *src[], T *dest[], const int interpolate, const T value=0)
choose scaling/clipping algorithm depending on specified parameters.
Template class to scale color images (on pixel data level).
Template class to scale images (on pixel data level).
virtual const void * getData() const =0
get pointer to pixel data (abstract).
T * Data[3]
pointer to pixel data (3 components)
Template class to handle color pixel data.
Abstract base class to handle color pixel data.
virtual ~DiColorScaleTemplate()
destructor
unsigned long getCount() const
get number of pixels
int Init(const void *pixel)
initialize internal memory