33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/ofstd/ofcast.h"
36 #include "dcmtk/dcmimgle/dimopxt.h"
37 #include "dcmtk/dcmimgle/discalet.h"
38 #include "dcmtk/dcmimgle/didispfn.h"
74 const signed long left_pos,
75 const signed long top_pos,
76 const Uint16 src_cols,
77 const Uint16 src_rows,
78 const Uint16 dest_cols,
79 const Uint16 dest_rows,
82 const int interpolate,
84 :
DiMonoPixelTemplate<T>(pixel, OFstatic_cast(unsigned long, dest_cols) * OFstatic_cast(unsigned long, dest_rows) * frames),
85 DiScaleTemplate<T>(1, columns, rows, left_pos, top_pos, src_cols, src_rows, dest_cols, dest_rows, frames, bits)
87 if ((pixel != NULL) && (pixel->
getCount() > 0))
89 if (pixel->
getCount() == OFstatic_cast(
unsigned long, columns) * OFstatic_cast(
unsigned long, rows) * frames)
94 DCMIMGLE_WARN(
"could not scale image ... corrupted data");
116 const unsigned int bits,
117 const int interpolate,
123 if (this->
Data != NULL)
Template class to handle monochrome pixel data.
void scale(const T *pixel, const unsigned int bits, const int interpolate, const Uint16 pvalue)
scale pixel data
Abstract base class to handle monochrome pixel data.
Template class to scale monochrome images (on pixel data level).
void scaleData(const T *src[], T *dest[], const int interpolate, const T value=0)
choose scaling/clipping algorithm depending on specified parameters.
unsigned int getBits() const
get number of bits per pixel
virtual ~DiMonoScaleTemplate()
destructor
T * Data
pointer to pixel data
Template class to scale images (on pixel data level).
virtual const void * getData() const =0
get pointer to pixel data (abstract).
void determineMinMax(T minvalue=0, T maxvalue=0, const int mode=0x1)
determine minimum and maximum pixel values
DiMonoScaleTemplate(const DiMonoPixel *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, const Uint16 pvalue)
constructor
static unsigned long maxval(const int mv_bits, const unsigned long mv_pos=1)
calculate maximum value which could be stored in the specified number of bits
unsigned long getCount() const
get number of pixels