3 #include <QImageReader>
30 m_inputName =
new FileName(inputName);
81 GetChannelMethod getChannel = getBandChannel(out.
Band());
85 updateRawBuffer(out.
Line(), out.
Band());
90 int l = out.
Line() - 1;
92 out[s] = testSpecial((this->*getChannel)(getPixel(s, l)));
104 return import(outputName, att);
125 Cube *cube = createOutput(outputName, att);
134 else if (bands() == 3 || bands() == 4) {
138 if (bands() == 4) name +=
"Alpha";
142 "Cannot interpret BandBin for [" +
IString(bands()) +
"] band image",
149 PvlGroup mapping = convertProjection();
177 m_outCube->create(outputName.expanded(), att);
187 setBands((isGrayscale()) ? 1 : (isArgb()) ? 4 : 3);
260 "Cannot create an image with [" +
IString(b) +
"] bands",
320 if (pixel <= m_nullMax && pixel >= m_nullMin) {
323 else if (pixel <= m_hrsMax && pixel >= m_hrsMin) {
324 return Isis::HIGH_REPR_SAT8;
326 else if (pixel <= m_lrsMax && pixel >= m_lrsMin) {
327 return Isis::LOW_REPR_SAT8;
350 GetChannelMethod getChannel;
370 "Cannot determine channel for band [" +
IString(band) +
"]",
394 int red = getRed(pixel);
395 int green = getBlue(pixel);
396 int blue = getGreen(pixel);
397 return (red * 11 + green * 16 + blue * 5) / 32;
417 QString format = QImageReader::imageFormat(inputName.expanded());
418 if (format ==
"tiff") {
421 else if (format !=
"" && format !=
"jp2") {
424 else if (JP2Decoder::IsJP2(inputName.expanded().toAscii().data())) {
429 "Cannot determine image format for [" + inputName.expanded() +
"]",