33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/ofstd/ofcast.h"
36 #include "dcmtk/dcmimgle/dipixel.h"
37 #include "dcmtk/dcmimgle/ditranst.h"
66 const Uint16 src_cols,
67 const Uint16 src_rows,
68 const Uint16 dest_cols,
69 const Uint16 dest_rows,
72 :
DiTransTemplate<T>(0, src_cols, src_rows, dest_cols, dest_rows, frames)
78 (pixel->
getCount() == OFstatic_cast(
unsigned long, src_cols) * OFstatic_cast(
unsigned long, src_rows) * frames))
82 else if (degree == 180)
84 else if (degree == 270)
87 DCMIMGLE_WARN(
"could not rotate image ... corrupted data");
103 const Uint16 src_cols,
104 const Uint16 src_rows,
105 const Uint16 dest_cols,
106 const Uint16 dest_rows,
108 :
DiTransTemplate<T>(planes, src_cols, src_rows, dest_cols, dest_rows, frames)
130 else if (degree == 180)
132 else if (degree == 270)
149 if ((src != NULL) && (dest != NULL))
156 const unsigned long count = OFstatic_cast(
unsigned long, this->
Dest_X) * OFstatic_cast(
unsigned long, this->
Dest_Y);
157 for (
int j = 0; j < this->
Planes; ++j)
161 for (
unsigned long f = this->
Frames; f != 0; --f)
164 for (x = this->
Dest_X; x != 0; --x)
167 for (y = this->
Dest_Y; y != 0; --y)
186 if ((src != NULL) && (dest != NULL))
193 const unsigned long count = OFstatic_cast(
unsigned long, this->
Dest_X) * OFstatic_cast(
unsigned long, this->
Dest_Y);
194 for (
int j = 0; j < this->
Planes; ++j)
198 for (
unsigned long f = this->
Frames; f != 0; --f)
200 for (x = this->
Dest_X; x != 0; --x)
203 for (y = this->
Dest_Y; y != 0; --y)
223 if ((src != NULL) && (dest != NULL))
225 register unsigned long i;
228 const unsigned long count = OFstatic_cast(
unsigned long, this->
Dest_X) * OFstatic_cast(
unsigned long, this->
Dest_Y);
229 for (
int j = 0; j < this->
Planes; ++j)
233 for (
unsigned long f = this->
Frames; f != 0; --f)
236 for (i = count; i != 0; --i)
252 const unsigned long count = OFstatic_cast(
unsigned long, this->
Dest_X) * OFstatic_cast(
unsigned long, this->
Dest_Y);
253 T *temp =
new T[count];
261 for (
int j = 0; j < this->
Planes; ++j)
264 for (
unsigned long f = this->
Frames; f != 0; --f)
269 for (x = this->
Dest_X; x != 0; --x)
272 for (y = this->
Dest_Y; y != 0; --y)
290 const unsigned long count = OFstatic_cast(
unsigned long, this->
Dest_X) * OFstatic_cast(
unsigned long, this->
Dest_Y);
291 T *temp =
new T[count];
299 for (
int j = 0; j < this->
Planes; ++j)
302 for (
unsigned long f = this->
Frames; f != 0; --f)
306 for (x = this->
Dest_X; x != 0; --x)
309 for (y = this->
Dest_Y; y != 0; --y)
328 register unsigned long i;
333 const unsigned long count = OFstatic_cast(
unsigned long, this->
Dest_X) * OFstatic_cast(
unsigned long, this->
Dest_Y);
334 for (
int j = 0; j < this->
Planes; ++j)
337 for (
unsigned long f = this->
Frames; f != 0; --f)
341 for (i = count / 2; i != 0; --i)