Loading isis/src/base/apps/ddd2isis/ddd2isis.cpp +11 −8 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ void IsisMain() { // ddd files are LSB EndianSwapper swp("MSB"); // Verify that the file is a .ddd by reading in the first 4 bytes and // Verify that the file is a ddd by reading in the first 4 bytes and // comparing the magic numbers readBytes.readLong = 0; fin.seekg(0); Loading Loading @@ -76,7 +76,7 @@ void IsisMain() { } int totalBandBits = readBytes.readLong; // Maps the bit type of the file to the number of bytes // Maps the bit type of the file to the number of bytes of that type map<int, int> dataTypes = { {1450901768, 1}, {1450902032, 2}, Loading Loading @@ -141,14 +141,17 @@ void IsisMain() { p.SetPixelType(Isis::Real); break; default: IString msg = "Unsupported bit per pixel count [" + IString(totalBandBits) + "]. "; IString msg = "Unsupported bit per pixel count [" + IString(totalBandBits) + "]. "; //Do we need this? msg += "(Use the raw2isis and crop programs to import the file in case it is "; msg += "line or sample interleaved.)"; throw IException(IException::Io, msg, _FILEINFO_); } // ddd files are pixel interleaved // ddd files with more than one band are pixel interleaved // Having one band is similar to BIP, but this is here for clarification if (nBands > 1) { p.SetOrganization(ProcessImport::BIP); } p.SetDimensions(nSamples, nLines, nBands); p.SetFileHeaderBytes(nOffset); Loading isis/src/base/apps/ddd2isis/ddd2isis.xml +9 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,15 @@ will need to be read in using a combination of the raw2isis and crop programs. Fixes #1713. </change> <change name="Kaitlyn Lee" date="2018-03-01"> We were given a python program that reads in data from a ddd file to use as an example. In the python program, the way they calculate the number of bands is different from the one we previously used. The old formula did the number of total band bits / 8; the formula is now the (number of total band bits / 8) / the number of bytes of the data type of the file's bit type. ddd files are also pixel interleaved, so the program can now process files with multiple bands. Fixes #703. </change> </history> <category> Loading Loading
isis/src/base/apps/ddd2isis/ddd2isis.cpp +11 −8 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ void IsisMain() { // ddd files are LSB EndianSwapper swp("MSB"); // Verify that the file is a .ddd by reading in the first 4 bytes and // Verify that the file is a ddd by reading in the first 4 bytes and // comparing the magic numbers readBytes.readLong = 0; fin.seekg(0); Loading Loading @@ -76,7 +76,7 @@ void IsisMain() { } int totalBandBits = readBytes.readLong; // Maps the bit type of the file to the number of bytes // Maps the bit type of the file to the number of bytes of that type map<int, int> dataTypes = { {1450901768, 1}, {1450902032, 2}, Loading Loading @@ -141,14 +141,17 @@ void IsisMain() { p.SetPixelType(Isis::Real); break; default: IString msg = "Unsupported bit per pixel count [" + IString(totalBandBits) + "]. "; IString msg = "Unsupported bit per pixel count [" + IString(totalBandBits) + "]. "; //Do we need this? msg += "(Use the raw2isis and crop programs to import the file in case it is "; msg += "line or sample interleaved.)"; throw IException(IException::Io, msg, _FILEINFO_); } // ddd files are pixel interleaved // ddd files with more than one band are pixel interleaved // Having one band is similar to BIP, but this is here for clarification if (nBands > 1) { p.SetOrganization(ProcessImport::BIP); } p.SetDimensions(nSamples, nLines, nBands); p.SetFileHeaderBytes(nOffset); Loading
isis/src/base/apps/ddd2isis/ddd2isis.xml +9 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,15 @@ will need to be read in using a combination of the raw2isis and crop programs. Fixes #1713. </change> <change name="Kaitlyn Lee" date="2018-03-01"> We were given a python program that reads in data from a ddd file to use as an example. In the python program, the way they calculate the number of bands is different from the one we previously used. The old formula did the number of total band bits / 8; the formula is now the (number of total band bits / 8) / the number of bytes of the data type of the file's bit type. ddd files are also pixel interleaved, so the program can now process files with multiple bands. Fixes #703. </change> </history> <category> Loading