29 int pixelBytes =
m_decoder->GetPixelBytes();
30 if (pixelBytes == 1) {
33 else if (pixelBytes == 2) {
34 bool signedData =
m_decoder->GetSignedData();
35 m_pixelType = signedData ? Isis::SignedWord : Isis::UnsignedWord;
39 "The file [" +
filename().expanded() +
40 "] contains unsupported data type",
48 for (
int i = 0; i <
bands(); i++)
m_buffer[i] =
new char [readBytes];
52 "The file [" + inputName.expanded() +
53 "] cannot be opened as a JPEG 2000 file",
78 return m_decoder->GetBandDimension() == 1;
88 return m_decoder->GetBandDimension() == 3;
98 return m_decoder->GetBandDimension() == 4;
223 case Isis::UnsignedByte:
224 value = (int) ((
unsigned char *)
m_buffer[b])[s];
226 case Isis::UnsignedWord:
227 value = (int) ((
unsigned short int *)
m_buffer[b])[s];
229 case Isis::SignedWord:
230 value = (int) ((
short int *)
m_buffer[b])[s];