38 template <
typename ImageT>
42 while (nQuarter < 0) {
46 switch (nQuarter % 4) {
48 outImage.
reset(
new ImageT(inImage,
true));
53 for (
int y = 0;
y != inImage.getHeight(); ++
y) {
54 typename ImageT::y_iterator optr = outImage->col_begin(inImage.getHeight() -
y - 1);
55 for (
typename ImageT::x_iterator iptr = inImage.row_begin(
y),
end = inImage.row_end(
y);
56 iptr !=
end; ++iptr, ++optr) {
63 outImage.
reset(
new ImageT(inImage.getDimensions()));
65 for (
int y = 0;
y != inImage.getHeight(); ++
y) {
66 typename ImageT::x_iterator optr =
67 outImage->x_at(inImage.getWidth() - 1, inImage.getHeight() -
y - 1);
68 for (
typename ImageT::x_iterator iptr = inImage.row_begin(
y),
end = inImage.row_end(
y);
69 iptr !=
end; ++iptr, optr -= 1) {
77 for (
int y = 0;
y != inImage.getHeight(); ++
y) {
78 typename ImageT::y_iterator optr = outImage->y_at(
y, inImage.getWidth() - 1);
79 for (
typename ImageT::x_iterator iptr = inImage.row_begin(
y),
end = inImage.row_end(
y);
80 iptr !=
end; ++iptr, optr -= 1) {
91 template <
typename ImageT>
97 for (
int y = 0;
y != inImage.getHeight(); ++
y) {
98 typename ImageT::x_iterator optr =
99 outImage->x_at(inImage.getWidth() - 1, inImage.getHeight() -
y - 1);
100 for (
typename ImageT::x_iterator iptr = inImage.row_begin(
y),
end = inImage.row_end(
y);
101 iptr !=
end; ++iptr, optr -= 1) {
106 for (
int y = 0;
y != inImage.getHeight(); ++
y) {
107 typename ImageT::x_iterator optr = outImage->x_at(inImage.getWidth() - 1,
y);
108 for (
typename ImageT::x_iterator iptr = inImage.row_begin(
y),
end = inImage.row_end(
y);
109 iptr !=
end; ++iptr, optr -= 1) {
116 for (
int y = 0;
y != inImage.getHeight(); ++
y) {
117 typename ImageT::x_iterator optr = outImage->row_begin(inImage.getHeight() -
y - 1);
118 for (
typename ImageT::x_iterator iptr = inImage.row_begin(
y),
end = inImage.row_end(
y);
119 iptr !=
end; ++iptr, ++optr) {
135 #define INSTANTIATE(TYPE) \
136 template std::shared_ptr<afwImage::Image<TYPE>> rotateImageBy90(afwImage::Image<TYPE> const&, int); \
137 template std::shared_ptr<afwImage::MaskedImage<TYPE>> rotateImageBy90( \
138 afwImage::MaskedImage<TYPE> const&, int); \
139 template std::shared_ptr<afwImage::Image<TYPE>> flipImage(afwImage::Image<TYPE> const&, bool flipLR, \
141 template std::shared_ptr<afwImage::MaskedImage<TYPE>> flipImage(afwImage::MaskedImage<TYPE> const&, \
142 bool flipLR, bool flipTB);