56 #ifndef VIGRA_IMPEX_HXX
57 #define VIGRA_IMPEX_HXX
59 #include "sized_int.hxx"
60 #include "stdimage.hxx"
61 #include "tinyvector.hxx"
62 #include "imageinfo.hxx"
63 #include "numerictraits.hxx"
65 #include "accessor.hxx"
66 #include "inspectimage.hxx"
67 #include "transformimage.hxx"
68 #include "copyimage.hxx"
69 #include "multi_array.hxx"
101 template<
class ImageIterator,
class Accessor,
class SrcValueType >
105 typedef unsigned int size_type;
107 typedef typename Accessor::value_type AccessorValueType;
108 typedef typename AccessorValueType::value_type DstValueType;
110 const size_type width = dec->getWidth();
111 const size_type height = dec->getHeight();
112 const size_type num_bands = dec->getNumBands();
114 vigra_precondition(num_bands == (size_type)a.size(ys),
115 "importImage(): number of bands (color channels) in file and destination image differ.");
117 SrcValueType
const * scanline;
119 DstRowIterator xs = ys.rowIterator();
125 unsigned int offset = dec->getOffset();
126 SrcValueType
const * scanline0;
127 SrcValueType
const * scanline1;
128 SrcValueType
const * scanline2;
129 SrcValueType
const * scanline3;
130 for( size_type y = 0; y < height; ++y, ++ys.
y )
133 xs = ys.rowIterator();
134 scanline0 =
static_cast< SrcValueType
const *
>
135 (dec->currentScanlineOfBand(0));
136 scanline1 =
static_cast< SrcValueType
const *
>
137 (dec->currentScanlineOfBand(1));
138 scanline2 =
static_cast< SrcValueType
const *
>
139 (dec->currentScanlineOfBand(2));
140 scanline3 =
static_cast< SrcValueType
const *
>
141 (dec->currentScanlineOfBand(3));
142 for( size_type x = 0; x < width; ++x, ++xs )
144 a.setComponent( *scanline0, xs, 0);
145 a.setComponent( *scanline1, xs, 1);
146 a.setComponent( *scanline2, xs, 2);
147 a.setComponent( *scanline3, xs, 3);
158 for( size_type y = 0; y < height; ++y, ++ys.
y )
161 for( size_type b = 0; b < num_bands; ++b )
163 xs = ys.rowIterator();
164 scanline =
static_cast< SrcValueType
const *
>
165 (dec->currentScanlineOfBand(b));
166 for( size_type x = 0; x < width; ++x, ++xs )
168 a.setComponent( *scanline, xs, b );
169 scanline += dec->getOffset();
179 template<
class ImageIterator,
class RGBType,
181 void read_bands( Decoder * dec, ImageIterator ys,
182 RGBAccessor<RGBType> a, SrcValueType )
184 typedef unsigned int size_type;
186 typedef RGBType AccessorValueType;
187 typedef typename AccessorValueType::value_type DstValueType;
189 const size_type width = dec->getWidth();
190 const size_type height = dec->getHeight();
191 const size_type num_bands = dec->getNumBands();
193 vigra_precondition(num_bands == (size_type)a.size(ys),
194 "importImage(): number of bands (color channels) in file and destination image differ.");
197 DstRowIterator xs = ys.rowIterator();
200 unsigned int offset = dec->getOffset();
201 SrcValueType
const * scanline0;
202 SrcValueType
const * scanline1;
203 SrcValueType
const * scanline2;
204 for( size_type y = 0; y < height; ++y, ++ys.y )
207 xs = ys.rowIterator();
208 scanline0 =
static_cast< SrcValueType
const *
>
209 (dec->currentScanlineOfBand(0));
210 scanline1 =
static_cast< SrcValueType
const *
>
211 (dec->currentScanlineOfBand(1));
212 scanline2 =
static_cast< SrcValueType
const *
>
213 (dec->currentScanlineOfBand(2));
214 for( size_type x = 0; x < width; ++x, ++xs )
216 a.setComponent( *scanline0, xs, 0);
217 a.setComponent( *scanline1, xs, 1);
218 a.setComponent( *scanline2, xs, 2);
228 template<
class ImageIterator,
class ComponentType,
class SrcValueType >
229 void read_bands( Decoder * dec, ImageIterator ys,
230 VectorAccessor<TinyVector<ComponentType, 3> > a, SrcValueType )
232 typedef unsigned int size_type;
234 typedef TinyVector<ComponentType, 3> AccessorValueType;
235 typedef typename AccessorValueType::value_type DstValueType;
237 const size_type width = dec->getWidth();
238 const size_type height = dec->getHeight();
239 const size_type num_bands = dec->getNumBands();
241 vigra_precondition(num_bands == (size_type)a.size(ys),
242 "importImage(): number of bands (color channels) in file and destination image differ.");
245 DstRowIterator xs = ys.rowIterator();
248 unsigned int offset = dec->getOffset();
249 SrcValueType
const * scanline0;
250 SrcValueType
const * scanline1;
251 SrcValueType
const * scanline2;
252 for( size_type y = 0; y < height; ++y, ++ys.y )
255 xs = ys.rowIterator();
256 scanline0 =
static_cast< SrcValueType
const *
>
257 (dec->currentScanlineOfBand(0));
258 scanline1 =
static_cast< SrcValueType
const *
>
259 (dec->currentScanlineOfBand(1));
260 scanline2 =
static_cast< SrcValueType
const *
>
261 (dec->currentScanlineOfBand(2));
262 for( size_type x = 0; x < width; ++x, ++xs )
264 a.setComponent( *scanline0, xs, 0);
265 a.setComponent( *scanline1, xs, 1);
266 a.setComponent( *scanline2, xs, 2);
277 template<
class ImageIterator,
class ComponentType,
class SrcValueType >
278 void read_bands( Decoder * dec, ImageIterator ys,
279 VectorAccessor<TinyVector<ComponentType, 4> > a, SrcValueType )
281 typedef unsigned int size_type;
283 typedef TinyVector<ComponentType, 4> AccessorValueType;
284 typedef typename AccessorValueType::value_type DstValueType;
286 const size_type width = dec->getWidth();
287 const size_type height = dec->getHeight();
288 const size_type num_bands = dec->getNumBands();
290 vigra_precondition(num_bands == (size_type)a.size(ys),
291 "importImage(): number of bands (color channels) in file and destination image differ.");
294 DstRowIterator xs = ys.rowIterator();
297 unsigned int offset = dec->getOffset();
298 SrcValueType
const * scanline0;
299 SrcValueType
const * scanline1;
300 SrcValueType
const * scanline2;
301 SrcValueType
const * scanline3;
302 for( size_type y = 0; y < height; ++y, ++ys.y )
305 xs = ys.rowIterator();
306 scanline0 =
static_cast< SrcValueType
const *
>
307 (dec->currentScanlineOfBand(0));
308 scanline1 =
static_cast< SrcValueType
const *
>
309 (dec->currentScanlineOfBand(1));
310 scanline2 =
static_cast< SrcValueType
const *
>
311 (dec->currentScanlineOfBand(2));
312 scanline3 =
static_cast< SrcValueType
const *
>
313 (dec->currentScanlineOfBand(3));
314 for( size_type x = 0; x < width; ++x, ++xs )
316 a.setComponent( *scanline0, xs, 0);
317 a.setComponent( *scanline1, xs, 1);
318 a.setComponent( *scanline2, xs, 2);
319 a.setComponent( *scanline3, xs, 3);
347 template<
class ImageIterator,
class Accessor,
class SrcValueType >
350 typedef unsigned int size_type;
352 typedef typename Accessor::value_type DstValueType;
353 const size_type width = dec->getWidth();
354 const size_type height = dec->getHeight();
356 SrcValueType
const * scanline;
358 DstRowIterator xs = ys.rowIterator();
360 for( size_type y = 0; y < height; ++y, ++ys.
y ) {
362 xs = ys.rowIterator();
363 scanline =
static_cast< SrcValueType
const *
>(dec->currentScanlineOfBand(0));
364 for( size_type x = 0; x < width; ++x, ++xs )
365 a.set( scanline[x], xs );
396 template<
class ImageIterator,
class Accessor >
397 void importVectorImage(
const ImageImportInfo & info, ImageIterator iter, Accessor a )
399 std::auto_ptr<Decoder> dec = decoder(info);
400 std::string pixeltype = dec->getPixelType();
402 if ( pixeltype ==
"UINT8" )
404 else if ( pixeltype ==
"INT16" )
406 else if ( pixeltype ==
"UINT16" )
408 else if ( pixeltype ==
"INT32" )
410 else if ( pixeltype ==
"UINT32" )
412 else if ( pixeltype ==
"FLOAT" )
414 else if ( pixeltype ==
"DOUBLE" )
417 vigra_precondition(
false,
"invalid pixeltype" );
450 template <
class ImageIterator,
class Accessor >
451 void importScalarImage(
const ImageImportInfo & info, ImageIterator iter, Accessor a )
453 std::auto_ptr<Decoder> dec = decoder(info);
454 std::string pixeltype = dec->getPixelType();
456 if ( pixeltype ==
"UINT8" )
458 else if ( pixeltype ==
"INT16" )
460 else if ( pixeltype ==
"UINT16" )
462 else if ( pixeltype ==
"INT32" )
464 else if ( pixeltype ==
"UINT32" )
466 else if ( pixeltype ==
"FLOAT" )
467 read_band( dec.get(), iter, a, float() );
468 else if ( pixeltype ==
"DOUBLE" )
469 read_band( dec.get(), iter, a, double() );
471 vigra_precondition(
false,
"invalid pixeltype" );
561 doxygen_overloaded_function(template <...>
void importImage)
563 template <
class ImageIterator,
class Accessor >
564 void importImage(
const ImageImportInfo & info, ImageIterator iter, Accessor a )
566 typedef typename NumericTraits<typename Accessor::value_type>::isScalar is_scalar;
570 template <
class ImageIterator,
class Accessor >
571 void importImage(
const ImageImportInfo & info, pair< ImageIterator, Accessor > dest )
576 template <
class ImageIterator,
class Accessor >
577 void importImage(
const ImageImportInfo & info, ImageIterator iter, Accessor a, VigraFalseType )
582 template <
class ImageIterator,
class Accessor >
583 void importImage(
const ImageImportInfo & info, ImageIterator iter, Accessor a, VigraTrueType )
608 template<
class ImageIterator,
class Accessor,
class DstValueType >
611 typedef unsigned int size_type;
613 typedef typename Accessor::value_type AccessorValueType;
614 typedef typename AccessorValueType::value_type SrcValueType;
617 const size_type width = lr.
x - ul.
x;
618 const size_type height = lr.
y - ul.
y;
619 enc->setWidth(width);
620 enc->setHeight(height);
621 const size_type num_bands = a.size(ul);
622 enc->setNumBands(num_bands);
623 enc->finalizeSettings();
625 DstValueType * scanline;
630 SrcRowIterator xs = ys.rowIterator();
637 unsigned int offset = enc->getOffset();
638 DstValueType * scanline0;
639 DstValueType * scanline1;
640 for( size_type y = 0; y < height; ++y, ++ys.
y ) {
641 xs = ys.rowIterator();
642 scanline0 =
static_cast< DstValueType *
>
643 (enc->currentScanlineOfBand(0));
644 scanline1 =
static_cast< DstValueType *
>
645 (enc->currentScanlineOfBand(1));
646 for( size_type x = 0; x < width; ++x, ++xs) {
647 *scanline0 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 0));
648 *scanline1 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 1));
659 unsigned int offset = enc->getOffset();
660 DstValueType * scanline0;
661 DstValueType * scanline1;
662 DstValueType * scanline2;
663 for( size_type y = 0; y < height; ++y, ++ys.
y ) {
664 xs = ys.rowIterator();
665 scanline0 =
static_cast< DstValueType *
>
666 (enc->currentScanlineOfBand(0));
667 scanline1 =
static_cast< DstValueType *
>
668 (enc->currentScanlineOfBand(1));
669 scanline2 =
static_cast< DstValueType *
>
670 (enc->currentScanlineOfBand(2));
671 for( size_type x = 0; x < width; ++x, ++xs) {
672 *scanline0 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 0));
673 *scanline1 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 1));
674 *scanline2 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 2));
685 unsigned int offset = enc->getOffset();
686 DstValueType * scanline0;
687 DstValueType * scanline1;
688 DstValueType * scanline2;
689 DstValueType * scanline3;
690 for( size_type y = 0; y < height; ++y, ++ys.
y ) {
691 xs = ys.rowIterator();
692 scanline0 =
static_cast< DstValueType *
>
693 (enc->currentScanlineOfBand(0));
694 scanline1 =
static_cast< DstValueType *
>
695 (enc->currentScanlineOfBand(1));
696 scanline2 =
static_cast< DstValueType *
>
697 (enc->currentScanlineOfBand(2));
698 scanline3 =
static_cast< DstValueType *
>
699 (enc->currentScanlineOfBand(3));
700 for( size_type x = 0; x < width; ++x, ++xs) {
701 *scanline0 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 0));
702 *scanline1 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 1));
703 *scanline2 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 2));
704 *scanline3 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 3));
717 for( size_type y = 0; y < height; ++y, ++ys.
y ) {
718 for( size_type b = 0; b < num_bands; ++b ) {
719 xs = ys.rowIterator();
720 scanline =
static_cast< DstValueType *
>
721 (enc->currentScanlineOfBand(b));
722 for( size_type x = 0; x < width; ++x, ++xs ) {
723 *scanline = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, b ));
724 scanline += enc->getOffset();
733 template<
class MArray,
class DstValueType >
734 void write_bands( Encoder * enc, MArray
const & array, DstValueType)
736 typedef unsigned int size_type;
739 const size_type width = array.shape(0);
740 const size_type height = array.shape(1);
741 enc->setWidth(width);
742 enc->setHeight(height);
743 const size_type num_bands = array.shape(2);
744 enc->setNumBands(num_bands);
745 enc->finalizeSettings();
747 DstValueType * scanline;
750 for( size_type y = 0; y < height; ++y ) {
751 for( size_type b = 0; b < num_bands; ++b ) {
752 scanline =
static_cast< DstValueType *
>
753 (enc->currentScanlineOfBand(b));
754 for( size_type x = 0; x < width; ++x) {
755 *scanline = array(x, y, b);
756 scanline += enc->getOffset();
783 template<
class ImageIterator,
class Accessor,
class DstValueType >
786 typedef unsigned int size_type;
788 typedef typename Accessor::value_type SrcValueType;
791 const size_type width = size_type(lr.
x - ul.
x);
792 const size_type height = size_type(lr.
y - ul.
y);
793 enc->setWidth(width);
794 enc->setHeight(height);
796 enc->finalizeSettings();
798 DstValueType * scanline;
803 SrcRowIterator xs = ys.rowIterator();
805 for( y = 0; y < height; ++y, ++ys.
y ) {
806 xs = ys.rowIterator();
807 scanline =
static_cast< DstValueType *
>(enc->currentScanlineOfBand(0));
808 for( size_type x = 0; x < width; ++x, ++xs, ++scanline )
809 *scanline = detail::RequiresExplicitCast<DstValueType>::cast(a(xs));
817 template <
class SrcIterator,
class SrcAccessor,
class T >
818 void exportScalarImage(SrcIterator sul, SrcIterator slr, SrcAccessor sget,
819 Encoder * enc, T zero)
825 template <
class SrcIterator,
class SrcAccessor,
class T >
826 void exportScalarImage(SrcIterator sul, SrcIterator slr, SrcAccessor sget,
828 const ImageExportInfo & info,
831 double fromMin, fromMax, toMin, toMax;
832 if(info.getFromMin() < info.getFromMax())
834 fromMin = info.getFromMin();
835 fromMax = info.getFromMax();
839 typedef typename SrcAccessor::value_type SrcValue;
840 FindMinMax<SrcValue> minmax;
843 fromMin = (double)minmax.min;
844 fromMax = (
double)minmax.max;
845 if(fromMax <= fromMin)
846 fromMax = fromMin + 1.0;
849 if(info.getToMin() < info.getToMax())
851 toMin = info.getToMin();
852 toMax = info.getToMax();
860 double scale = (toMax - toMin) / (fromMax - fromMin);
861 double offset = (toMin / scale) - fromMin;
862 BasicImage<T> image(slr-sul);
863 transformImage( sul, slr, sget, image.upperLeft(), image.accessor(),
866 image.lowerRight(), image.accessor(), zero );
870 template <
class SrcIterator,
class SrcAccessor,
class T >
871 void exportVectorImage(SrcIterator sul, SrcIterator slr, SrcAccessor sget,
872 Encoder * enc, T zero)
874 int bands = sget.size(sul);
875 vigra_precondition(isBandNumberSupported(enc->getFileType(), bands),
876 "exportImage(): file format does not support requested number of bands (color channels)");
881 template <
class SrcIterator,
class SrcAccessor,
class T >
882 void exportVectorImage(SrcIterator sul, SrcIterator slr, SrcAccessor sget,
884 const ImageExportInfo & info,
887 unsigned int bands = sget.size(sul);
888 vigra_precondition(isBandNumberSupported(enc->getFileType(), bands),
889 "exportImage(): file format does not support requested number of bands (color channels)");
891 typedef typename SrcAccessor::ElementAccessor SrcElementAccessor;
892 typedef typename SrcElementAccessor::value_type SrcComponent;
893 double fromMin, fromMax, toMin, toMax;
894 if(info.getFromMin() < info.getFromMax())
896 fromMin = info.getFromMin();
897 fromMax = info.getFromMax();
901 FindMinMax<SrcComponent> minmax;
902 for(
unsigned int i=0; i<bands; ++i)
904 SrcElementAccessor band(i, sget);
908 fromMin = (double)minmax.min;
909 fromMax = (
double)minmax.max;
910 if(fromMax <= fromMin)
911 fromMax = fromMin + 1.0;
914 if(info.getToMin() < info.getToMax())
916 toMin = info.getToMin();
917 toMax = info.getToMax();
925 double scale = (toMax - toMin) / (fromMax - fromMin);
926 double offset = (toMin / scale) - fromMin;
927 int w = slr.x - sul.x;
928 int h = slr.y - sul.y;
931 MArray array(
typename MArray::difference_type(w, h, bands));
933 for(
unsigned int i=0; i<bands; ++i)
936 SrcElementAccessor band(i, sget);
937 transformImage( sul, slr, band, subImage.upperLeft(), subImage.accessor(),
963 template <
class SrcIterator,
class SrcAccessor >
965 const ImageExportInfo & info )
987 template <
class SrcIterator,
class SrcAccessor >
989 const ImageExportInfo & info )
1011 template <
class SrcIterator,
class SrcAccessor >
1013 const ImageExportInfo & info )
1035 template <
class SrcIterator,
class SrcAccessor >
1037 const ImageExportInfo & info )
1130 doxygen_overloaded_function(template <...>
void exportImage)
1132 template <
class SrcIterator,
class SrcAccessor >
1133 void exportImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
1134 const ImageExportInfo & info )
1136 typedef typename NumericTraits<typename SrcAccessor::value_type>::isScalar is_scalar;
1142 catch(Encoder::TIFFCompressionException &)
1144 const_cast<ImageExportInfo &
>(info).setCompression(
"");
1149 template <
class SrcIterator,
class SrcAccessor >
1151 void exportImage( triple<SrcIterator, SrcIterator, SrcAccessor> src,
1152 const ImageExportInfo & info )
1154 exportImage( src.first, src.second, src.third, info );
1157 template <
class SrcIterator,
class SrcAccessor >
1158 void exportImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
1159 const ImageExportInfo & info, VigraFalseType )
1161 typedef typename SrcAccessor::value_type AccessorValueType;
1162 typedef typename AccessorValueType::value_type SrcValueType;
1163 std::string pixeltype = info.getPixelType();
1164 std::auto_ptr<Encoder> enc = encoder(info);
1165 bool downcast = negotiatePixelType(enc->getFileType(),
1166 TypeAsString<SrcValueType>::result(), pixeltype);
1167 enc->setPixelType(pixeltype);
1168 if(downcast || info.hasForcedRangeMapping())
1170 if(pixeltype ==
"UINT8")
1171 detail::exportVectorImage( sul, slr, sget, enc.get(), info, (
UInt8)0);
1172 else if(pixeltype ==
"INT16")
1173 detail::exportVectorImage( sul, slr, sget, enc.get(), info,
Int16());
1174 else if(pixeltype ==
"UINT16")
1175 detail::exportVectorImage( sul, slr, sget, enc.get(), info, (
UInt16)0);
1176 else if(pixeltype ==
"INT32")
1177 detail::exportVectorImage( sul, slr, sget, enc.get(), info,
Int32());
1178 else if(pixeltype ==
"UINT32")
1179 detail::exportVectorImage( sul, slr, sget, enc.get(), info, (
UInt32)0);
1180 else if(pixeltype ==
"FLOAT")
1181 detail::exportVectorImage( sul, slr, sget, enc.get(), info, float());
1182 else if(pixeltype ==
"DOUBLE")
1183 detail::exportVectorImage( sul, slr, sget, enc.get(), info, double());
1187 if(pixeltype ==
"UINT8")
1188 detail::exportVectorImage( sul, slr, sget, enc.get(), (
UInt8)0);
1189 else if(pixeltype ==
"INT16")
1190 detail::exportVectorImage( sul, slr, sget, enc.get(),
Int16());
1191 else if(pixeltype ==
"UINT16")
1192 detail::exportVectorImage( sul, slr, sget, enc.get(), (
UInt16)0);
1193 else if(pixeltype ==
"INT32")
1194 detail::exportVectorImage( sul, slr, sget, enc.get(),
Int32());
1195 else if(pixeltype ==
"UINT32")
1196 detail::exportVectorImage( sul, slr, sget, enc.get(), (
UInt32)0);
1197 else if(pixeltype ==
"FLOAT")
1198 detail::exportVectorImage( sul, slr, sget, enc.get(), float());
1199 else if(pixeltype ==
"DOUBLE")
1200 detail::exportVectorImage( sul, slr, sget, enc.get(), double());
1205 template <
class SrcIterator,
class SrcAccessor >
1206 void exportImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
1207 const ImageExportInfo & info, VigraTrueType )
1209 typedef typename SrcAccessor::value_type SrcValueType;
1210 std::string pixeltype = info.getPixelType();
1211 std::auto_ptr<Encoder> enc = encoder(info);
1212 bool downcast = negotiatePixelType(enc->getFileType(),
1213 TypeAsString<SrcValueType>::result(), pixeltype);
1214 enc->setPixelType(pixeltype);
1215 if(downcast || info.hasForcedRangeMapping())
1217 if(pixeltype ==
"UINT8")
1218 detail::exportScalarImage( sul, slr, sget, enc.get(), info, (
UInt8)0);
1219 else if(pixeltype ==
"INT16")
1220 detail::exportScalarImage( sul, slr, sget, enc.get(), info,
Int16());
1221 else if(pixeltype ==
"UINT16")
1222 detail::exportScalarImage( sul, slr, sget, enc.get(), info, (
UInt16)0);
1223 else if(pixeltype ==
"INT32")
1224 detail::exportScalarImage( sul, slr, sget, enc.get(), info,
Int32());
1225 else if(pixeltype ==
"UINT32")
1226 detail::exportScalarImage( sul, slr, sget, enc.get(), info, (
UInt32)0);
1227 else if(pixeltype ==
"FLOAT")
1228 detail::exportScalarImage( sul, slr, sget, enc.get(), info, float());
1229 else if(pixeltype ==
"DOUBLE")
1230 detail::exportScalarImage( sul, slr, sget, enc.get(), info, double());
1234 if(pixeltype ==
"UINT8")
1235 detail::exportScalarImage( sul, slr, sget, enc.get(), (
UInt8)0);
1236 else if(pixeltype ==
"INT16")
1237 detail::exportScalarImage( sul, slr, sget, enc.get(),
Int16());
1238 else if(pixeltype ==
"UINT16")
1239 detail::exportScalarImage( sul, slr, sget, enc.get(), (
UInt16)0);
1240 else if(pixeltype ==
"INT32")
1241 detail::exportScalarImage( sul, slr, sget, enc.get(),
Int32());
1242 else if(pixeltype ==
"UINT32")
1243 detail::exportScalarImage( sul, slr, sget, enc.get(), (
UInt32)0);
1244 else if(pixeltype ==
"FLOAT")
1245 detail::exportScalarImage( sul, slr, sget, enc.get(), float());
1246 else if(pixeltype ==
"DOUBLE")
1247 detail::exportScalarImage( sul, slr, sget, enc.get(), double());