Isis 3 Programmer Reference
|
Process class for exporting cubes. More...
#include <ProcessExport.h>
Public Types | |
enum | ExportFormat { BSQ , BIL , BIP , JP2 } |
Storage order enumeration. More... | |
Public Member Functions | |
ProcessExport () | |
Constructs an Export object. | |
virtual | ~ProcessExport () |
Destructor. | |
virtual void | StartProcess (void funct(Isis::Buffer &in)) |
This method invokes the process operation over a single input cube. | |
virtual void | StartProcess (void funct(std::vector< Isis::Buffer * > &in)) |
virtual void | StartProcess (std::ofstream &fout) |
Write an entire cube to an output file stream. | |
void | SetOutputRange (const double minimum, const double maximum) |
Set output pixel range in Buffer. | |
void | SetOutputNull (const double value) |
Set output special pixel value for NULL. | |
void | SetOutputLis (const double value) |
Set output special pixel value for LIS. | |
void | SetOutputLrs (const double value) |
Set output special pixel value for LRS. | |
void | SetOutputHis (const double value) |
Set output special pixel value for HIS. | |
void | SetOutputHrs (const double value) |
Set output special pixel value for HRS. | |
double | OutputNull () |
Return the output special pixel value for NULL. | |
double | OutputLis () |
Return the output special pixel value for LIS. | |
double | OutputLrs () |
Return the output special pixel value for LRS. | |
double | OutputHis () |
Return the output special pixel value for HIS. | |
double | OutputHrs () |
Return the output special pixel value for HRS. | |
bool | HasInputRange () const |
void | SetInputRange () |
Set input pixel range from user. | |
void | SetInputRange (UserInterface &ui) |
void | SetInputRange (const double minimum, const double maximum) |
Set input pixel range from to a linear stretch. | |
void | SetInputRange (const double minimum, const double maximum, const int index) |
Set input pixel range from to a linear stretch. | |
void | SetInputRange (const double minimum, const double middle, const double maximum) |
Set input pixel range from to a piecewise linear stretch. | |
void | SetInputRange (const double minimum, const double middle, const double maximum, const int index) |
Set input pixel range from to a piecewise linear stretch. | |
void | CreateWorldFile (const QString &worldFile) |
Create a standard world file for the input cube. | |
void | SetOutputEndian (enum ByteOrder endianness) |
Set byte endianness of the output cube. | |
void | SetOutputType (Isis::PixelType pixelIn) |
Set output pixel bit type in Buffer. | |
void | setCanGenerateChecksum (bool flag) |
@description Set m_canGenerateChecksum which determines if we can generate a MD5 checksum on the image data. | |
bool | canGenerateChecksum () |
@description Return if we can generate a checksum | |
QString | checksum () |
@description Generates a file checksum. | |
double | GetInputMinimum (unsigned int n=0) const |
Get the valid minimum pixel value for the Nth input cube. | |
double | GetInputMaximum (unsigned int n=0) const |
Get the valid maximum pixel value for the Nth input cube. | |
double | GetOutputMinimum () |
Get the valid minimum pixel value to be written to the output file. | |
double | GetOutputMaximum () |
Get the valid maximum pixel value to be written to the output file. | |
void | setFormat (ExportFormat format) |
Sets the storage order of the output file. | |
template<typename Functor > | |
void | ProcessCubes (const Functor &functor) |
virtual void | StartProcess (void funct()) |
In the base class, this method will invoked a user-specified function exactly one time. | |
virtual void | EndProcess () |
End the processing sequence and cleans up by closing cubes, freeing memory, etc. | |
virtual void | Finalize () |
Cleans up by closing cubes and freeing memory for owned cubes. | |
virtual Isis::Cube * | SetInputCube (const QString ¶meter, const int requirements=0) |
Opens an input cube specified by the user and verifies requirements are met. | |
virtual Isis::Cube * | SetInputCube (const QString &fname, const Isis::CubeAttributeInput &att, int requirements=0) |
Opens an input cube specified by the programmer and verifies requirements are met. | |
virtual void | SetInputCube (Isis::Cube *inCube, int requirements=0) |
Set the InputCube vector to an opened Cube which was dynamically allocated. | |
virtual Isis::Cube * | SetOutputCube (const QString ¶meter) |
Allocates a user-specified output cube whose size matches the first input cube. | |
virtual Isis::Cube * | SetOutputCube (const QString ¶meter, const int nsamps, const int nlines, const int nbands=1) |
Allocates a user specified output cube whose size is specified by the programmer. | |
virtual Isis::Cube * | SetOutputCube (const QString &fname, const Isis::CubeAttributeOutput &att, const int nsamps, const int nlines, const int nbands=1) |
Allocates a output cube whose name and size is specified by the programmer. | |
virtual Isis::Cube * | SetOutputCubeStretch (const QString ¶meter, UserInterface *ui=nullptr) |
Allocates a user-specified output cube whose size matches the first input cube. | |
virtual Isis::Cube * | SetOutputCubeStretch (const QString ¶meter, const int nsamps, const int nlines, const int nbands=1, UserInterface *ui=nullptr) |
Allocates a user specified output cube whose size is specified by the programmer. | |
void | AddInputCube (Cube *cube, bool owned=true) |
void | AddOutputCube (Cube *cube, bool owned=true) |
void | CheckRequirements (const Cube *cube, const int requirements) |
Checks to make sure the input cube meets the inputted requirements. | |
void | ClearCubes () |
Close owned cubes from the list and clear the list. | |
void | ClearInputCubes () |
Close owned input cubes from the list and clear the list. | |
void | ClearOutputCubes () |
Close owned output cubes from the list and clear the list. | |
void | PropagateLabels (const bool prop) |
This method allows the programmer to turn on/off the propagation of labels from the 1st input cube to any of the output cubes. | |
void | PropagateLabels (const QString &cube) |
This method allows the programmer to propagate labels from a specific secondary cube. | |
void | PropagateTables (const bool prop) |
This method allows the programmer to propagate input tables to the output cube (default is true) | |
void | PropagateTables (const QString &fromName, const QList< QString > &tableNames=QList< QString >()) |
Propagate the tables from the cube with the given filename to the output cube. | |
void | PropagatePolygons (const bool prop) |
This method allows the programmer to propagate input blobs to the output cube (default is true) | |
void | PropagateHistory (const bool prop) |
This method allows the programmer to propagate history to the output cube (default is true) | |
void | PropagateOriginalLabel (const bool prop) |
This method allows the programmer to propagate original labels to the output cube (default is true) | |
Isis::Progress * | Progress () |
This method returns a pointer to a Progress object. | |
QString | MissionData (const QString &mission, const QString &file, bool highestVersion=false) |
This method reads the mission specific data directory from the user preference file, makes sure that mission is available in the Isis installation, and the attaches the provided input file to the directory in order to create a full file specification. | |
void | WriteHistory (Cube &cube) |
Writes out the History blob to the cube. | |
void | CalculateStatistics () |
Calculates and stores off statistics on every band of every cube added to this process via the SetInputCube method. | |
std::vector< Isis::Statistics * > | BandStatistics (const unsigned index) |
Get the vector of Statistics objects for each band separately of a specified input cube. | |
Isis::Statistics * | CubeStatistics (const unsigned index) |
Get the Statistics object for all bands of a specified input cube. | |
Protected Member Functions | |
std::vector< BufferManager * > | GetBuffers () |
std::vector< BufferManager * > | GetBuffersBSQ () |
A single line of input data from each input cube will be passed to the line processing function. | |
std::vector< BufferManager * > | GetBuffersBIL () |
A single line of input data from each input cube will be passed to the line processing function. | |
std::vector< BufferManager * > | GetBuffersBIP () |
A single band of input data from each input cube will be passed to the band processing function. | |
Protected Attributes | |
ExportFormat | p_format |
Current storage order. | |
double | p_outputMinimum |
Desired minimum pixel value in the Buffer. | |
double | p_outputMiddle |
Middle pixel value (minimum+maximun)/2.0 in the Buffer. | |
double | p_outputMaximum |
Desired maximum pixel value in the Buffer. | |
std::vector< double > | p_inputMinimum |
Minimum pixel value in the input cube to be mapped to the minimum value in the Buffer. | |
std::vector< double > | p_inputMiddle |
Middle pixel value in the input cube to be mapped to the (minimum+maximum)/2.0 value in the Buffer. | |
std::vector< double > | p_inputMaximum |
Maximum pixel value in the input cube to be mapped to the maximum value in the Buffer. | |
EndianSwapper * | p_endianSwap |
Object to swap the endianness of the raw output to either MSB or LSB. | |
ByteOrder | p_endianType |
The byte order of the output file. | |
PixelType | p_pixelType |
The bits per pixel of the output image. | |
std::vector< Stretch * > | p_str |
Stretch object to ensure a reasonable range of pixel values in the output data. | |
double | p_Null |
The output value for pixels whose input DNs are Null values. | |
double | p_Lis |
The output value for pixels whose input DNs are Low Instrument Saturation values. | |
double | p_Lrs |
The output value for pixels whose input DNs are Low Representation Saturation values. | |
double | p_His |
The output value for pixels whose input DNs are High Instrument Saturation values. | |
double | p_Hrs |
The output value for pixels whose input DNs are High Representation Saturation values. | |
bool | p_Null_Set |
Indicates whether p_Null has been set (i.e. | |
bool | p_Lis_Set |
Indicates whether p_Lis has been set (i.e. | |
bool | p_Lrs_Set |
Indicates whether p_Lrs has been set (i.e. | |
bool | p_His_Set |
Indicates whether p_His has been set (i.e. | |
bool | p_Hrs_Set |
Indicates whether p_Hrs has been set (i.e. | |
QCryptographicHash * | m_cryptographicHash |
A cryptographic hash that will generate an MD5 checksum of the image data. | |
bool | m_canGenerateChecksum |
Flag to determine if a file checksum will be generated. | |
Isis::Progress * | p_progress |
Pointer to a Progress object. | |
bool | p_propagateLabels |
Flag indicating if labels are be propagated to output cubes. | |
bool | p_propagateTables |
Flag indicating if tables are be propagated to output cubes. | |
bool | p_propagatePolygons |
Flag indicating if blobs are be propagated to output cubes. | |
bool | p_propagateHistory |
Flag indicating if history is to be propagated to output cubes. | |
bool | p_propagateOriginalLabel |
Flag indicating if original lable is to be propagated to output cubes. | |
std::vector< std::vector< Isis::Statistics * > > | p_bandStats |
Holds the calculated statistics for each band separately of every input cubei after the CalculateStatistics method is called. | |
std::vector< Isis::Statistics * > | p_cubeStats |
Holds the calculated statistics for every band together of every input cubei after the CalculateStatistics method is called. | |
std::vector< Isis::Cube * > | InputCubes |
A vector of pointers to opened Cube objects. | |
std::vector< Isis::Cube * > | OutputCubes |
A vector of pointers to allocated Cube objects. | |
QSet< Isis::Cube * > * | m_ownedCubes |
A list of cubes owned by this instant. | |
Private Member Functions | |
void | isisOut8 (Buffer &in, std::ofstream &fout) |
Method for writing 8-bit unsigned pixel data to a file stream. | |
void | isisOut16s (Buffer &in, std::ofstream &fout) |
Method for writing 16-bit signed pixel data to a file stream. | |
void | isisOut16u (Buffer &in, std::ofstream &fout) |
Method for writing 16-bit unsigned pixel data to a file stream. | |
void | isisOut32 (Buffer &in, std::ofstream &fout) |
Method for writing 32-bit signed floating point pixels data to a file stream. | |
void | isisOut64 (Buffer &in, std::ofstream &fout) |
Method for writing 64-bit signed double precision floating point pixels data to a file stream. | |
void | InitProcess () |
Convenience method that checks to make sure the user is only using valid input to the StartProcess method. | |
Process class for exporting cubes.
This class allows a programmer to develop applications which export Isis cubes into another format. For example, isis2jpg or isis2tif. It is highly recommended that this object be utilized when developing export applications to ensure a consistent look-and-feel for Isis users. The class operates by passing the programmer a line of cube data at a time. It is up to the programmer to write this data to the foreign output format. An ability exists to stretch the data supplied to the programmer in one of three ways. Either an automatic linear stretch, an automatic piecewise stretch, or an manual linear stretch. There are various methods which specify how the input pixels are to be stretched to an output range. You can examine the isis2jpg application code as a guide for writing an export program. Currently this class only allows for one band of a cube to be exported.
If you would like to see ProcessExport being used in implementation, see isis2jpg.cpp
2003-04-03 Jeff Anderson - Added unit test
2003-04-04 Jeff Anderson - Updated documentation for SetInputRange methods
2003-05-16 Stuart Sides - Modified schema from astrogeology... isis.astrogeology...
2005-01-07 Stuart Sides - Added CreateWorldFile method
2005-02-08 Elizabeth Ribelin - Modified file to support Doxygen documentation
2005-06-14 Drew Davidson - Overloaded StartProcess method to output directly to a stream.
2005-06-15 Drew Davidson - Updated to support multi-band output.
2006-02-27 Jacob Danton - Added Multiple input cube support
2006-05-08 Elizabeth Miller - Modified SetInputRange() to get the min and max percent values from the userinterface (0.5 and 99.5 are still the default values)
2006-05-15 Jeff Anderson - Fixed bug with multiple input cube support when the programmer didn't set a input minimum/maximum
2006-05-23 Jacob Danton - Added seperate MIN/MAX values for each input channel
2006-08-30 Jeff Anderson - Fixed memory leak
2007-12-17 Christopher Austin - Added processes for BIL and BIP, leaving BSQ as the default, as well as fixed rounding accuracy.
2008-05-12 Steven Lambright - Removed references to CubeInfo
2008-06-18 Steven Koechle - Fixed Documentation Errors
2008-08-14 Christopher Austin - Added the Destructor to fix memory leaks, as well as changed the EndianSwapper::Float() call to EndianSwapper::ExportFloat() in isisOut32() to fix bad float casting.
2008-12-17 Steven Lambright - Changed SetOutputRange calls to use constants (i.e. instead of 65535 VALID_MAX2 is used).
2009-07-27 Steven Lambright - Piecewise stretch backs off to linear if Median() == MINPCT or Median() == MAXPCT
2010-02-24 Janet Barrett - Added code to support JPEG2000
2012-10-04 Jeannie Backer - Added documentation and fixed indentation of history entries. No mantis ticket.
2013-06-05 Jeannie Backer - Replaced redundant code in InitProcess() with accessor methods for OutputNull(), et al. Changed local variable names in ProcessCubes for clarity. References #1380.
2015-01-15 Sasha Brownsberger - Added virtual keyword to several functions to ensure successful inheritance between Process and its child classes. Added virtual keyword to destructor. References #2215.
2016-04-21 Makayla Shepherd - Added UnsignedWord pixel type handling.
2017-05-17 Makayla Shepherd - Added setCanGenerateChecksum(), canGenerateChecksum(), and checksum(). Added m_cryptographicHash and m_canGenerateChecksum. This allows an MD5 checksum to be generated when exporting an image. This checksum is generated based on the image data. Fixes #1013.
2005-02-09 Stuart Sides - write documentation for CreateWorldFile method
2005-02-09 Jeff Anderson - add coded example to class file and implementation examples
Definition at line 111 of file ProcessExport.h.
Storage order enumeration.
Enumerator | |
---|---|
BSQ | Band sequential. |
BIL | Band interleaved by line. |
BIP | Band interleaved by pixel. |
JP2 | Compressed JPEG2000. |
Definition at line 116 of file ProcessExport.h.
Isis::ProcessExport::ProcessExport | ( | ) |
Constructs an Export object.
Definition at line 28 of file ProcessExport.cpp.
References BSQ, Isis::IsLsb(), m_canGenerateChecksum, m_cryptographicHash, p_endianSwap, p_His_Set, p_Hrs_Set, p_inputMaximum, p_inputMiddle, p_inputMinimum, p_Lis_Set, p_Lrs_Set, p_Null_Set, p_outputMaximum, p_outputMiddle, p_outputMinimum, Isis::Process::p_progress, setFormat(), SetOutputEndian(), SetOutputType(), and Isis::Progress::SetText().
|
virtual |
Destructor.
Definition at line 58 of file ProcessExport.cpp.
References m_cryptographicHash, p_endianSwap, and p_str.
|
inherited |
Definition at line 476 of file Process.cpp.
|
inherited |
Definition at line 482 of file Process.cpp.
|
inlineinherited |
Get the vector of Statistics objects for each band separately of a specified input cube.
index | The index of the input cube in InputCubes |
Definition at line 279 of file Process.h.
References Isis::Process::p_bandStats.
|
inherited |
Calculates and stores off statistics on every band of every cube added to this process via the SetInputCube method.
The newly calculated statistics are stored in two ways: as a vector where each entry is a single Statistics object for every band of a particular input cube, and as a vector where each entry is a vector of Statistics objects, for each band separately, of a particular input cube.
Definition at line 858 of file Process.cpp.
References Isis::Cube::bandCount(), Isis::Progress::CheckStatus(), Isis::Buffer::DoubleBuffer(), Isis::Process::InputCubes, Isis::Cube::lineCount(), Isis::Process::p_bandStats, Isis::Process::p_cubeStats, Isis::Cube::read(), Isis::LineManager::SetLine(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::Buffer::size(), and Isis::toString().
bool Isis::ProcessExport::canGenerateChecksum | ( | ) |
@description Return if we can generate a checksum
Definition at line 684 of file ProcessExport.cpp.
References m_canGenerateChecksum.
Referenced by Isis::ProcessExportPds::FixedImageRoot(), and Isis::ProcessExportPds::StreamImageRoot().
|
inherited |
Checks to make sure the input cube meets the inputted requirements.
cube | Cube to check |
requirements | Use to specify requirements for the input file. The following requirments are checked against 1) ic_base::SizeMatch checks to make sure the input cube has the same bands, samples, and lines as the first input cube open using this method, 2) ic_base::SpatialMatch checks to make sure the input cube has the same samples and lines as the first input cube, 3) ic_base::Georeferenced checks to make sure latitude/longitudes can be obtained from the input cube, 4) ic_base::FullyGeoreferenced checks to make sure latitude/longitude, phase/incidence/emission, and other geometric parameters can be obtained from the input cube, 5) ic_base::OneBand checks to make sure the input cube has exactly one band. Note, that these requirements can be logically or'ed. For example, ic_base::SpatialMatch | ic_base::georeferenced. Defaults to 0 |
Isis::iException::Message |
Definition at line 513 of file Process.cpp.
References Isis::Cube::bandCount(), Isis::Cube::fileName(), Isis::Process::InputCubes, Isis::Cube::lineCount(), Isis::Cube::sampleCount(), and Isis::IException::User.
Referenced by Isis::Process::SetInputCube(), and Isis::Process::SetInputCube().
QString Isis::ProcessExport::checksum | ( | ) |
@description Generates a file checksum.
This must be called after StartProcess.
Definition at line 694 of file ProcessExport.cpp.
References checksum(), m_canGenerateChecksum, m_cryptographicHash, and Isis::IException::Programmer.
Referenced by checksum(), and Isis::ProcessExportPds::updateChecksumInLabel().
|
inherited |
Close owned cubes from the list and clear the list.
Definition at line 603 of file Process.cpp.
References Isis::Process::ClearInputCubes(), Isis::Process::ClearOutputCubes(), and Isis::Process::m_ownedCubes.
Referenced by Isis::Process::Finalize().
|
inherited |
Close owned input cubes from the list and clear the list.
Definition at line 614 of file Process.cpp.
References Isis::Process::InputCubes, and Isis::Process::m_ownedCubes.
Referenced by Isis::Process::ClearCubes(), Isis::ProcessGroundPolygons::SetStatCubes(), and Isis::ProcessMapMosaic::StartProcess().
|
inherited |
Close owned output cubes from the list and clear the list.
Definition at line 629 of file Process.cpp.
References Isis::Process::m_ownedCubes, and Isis::Process::OutputCubes.
Referenced by Isis::Process::ClearCubes().
void Isis::ProcessExport::CreateWorldFile | ( | const QString & | worldFile | ) |
Create a standard world file for the input cube.
This method creates a standard world file from the mapping group of the input cube.
worldFile | [in] Reference to a string containing the name of a file to write the world information to. |
Definition at line 1255 of file ProcessExport.cpp.
References Isis::Process::InputCubes, and Isis::Projection::SetWorld().
|
inlineinherited |
Get the Statistics object for all bands of a specified input cube.
index | The index of the input cube in InputCubes |
Definition at line 293 of file Process.h.
References Isis::Process::p_cubeStats.
|
virtualinherited |
End the processing sequence and cleans up by closing cubes, freeing memory, etc.
Reimplemented in Isis::ProcessByBoxcar, Isis::ProcessByBrick, Isis::ProcessByTile, Isis::ProcessGroundPolygons, Isis::ProcessImportPds, Isis::ProcessMosaic, and Isis::ProcessPolygons.
Definition at line 462 of file Process.cpp.
References Isis::Process::Finalize().
Referenced by Isis::ProcessByBoxcar::EndProcess(), Isis::ProcessByBrick::EndProcess(), Isis::ProcessMosaic::EndProcess(), Isis::ProcessPolygons::EndProcess(), Isis::ProcessExportPds4::WritePds4(), and Isis::Process::~Process().
|
virtualinherited |
Cleans up by closing cubes and freeing memory for owned cubes.
Clears the lists for all cubes.
Reimplemented in Isis::ProcessByBoxcar, Isis::ProcessByBrick, Isis::ProcessByTile, Isis::ProcessGroundPolygons, Isis::ProcessImportPds, and Isis::ProcessPolygons.
Definition at line 471 of file Process.cpp.
References Isis::Process::ClearCubes().
Referenced by Isis::Process::EndProcess(), Isis::ProcessByBoxcar::Finalize(), Isis::ProcessImportPds::Finalize(), and Isis::ProcessPolygons::Finalize().
|
protected |
Definition at line 870 of file ProcessExport.cpp.
|
protected |
A single line of input data from each input cube will be passed to the line processing function.
Note the data will be stretched based on the invocations of the SetInputRange and SetOutputRange methods.
funct | (Isis::Buffer &b) Name of your line processing function. The buffer in will contain stretched input cube pixels for an entire line of each input cube. These pixels must be written to the foreign output file (e.g, jpg, tif, etc). |
Definition at line 944 of file ProcessExport.cpp.
References Isis::Process::InputCubes, and Isis::IException::Programmer.
|
protected |
A single band of input data from each input cube will be passed to the band processing function.
Note the data will be stretched based on the invocations of the SetInputRange and SetOutputRange methods.
funct | (Isis::Buffer &b) Name of your band processing function. The buffer in will contain stretched input cube pixels for an entire line of each input cube. These pixels must be written to the foreign output file (e.g, jpg, tif, etc). |
Definition at line 982 of file ProcessExport.cpp.
References Isis::Process::InputCubes, and Isis::IException::Programmer.
|
protected |
A single line of input data from each input cube will be passed to the line processing function.
Note the data will be stretched based on the invocations of the SetInputRange and SetOutputRange methods.
funct | (Isis::Buffer &b) Name of your line processing function. The buffer in will contain stretched input cube pixels for an entire line of each input cube. These pixels must be written to the foreign output file (e.g, jpg, tif, etc). |
Definition at line 905 of file ProcessExport.cpp.
References Isis::Process::InputCubes, and Isis::IException::Programmer.
double Isis::ProcessExport::GetInputMaximum | ( | unsigned int | n = 0 | ) | const |
Get the valid maximum pixel value for the Nth input cube.
Definition at line 429 of file ProcessExport.cpp.
References p_inputMaximum, and Isis::IException::Programmer.
Referenced by Isis::ImageExporter::inputMaximum().
double Isis::ProcessExport::GetInputMinimum | ( | unsigned int | n = 0 | ) | const |
Get the valid minimum pixel value for the Nth input cube.
Definition at line 418 of file ProcessExport.cpp.
References p_inputMinimum, and Isis::IException::Programmer.
Referenced by Isis::ImageExporter::inputMinimum().
|
inline |
Get the valid maximum pixel value to be written to the output file.
Definition at line 165 of file ProcessExport.h.
References p_outputMaximum.
|
inline |
Get the valid minimum pixel value to be written to the output file.
Definition at line 161 of file ProcessExport.h.
References p_outputMinimum.
bool Isis::ProcessExport::HasInputRange | ( | ) | const |
Definition at line 412 of file ProcessExport.cpp.
|
private |
Convenience method that checks to make sure the user is only using valid input to the StartProcess method.
Set cube up for processing.
Also sets the cube up to be processed by performing the necessary stretches.
This method is called from startProcess() to validate the input cube before processing and to ready the input cube for reading line by line in the cases of BSQ and BIL, or reading band by band in the case of BIP.
Isis::iException::Message | - No input cube was specified |
Definition at line 726 of file ProcessExport.cpp.
References BIP, Isis::Progress::CheckStatus(), Isis::Process::InputCubes, Isis::IsValidPixel(), OutputHis(), OutputHrs(), OutputLis(), OutputLrs(), OutputNull(), p_format, p_inputMaximum, p_inputMiddle, p_inputMinimum, p_outputMaximum, p_outputMiddle, p_outputMinimum, Isis::Process::p_progress, p_str, Isis::IException::Programmer, and Isis::Progress::SetMaximumSteps().
Referenced by StartProcess(), and StartProcess().
|
private |
Method for writing 16-bit signed pixel data to a file stream.
Write a buffer of 16-bit signed pixel data to a stream.
This method takes a buffer of data and assumes that it is 16-bit signed pixel data. It will apply the necessary endian swap to the data and write it out to the output file buffer that the user specifies. The user can only expect to access this method indirectly by calling the StartProcess method.
&in | Reference to a single buffer of pixel data. Note that this buffer will already have had the necessary stretching operations, though it will have the native endianness of the system. |
&fout | Name of the file stream to which the buffer of pixel data will be written. |
Definition at line 1136 of file ProcessExport.cpp.
References p_endianSwap, and Isis::EndianSwapper::ShortInt().
Referenced by StartProcess().
|
private |
Method for writing 16-bit unsigned pixel data to a file stream.
Write a bufferof 16-bit unsigned pixel data to a stream.
This method takes a buffer of data and assumes that it is 16-bit unsigned pixel data. It will apply the necessary endian swap to the data and write it out to the output file buffer that the user specifies. The user can only expect to access this method indirectly by calling the StartProcess method.
&in | Reference to a single buffer of pixel data. Note that this buffer will already have had the necessary stretching operations, though it will have the native endianness of the system. |
&fout | Name of the file stream to which the buffer of pixel data will be written. |
Definition at line 1183 of file ProcessExport.cpp.
References p_endianSwap, and Isis::EndianSwapper::UnsignedShortInt().
Referenced by StartProcess().
|
private |
Method for writing 32-bit signed floating point pixels data to a file stream.
Write a buffer of 32-bit floating point pixel data to a stream.
This method takes a buffer of data and assumes that it is 32-bit floating point pixel data. It will apply the necessary endian swap to the data and write it out to the output file buffer that the user specifies. The user can only expect to access this method indirectly by calling the StartProcess method.
&in | Reference to a single buffer of pixel data. Note that this buffer will already have had the necessary stretching operations, though it will have the native endianness of the system. |
&fout | Name of the file stream to which the buffer of pixel data will be written. |
Definition at line 1223 of file ProcessExport.cpp.
References Isis::EndianSwapper::ExportFloat(), and p_endianSwap.
Referenced by StartProcess().
|
private |
Method for writing 64-bit signed double precision floating point pixels data to a file stream.
|
private |
Method for writing 8-bit unsigned pixel data to a file stream.
Write a buffer of 8-bit pixel data to a stream.
This method takes a buffer of data and assumes that it is 8 bit pixel data. It will apply the necessary endian swap to the data and write it out to the output file buffer that the user specifies. The user can only expect to access this method indirectly by calling the StartProcess method
&in | Reference to a single buffer of pixel data. Note that this buffer will already have had the necessary stretching operations, though it will have the native endianness of the system. |
&fout | Name of the file stream to which the buffer of pixel data will be written. |
Definition at line 1099 of file ProcessExport.cpp.
Referenced by StartProcess().
|
inherited |
This method reads the mission specific data directory from the user preference file, makes sure that mission is available in the Isis installation, and the attaches the provided input file to the directory in order to create a full file specification.
mission | Name of the mission data directory |
file | Name of the file to attach to the end of the directory |
highestVersion | If set to true the method will return the highest version number of the given file. Therefore, file must contain question marks such as "file???.dat". See the FileName class for more information on versioned files. Defaults to false. |
Definition at line 788 of file Process.cpp.
References Isis::FileName::expanded(), Isis::FileName::fileExists(), Isis::FileName::highestVersion(), Isis::IException::Io, and Isis::FileName::original().
double Isis::ProcessExport::OutputHis | ( | ) |
Return the output special pixel value for HIS.
Definition at line 569 of file ProcessExport.cpp.
References p_His, p_His_Set, and p_outputMaximum.
Referenced by InitProcess(), Isis::ProcessExportPds::StandardImageImage(), and Isis::ProcessExportPds::StandardJP2Image().
double Isis::ProcessExport::OutputHrs | ( | ) |
Return the output special pixel value for HRS.
Definition at line 577 of file ProcessExport.cpp.
References p_Hrs, p_Hrs_Set, and p_outputMaximum.
Referenced by InitProcess(), Isis::ProcessExportPds::StandardImageImage(), and Isis::ProcessExportPds::StandardJP2Image().
double Isis::ProcessExport::OutputLis | ( | ) |
Return the output special pixel value for LIS.
Definition at line 553 of file ProcessExport.cpp.
References p_Lis, p_Lis_Set, and p_outputMinimum.
Referenced by InitProcess(), Isis::ProcessExportPds::StandardImageImage(), and Isis::ProcessExportPds::StandardJP2Image().
double Isis::ProcessExport::OutputLrs | ( | ) |
Return the output special pixel value for LRS.
Definition at line 561 of file ProcessExport.cpp.
References p_Lrs, p_Lrs_Set, and p_outputMinimum.
Referenced by InitProcess(), Isis::ProcessExportPds::StandardImageImage(), and Isis::ProcessExportPds::StandardJP2Image().
double Isis::ProcessExport::OutputNull | ( | ) |
Return the output special pixel value for NULL.
Definition at line 545 of file ProcessExport.cpp.
References p_Null, p_Null_Set, and p_outputMinimum.
Referenced by InitProcess(), Isis::ProcessExportPds::StandardImageImage(), and Isis::ProcessExportPds::StandardJP2Image().
|
inline |
Definition at line 175 of file ProcessExport.h.
|
inlineinherited |
This method returns a pointer to a Progress object.
Definition at line 259 of file Process.h.
References Isis::Process::p_progress.
Referenced by Isis::Equalization::applyCorrection(), and Isis::ProcessMapMosaic::StartProcess().
|
inherited |
This method allows the programmer to propagate history to the output cube (default is true)
prop | Flag indicating if history is to be propagated to output cubes. |
Definition at line 755 of file Process.cpp.
References Isis::Process::p_propagateHistory.
|
inherited |
This method allows the programmer to turn on/off the propagation of labels from the 1st input cube to any of the output cubes.
By default, propagation occurs automatically in the Process class when a call to either of the SetOutputCube methods is invoked. If the program * requires no propagation then utilize this method. This method can be invoked between successive calls of SetOutputCube so that some cube will have labels propagated while others will not.
prop | Flag indicating if labels are be propagated to output cubes. |
Definition at line 652 of file Process.cpp.
References Isis::Process::p_propagateLabels.
|
inherited |
This method allows the programmer to propagate labels from a specific secondary cube.
cube | IString containing the name of the cube containing the labels to propagate. |
Definition at line 664 of file Process.cpp.
References Isis::PvlObject::findObject(), and Isis::Process::OutputCubes.
|
inherited |
This method allows the programmer to propagate original labels to the output cube (default is true)
prop | Flag indicating if original labels is to be propagated to output cubes. |
Definition at line 767 of file Process.cpp.
References Isis::Process::p_propagateOriginalLabel.
|
inherited |
This method allows the programmer to propagate input blobs to the output cube (default is true)
prop | Flag indicating if input blobs are to be propagated to output cubes. |
Definition at line 744 of file Process.cpp.
References Isis::Process::p_propagatePolygons.
|
inherited |
This method allows the programmer to propagate input tables to the output cube (default is true)
prop | Flag indicating if input tables are to be propagated to output cubes. |
Definition at line 693 of file Process.cpp.
References Isis::Process::p_propagateTables.
|
inherited |
Propagate the tables from the cube with the given filename to the output cube.
This is done at the time this method is called, not during normal processing. The names of the tables to propagate can be provided through the second paramter, by specifing a list of table names. Not providing any list (or providing an empty list) will propagate all tables.
fromName | QString of the name of the cube containing the tables to propagate. |
tableNames | List of QStrings of the names of the tables to propagate; default is empty, which indicates that all tables will be propagated. |
Definition at line 714 of file Process.cpp.
References Isis::Cube::close(), Isis::Cube::label(), Isis::PvlObject::object(), Isis::Cube::open(), Isis::Process::OutputCubes, and Isis::Cube::read().
void Isis::ProcessExport::setCanGenerateChecksum | ( | bool | flag | ) |
@description Set m_canGenerateChecksum which determines if we can generate a MD5 checksum on the image data.
flag | boolean to generate the checksum or not |
Definition at line 673 of file ProcessExport.cpp.
References m_canGenerateChecksum.
|
inline |
Sets the storage order of the output file.
Definition at line 170 of file ProcessExport.h.
References p_format.
Referenced by ProcessExport(), and Isis::ProcessExportPds::StandardPdsLabel().
|
virtualinherited |
Opens an input cube specified by the programmer and verifies requirements are met.
fname | Programmer specified work file. For example, "myfile.cub". |
att | The cube attributes to use when opening the input cube. |
requirements | Requirements to check that the input cube meets. See CheckRequirements(). |
Isis::iException::Message |
Reimplemented in Isis::ProcessByBrick, Isis::ProcessByBrick, and Isis::ProcessMosaic.
Definition at line 68 of file Process.cpp.
References Isis::Process::CheckRequirements(), Isis::Cube::open(), and Isis::Cube::setVirtualBands().
|
virtualinherited |
Opens an input cube specified by the user and verifies requirements are met.
parameter | User parameter to obtain file to open. Typically, the value is "FROM". For example, the user can specify on the command line FROM=myfile.cub and this method will attempt to open the cube "myfile.cub" if the parameter was set to "FROM". |
requirements | Requirements to check that the input cube meets. See CheckRequirements(). |
Isis::iException::Message |
Reimplemented in Isis::ProcessByBrick, Isis::ProcessByLine, Isis::ProcessBySpectra, Isis::ProcessMosaic, Isis::ProcessByBrick, and Isis::ProcessBySample.
Definition at line 139 of file Process.cpp.
References Isis::Application::GetUserInterface(), and Isis::Process::SetInputCube().
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked(), Isis::FileTool::saveAsEnlargedCube(), Isis::ProcessByLine::SetInputCube(), Isis::ProcessBySample::SetInputCube(), Isis::ProcessByBrick::SetInputCube(), Isis::ProcessMosaic::SetInputCube(), Isis::Process::SetInputCube(), Isis::ProcessByLine::SetInputCube(), Isis::ProcessMosaic::SetInputCube(), Isis::ProcessByBrick::SetInputCube(), Isis::ProcessBySample::SetInputCube(), and Isis::ProcessGroundPolygons::SetStatCubes().
|
virtualinherited |
Set the InputCube vector to an opened Cube which was dynamically allocated.
This is used if there already exists a valid opened cube
inCube | - Pointer to input Cube |
requirements | Requirements to check that the input cube meets. See CheckRequirements(). |
Reimplemented in Isis::ProcessByBrick, and Isis::ProcessMosaic.
Definition at line 110 of file Process.cpp.
References Isis::Process::CheckRequirements(), Isis::Cube::isOpen(), and Isis::IException::User.
void Isis::ProcessExport::SetInputRange | ( | ) |
Set input pixel range from user.
This method performs the same function as SetInputRange(min,max) and SetInputRange(min,mid,max). However, the information for min/mid/max is obtained from the user via the command line. Therefore you must include the following parameter group in your application XML file:
Definition at line 359 of file ProcessExport.cpp.
References Isis::Application::GetUserInterface(), and SetInputRange().
Referenced by SetInputRange(), SetInputRange(), and SetInputRange().
void Isis::ProcessExport::SetInputRange | ( | const double | minimum, |
const double | maximum ) |
Set input pixel range from to a linear stretch.
This method allows the programmer to define what range of input pixels in the input cube get mapped to the output range in the Buffer. By default the output range is 0.0 to 1.0 (can be overridden using the SetOutputRange method). This version of SetInputRange allows the programmer to perform a simple linear stretch. That is, "minimum:0.0 maximum:1.0" or minimum is mapped to 0.0, maximum is mapped to 1.0 everything inbetween is mapped linearly (e.g., (minimum+maximum)/2.0:0.5). Also, everything less than the minimum is mapped to 0.0 and everything more than the maximum is mapped to 1.0. If you are uncertain about how stretches operate see the Stretch object. If the input range is never set, no stretch will occur.
minimum | Minimum pixel value in the input cube to be mapped to the minimum value in the Buffer |
maximum | Maximum pixel value in the input cube to be mapped to the maximum value in the Buffer |
Isis::iException::Message |
Definition at line 93 of file ProcessExport.cpp.
References SetInputRange().
void Isis::ProcessExport::SetInputRange | ( | const double | minimum, |
const double | maximum, | ||
const int | index ) |
Set input pixel range from to a linear stretch.
This method allows the programmer to define what range of input pixels in the input cube get mapped to the output range in the Buffer. By default the output range is 0.0 to 1.0 (can be overridden using the SetOutputRange method). This version of SetInputRange allows the programmer to perform a simple linear stretch. That is, "minimum:0.0 maximum:1.0" or minimum is mapped to 0.0, maximum is mapped to 1.0 everything inbetween is mapped linearly (e.g., (minimum+maximum)/2.0:0.5). Also, everything less than the minimum is mapped to 0.0 and everything more than the maximum is mapped to 1.0. If you are uncertain about how stretches operate see the Stretch object. If the input range is never set, no stretch will occur.
minimum | Minimum pixel value in the input cube to be mapped to the minimum value in the Buffer |
maximum | Maximum pixel value in the input cube to be mapped to the maximum value in the Buffer |
index | The index of the channel you are setting |
Isis::iException::Message |
Definition at line 122 of file ProcessExport.cpp.
References SetInputRange().
void Isis::ProcessExport::SetInputRange | ( | const double | minimum, |
const double | middle, | ||
const double | maximum ) |
Set input pixel range from to a piecewise linear stretch.
This method allows the programmer to define what range of input pixels in the input cube get mapped to the output range in the Buffer. By default the output range is 0.0 to 1.0 (can be overridden using the SetOutputRange method). This version of SetInputRange allows the programmer to perform a piecewise linear stretch. That is,"minimum:0.0 middle:0.5 maximum:1.0". The pixels from the input cube between minimum and middle are mapped to 0.0 and 0.5 linearly, while pixels between middle and maximum are mapped to 0.5 and 1.0 linearly. Those outside the range of minimum and maximum are mapped to 0.0 and 1.0 respectively. If you are uncertain about how stretches operate see the Stretch object. If the input range is never set, no stretch will occur.
minimum | Minimum pixel value in the input cube to be mapped to the minimum value in the Buffer |
middle | Middle pixel value in the input cube to be mapped to the (minimum+maximum)/2.0 value in the Buffer |
maximum | Maximum pixel value in the input cube to be mapped to the maximum value in the Buffer |
Isis::IException::Message |
Definition at line 153 of file ProcessExport.cpp.
References Isis::Process::InputCubes, p_inputMaximum, p_inputMiddle, p_inputMinimum, and Isis::IException::Programmer.
void Isis::ProcessExport::SetInputRange | ( | const double | minimum, |
const double | middle, | ||
const double | maximum, | ||
const int | index ) |
Set input pixel range from to a piecewise linear stretch.
This method allows the programmer to define what range of input pixels in the input cube get mapped to the output range in the Buffer. By default the output range is 0.0 to 1.0 (can be overridden using the SetOutputRange method). This version of SetInputRange allows the programmer to perform a piecewise linear stretch. That is,"minimum:0.0 middle:0.5 maximum:1.0". The pixels from the input cube between minimum and middle are mapped to 0.0 and 0.5 linearly, while pixels between middle and maximum are mapped to 0.5 and 1.0 linearly. Those outside the range of minimum and maximum are mapped to 0.0 and 1.0 respectively. If you are uncertain about how stretches operate see the Stretch object. If the input range is never set, no stretch will occur.
minimum | Minimum pixel value in the input cube to be mapped to the minimum value in the Buffer |
middle | Middle pixel value in the input cube to be mapped to the (minimum+maximum)/2.0 value in the Buffer |
maximum | Maximum pixel value in the input cube to be mapped to the maximum value in the Buffer |
index | The index of the channel you are setting |
Isis::iException::Message |
Definition at line 201 of file ProcessExport.cpp.
References Isis::Process::InputCubes, p_inputMaximum, p_inputMiddle, p_inputMinimum, and Isis::IException::Programmer.
void Isis::ProcessExport::SetInputRange | ( | UserInterface & | ui | ) |
Definition at line 363 of file ProcessExport.cpp.
|
virtualinherited |
Allocates a output cube whose name and size is specified by the programmer.
fname | Name of the output cube to allocate |
att | The cube attributes to use when creating the output cube. |
ns | Number of samples to allocate |
nl | Number of lines to allocate |
nb | Number of bands to allocate |
Isis::iException::Message |
Definition at line 315 of file Process.cpp.
References Isis::PvlObject::addObject(), Isis::AttachedLabel, Isis::Cube::create(), Isis::PvlObject::findObject(), Isis::Process::InputCubes, Isis::Cube::label(), Isis::Cube::labelSize(), Isis::Process::p_propagateLabels, Isis::Process::p_propagateOriginalLabel, Isis::Process::p_propagatePolygons, Isis::Process::p_propagateTables, Isis::Cube::pixelType(), Isis::IException::Programmer, Isis::Cube::setBaseMultiplier(), Isis::Cube::setByteOrder(), Isis::Cube::setDimensions(), Isis::Cube::setFormat(), Isis::Cube::setLabelsAttached(), Isis::Cube::setLabelSize(), Isis::Cube::setMinMax(), Isis::Cube::setPixelType(), Isis::IException::User, Isis::Cube::write(), and Isis::Process::WriteHistory().
|
virtualinherited |
Allocates a user-specified output cube whose size matches the first input cube.
parameter | User specified output file. For example, "TO" is a popular user parameter. If the user specified TO=output.cub, then this routine would allocate the file output.cub with size specified by the first opened input cube. The output pixel type will be propagated from the first loaded input cube or will use the value in the application XML file for pixelType. |
Isis::iException::Message |
Reimplemented in Isis::ProcessMapMosaic, Isis::ProcessImport, and Isis::ProcessMosaic.
Definition at line 163 of file Process.cpp.
References Isis::Process::InputCubes, Isis::IException::Programmer, and Isis::Process::SetOutputCube().
Referenced by Isis::ProcessByBrick::SetOutputCube(), Isis::ProcessImport::SetOutputCube(), Isis::Process::SetOutputCube(), Isis::ProcessImport::SetOutputCube(), Isis::Process::SetOutputCube(), Isis::ProcessImport::SetOutputCube(), Isis::Process::SetOutputCubeStretch(), Isis::ProcessPolygons::SetStatCubes(), and Isis::ProcessGroundPolygons::SetStatCubes().
|
virtualinherited |
Allocates a user specified output cube whose size is specified by the programmer.
parameter | User specified output file. For example, "TO" is a popular user parameter. If the user specified TO=output.cub, then this routine would allocate the file output.cub with size specified by the first opened input cube. The output pixel type will be propagated from the first loaded input cube or will use the value in the application XML file for pixelType. |
ns | Number of samples to allocate |
nl | Number of lines to allocate |
nb | Number of bands to allocate |
Isis::iException::Message |
Definition at line 233 of file Process.cpp.
References Isis::Application::GetUserInterface(), Isis::IException::Programmer, and Isis::Process::SetOutputCube().
|
virtualinherited |
Allocates a user specified output cube whose size is specified by the programmer.
parameter | User specified output file. For example, "TO" is a popular user parameter. If the user specified TO=output.cub, then this routine would allocate the file output.cub with size specified by the first opened input cube. The output pixel type will be propagated from the first loaded input cube or will use the value in the application XML file for pixelType. |
ns | Number of samples to allocate |
nl | Number of lines to allocate |
nb | Number of bands to allocate |
ui | A user interface used to get the attributes needed. If null, the user interface will be obtained from the application. |
Isis::iException::Message |
Definition at line 275 of file Process.cpp.
References Isis::Application::GetUserInterface(), Isis::IException::Programmer, and Isis::Process::SetOutputCube().
|
virtualinherited |
Allocates a user-specified output cube whose size matches the first input cube.
parameter | User specified output file. For example, "TO" is a popular user parameter. If the user specified TO=output.cub, then this routine would allocate the file output.cub with size specified by the first opened input cube. The output pixel type will be propagated from the first loaded input cube or will use the value in the application XML file for pixelType. |
ui | A user interface used to get the attributes needed for SetOutputCube. |
Isis::iException::Message |
Definition at line 196 of file Process.cpp.
References Isis::Process::InputCubes, Isis::IException::Programmer, and Isis::Process::SetOutputCubeStretch().
Referenced by Isis::Process::SetOutputCubeStretch().
void Isis::ProcessExport::SetOutputEndian | ( | enum ByteOrder | byteOrderIn | ) |
Set byte endianness of the output cube.
This method allows the programmer to specify whether the first byte of data output from the ProcessExport will be the most significant byte or the least significant byte. If the user does not explicitly set the endianness, it will default to that of the current system architecture
byteOrderIn | enumeration of the endianness (MSB or LSB) |
Definition at line 649 of file ProcessExport.cpp.
References p_endianSwap, and p_endianType.
Referenced by ProcessExport().
void Isis::ProcessExport::SetOutputHis | ( | const double | value | ) |
Set output special pixel value for HIS.
Sets the value for output special pixel HISs. HIS pixels values from the input cube will be set to this value. Be default this value will be set to the maximum out value set with SetOutputRange
value | The output pixel value for all HIS pixels |
Definition at line 521 of file ProcessExport.cpp.
void Isis::ProcessExport::SetOutputHrs | ( | const double | value | ) |
Set output special pixel value for HRS.
Sets the value for output special pixel HRSs. HRS pixels values from the input cube will be set to this value. Be default this value will be set to the maximum out value set with SetOutputRange
value | The output pixel value for all HRS pixels |
Definition at line 536 of file ProcessExport.cpp.
void Isis::ProcessExport::SetOutputLis | ( | const double | value | ) |
Set output special pixel value for LIS.
Sets the value for output special pixel LISs. LIS pixels values from the input cube will be set to this value. Be default this value will be set to the minimum out value set with SetOutputRange
value | The output pixel value for all LIS pixels |
Definition at line 491 of file ProcessExport.cpp.
void Isis::ProcessExport::SetOutputLrs | ( | const double | value | ) |
Set output special pixel value for LRS.
Sets the value for output special pixel LRSs. LRS8 pixels values from the input cube will be set to this value. Be default this value will be set to the minimum out value set with SetOutputRange
value | The output pixel value for all LRS pixels |
Definition at line 506 of file ProcessExport.cpp.
void Isis::ProcessExport::SetOutputNull | ( | const double | value | ) |
Set output special pixel value for NULL.
Sets the value for output special pixel NULLs. NULL pixels values from the input cube will be set to this value. Be default this value will be set to the minimum out value set with SetOutputRange
value | The output pixel value for all NULL pixels |
Definition at line 476 of file ProcessExport.cpp.
References p_Null, and p_Null_Set.
void Isis::ProcessExport::SetOutputRange | ( | const double | minimum, |
const double | maximum ) |
Set output pixel range in Buffer.
This method allows the programmer to specify the acceptable range of values contained in the Buffer. If this method is never invoked, all pixel values received in the Buffer of the export function will be in the range of 0.0 to 1.0. However, this can be overridden, for example, to 0.0 and 255.0, by invoking this method.
minimum | Desired minimum pixel value in the Buffer |
maximum | Desired maximum pixel value in the Buffer |
Isis::iException::Message |
Definition at line 454 of file ProcessExport.cpp.
References p_outputMaximum, p_outputMiddle, p_outputMinimum, and Isis::IException::Programmer.
Referenced by SetOutputType().
void Isis::ProcessExport::SetOutputType | ( | Isis::PixelType | pixelIn | ) |
Set output pixel bit type in Buffer.
This method specifies the type of pixel data that is going to be output. Essentially, it is a convenience method that will automatically calculate the necessary output range based on the minimum and maximum values of the bit type that is specified. Currently, the method only supported data types are Isis::UnsignedByte (Range of 0 to 255), Isis::SignedWord (Range of -32768 to 32767), Isis::UnsignedWord (Range of 0 to 65535), and Isis::Real (Range from the minimum floating-point value to the maximum floating-point value supported in C++; -FLT_MAX to FLT_MAX), since these are the only formats that can be output by ProcessExport. If neither this method nor the SetOutputRange method is invoked, all pixel values received in the Buffer of the export function will be in the range of 0.0 to 1.0.
NOTE: You must set the format type of the output data with SetFormat before calling this method. Otherwise, you will get an error.
pixelIn | this is an enumeration of the different pixel types. The only values that are recognized as valid are Isis::UnsignedByte, Isis::SignedWord, Isis::UnsignedWord, and Isis::Real. |
Isis::iException::Message |
Definition at line 608 of file ProcessExport.cpp.
References JP2, p_format, p_pixelType, Isis::IException::Programmer, and SetOutputRange().
Referenced by ProcessExport().
|
virtual |
Write an entire cube to an output file stream.
Just as with the other invocation of the StartProcess method, this will process an input cube buffer by buffer. Unlike the other invocation, this method takes care of writing the input data to an output file stream specified by the user instead of relying on an external function.
&fout | An open stream to which the pixel data will be written. After calling this method once, the stream will contain all of the pixel data from the input cube. |
Reimplemented in Isis::ProcessExportPds, Isis::ProcessExportPds, Isis::ProcessExportPds4, and Isis::ProcessExportPds4.
Definition at line 1017 of file ProcessExport.cpp.
References BIL, BIP, BSQ, Isis::Progress::CheckStatus(), InitProcess(), Isis::Process::InputCubes, isisOut16s(), isisOut16u(), isisOut32(), isisOut8(), m_canGenerateChecksum, m_cryptographicHash, p_format, p_pixelType, Isis::Process::p_progress, p_str, and Isis::IException::Programmer.
|
inlinevirtualinherited |
In the base class, this method will invoked a user-specified function exactly one time.
In derived classes such as ProcessByLine, the StartProcess will invoke a user-specified function for every line in a cube.
funct() | Name of your processing function |
|
virtual |
This method invokes the process operation over a single input cube.
In the cases of BSQ and BIL this is a process by line. In the case of BIP, this is a process by band. A single buffer of input data will be padd to the buffer processing function. Note the data will be stretched based on the invocations of the SetInputRange and SetpOutputRange methods.
funct | (Isis::Buffer &b) Name of your buffer processing function. The buffer in will contain stretched input cube pixels for an entire buffer. These pixels must be written to the foreign output file (e.g, jpg, tif, etc). |
Reimplemented in Isis::ProcessExportPds, and Isis::ProcessExportPds4.
Definition at line 790 of file ProcessExport.cpp.
References BIL, BIP, BSQ, Isis::Progress::CheckStatus(), InitProcess(), Isis::Process::InputCubes, JP2, p_format, Isis::Process::p_progress, p_str, and Isis::IException::Programmer.
Referenced by Isis::ProcessExportPds::StartProcess(), and Isis::ProcessExportPds4::StartProcess().
|
inherited |
Writes out the History blob to the cube.
Definition at line 822 of file Process.cpp.
References Isis::History::AddEntry(), Isis::Process::InputCubes, Isis::PvlObject::object(), Isis::Process::p_propagateHistory, Isis::Cube::readHistory(), and Isis::Cube::write().
Referenced by Isis::Process::SetOutputCube(), and Isis::ProcessMapMosaic::StartProcess().
|
protectedinherited |
A vector of pointers to opened Cube objects.
The pointers are established in the SetInputCube/SetInputWorkCube methods.
Definition at line 185 of file Process.h.
Referenced by Isis::ProcessMosaic::AddBandBinGroup(), Isis::ProcessMosaic::BandComparison(), Isis::ProcessMosaic::BandPriorityWithNoTracking(), Isis::Process::CalculateStatistics(), Isis::Process::CheckRequirements(), Isis::Process::ClearInputCubes(), Isis::ProcessExportPds4::CreateImageLabel(), CreateWorldFile(), Isis::ProcessExportPds4::displaySettings(), Isis::ProcessExportPds::ExportTable(), Isis::ProcessExportPds4::fileAreaObservational(), Isis::ProcessExportPds::FixedJP2ImageRoot(), Isis::ProcessMosaic::GetBandIndex(), GetBuffersBIL(), GetBuffersBIP(), GetBuffersBSQ(), Isis::ProcessExportPds4::identificationArea(), InitProcess(), Isis::ProcessExportPds::LineBytes(), Isis::ProcessMosaic::MatchBandBinGroup(), Isis::ProcessMosaic::MatchDEMShapeModel(), Isis::ProcessExportPds::OutputLabel(), Isis::ProcessByBrick::PrepProcessCube(), Isis::ProcessByBrick::PrepProcessCubeInPlace(), Isis::ProcessByBrick::PrepProcessCubes(), Isis::ProcessByBrick::ProcessCube(), Isis::ProcessByBrick::ProcessCubes(), Isis::ProcessRubberSheet::processPatchTransform(), Isis::ProcessByBrick::SetInputBrickSize(), Isis::ProcessByBrick::SetInputBrickSize(), Isis::ProcessMosaic::SetInputCube(), Isis::ProcessMosaic::SetInputCube(), SetInputRange(), SetInputRange(), Isis::ProcessByBrick::SetOutputCube(), Isis::Process::SetOutputCube(), Isis::Process::SetOutputCube(), Isis::Process::SetOutputCubeStretch(), Isis::ProcessGroundPolygons::SetStatCubes(), Isis::ProcessExportPds4::StandardAllMapping(), Isis::ProcessExportPds::StandardAllMapping(), Isis::ProcessExportPds4::standardBandBin(), Isis::ProcessExportPds::StandardImageImage(), Isis::ProcessExportPds4::standardInstrument(), Isis::ProcessExportPds::StandardJP2Image(), Isis::ProcessMosaic::StartProcess(), Isis::ProcessMapMosaic::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessByBrick::StartProcess(), StartProcess(), Isis::ProcessRubberSheet::StartProcess(), Isis::ProcessByBrick::StartProcess(), StartProcess(), Isis::ProcessByBoxcar::StartProcess(), Isis::ProcessByQuickFilter::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessExportPds::StreamJP2ImageRoot(), Isis::ProcessByBrick::VerifyCubes(), and Isis::Process::WriteHistory().
|
protected |
Flag to determine if a file checksum will be generated.
Definition at line 270 of file ProcessExport.h.
Referenced by canGenerateChecksum(), checksum(), ProcessExport(), setCanGenerateChecksum(), and StartProcess().
|
protected |
A cryptographic hash that will generate an MD5 checksum of the image data.
Definition at line 268 of file ProcessExport.h.
Referenced by checksum(), ProcessExport(), StartProcess(), and ~ProcessExport().
|
protectedinherited |
A list of cubes owned by this instant.
These cubes will be deleted on finalization. Process will not take ownership of cubes allocated outside of Process. It is the caller's responsibility to delete such cubes.
Definition at line 199 of file Process.h.
Referenced by Isis::Process::ClearCubes(), Isis::Process::ClearInputCubes(), Isis::Process::ClearOutputCubes(), Isis::Process::Process(), and Isis::Process::~Process().
|
protectedinherited |
A vector of pointers to allocated Cube objects.
The pointers are established in the SetOutputCube method.
Definition at line 191 of file Process.h.
Referenced by Isis::ProcessMosaic::AddBandBinGroup(), Isis::ProcessMosaic::AddDefaultBandBinGroup(), Isis::ProcessMosaic::BandComparison(), Isis::ProcessMosaic::BandPriorityWithNoTracking(), Isis::Process::ClearOutputCubes(), Isis::ProcessPolygons::FillPolygon(), Isis::ProcessImportPds::Finalize(), Isis::ProcessMosaic::GetBandIndex(), Isis::ProcessMosaic::GetOriginDefaultByPixelType(), Isis::ProcessMosaic::GetTrackStatus(), Isis::ProcessMosaic::MatchBandBinGroup(), Isis::ProcessMosaic::MatchDEMShapeModel(), Isis::ProcessByBrick::PrepProcessCube(), Isis::ProcessByBrick::PrepProcessCubeInPlace(), Isis::ProcessByBrick::PrepProcessCubes(), Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), Isis::ProcessImport::ProcessBsq(), Isis::ProcessByBrick::ProcessCube(), Isis::ProcessByBrick::ProcessCubes(), Isis::ProcessImport::ProcessJp2(), Isis::ProcessRubberSheet::processPatchTransform(), Isis::Process::PropagateLabels(), Isis::Process::PropagateTables(), Isis::ProcessMosaic::ResetCountBands(), Isis::ProcessMapMosaic::RingsSetOutputCube(), Isis::ProcessByBrick::SetOutputBrickSize(), Isis::ProcessByBrick::SetOutputBrickSize(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessPolygons::SetStatCubes(), Isis::ProcessGroundPolygons::SetStatCubes(), Isis::ProcessGroundPolygons::SetStatCubes(), Isis::ProcessImportPds::StartProcess(), Isis::ProcessMosaic::StartProcess(), Isis::ProcessMapMosaic::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessRubberSheet::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessByBoxcar::StartProcess(), Isis::ProcessByQuickFilter::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessImportPds::TranslatePdsProjection(), and Isis::ProcessByBrick::VerifyCubes().
|
protectedinherited |
Holds the calculated statistics for each band separately of every input cubei after the CalculateStatistics method is called.
Definition at line 172 of file Process.h.
Referenced by Isis::Process::BandStatistics(), and Isis::Process::CalculateStatistics().
|
protectedinherited |
Holds the calculated statistics for every band together of every input cubei after the CalculateStatistics method is called.
Definition at line 179 of file Process.h.
Referenced by Isis::Process::CalculateStatistics(), and Isis::Process::CubeStatistics().
|
protected |
Object to swap the endianness of the raw output to either MSB or LSB.
Definition at line 237 of file ProcessExport.h.
Referenced by isisOut16s(), isisOut16u(), isisOut32(), ProcessExport(), SetOutputEndian(), and ~ProcessExport().
|
protected |
The byte order of the output file.
Definition at line 239 of file ProcessExport.h.
Referenced by Isis::ProcessExportPds::ExportTable(), Isis::ProcessExportPds4::fileAreaObservational(), Isis::ProcessExportPds4::PDS4PixelType(), SetOutputEndian(), Isis::ProcessExportPds::StandardImageImage(), and Isis::ProcessExportPds::StandardJP2Image().
|
protected |
Current storage order.
Definition at line 215 of file ProcessExport.h.
Referenced by InitProcess(), setFormat(), SetOutputType(), StartProcess(), and StartProcess().
|
protected |
The output value for pixels whose input DNs are High Instrument Saturation values.
Definition at line 252 of file ProcessExport.h.
Referenced by OutputHis(), and SetOutputHis().
|
protected |
Indicates whether p_His has been set (i.e.
if setHis() has been called).
Definition at line 263 of file ProcessExport.h.
Referenced by OutputHis(), ProcessExport(), and SetOutputHis().
|
protected |
The output value for pixels whose input DNs are High Representation Saturation values.
Definition at line 254 of file ProcessExport.h.
Referenced by OutputHrs(), and SetOutputHrs().
|
protected |
Indicates whether p_Hrs has been set (i.e.
if setHrs() has been called).
Definition at line 265 of file ProcessExport.h.
Referenced by OutputHrs(), ProcessExport(), and SetOutputHrs().
|
protected |
Maximum pixel value in the input cube to be mapped to the maximum value in the Buffer.
Definition at line 234 of file ProcessExport.h.
Referenced by Isis::ProcessExportPds4::fileAreaObservational(), GetInputMaximum(), InitProcess(), ProcessExport(), SetInputRange(), SetInputRange(), Isis::ProcessExportPds::StandardImageImage(), and Isis::ProcessExportPds::StandardJP2Image().
|
protected |
Middle pixel value in the input cube to be mapped to the (minimum+maximum)/2.0 value in the Buffer.
Definition at line 230 of file ProcessExport.h.
Referenced by InitProcess(), ProcessExport(), SetInputRange(), and SetInputRange().
|
protected |
Minimum pixel value in the input cube to be mapped to the minimum value in the Buffer.
Definition at line 227 of file ProcessExport.h.
Referenced by Isis::ProcessExportPds4::fileAreaObservational(), GetInputMinimum(), InitProcess(), ProcessExport(), SetInputRange(), SetInputRange(), Isis::ProcessExportPds::StandardImageImage(), and Isis::ProcessExportPds::StandardJP2Image().
|
protected |
The output value for pixels whose input DNs are Low Instrument Saturation values.
Definition at line 248 of file ProcessExport.h.
Referenced by OutputLis(), and SetOutputLis().
|
protected |
Indicates whether p_Lis has been set (i.e.
if setLis() has been called).
Definition at line 259 of file ProcessExport.h.
Referenced by OutputLis(), ProcessExport(), and SetOutputLis().
|
protected |
The output value for pixels whose input DNs are Low Representation Saturation values.
Definition at line 250 of file ProcessExport.h.
Referenced by OutputLrs(), and SetOutputLrs().
|
protected |
Indicates whether p_Lrs has been set (i.e.
if setLrs() has been called).
Definition at line 261 of file ProcessExport.h.
Referenced by OutputLrs(), ProcessExport(), and SetOutputLrs().
|
protected |
The output value for pixels whose input DNs are Null values.
Definition at line 247 of file ProcessExport.h.
Referenced by OutputNull(), and SetOutputNull().
|
protected |
Indicates whether p_Null has been set (i.e.
if setNull() has been called).
Definition at line 257 of file ProcessExport.h.
Referenced by OutputNull(), ProcessExport(), and SetOutputNull().
|
protected |
Desired maximum pixel value in the Buffer.
Definition at line 225 of file ProcessExport.h.
Referenced by Isis::ProcessExportPds4::fileAreaObservational(), GetOutputMaximum(), InitProcess(), OutputHis(), OutputHrs(), ProcessExport(), SetOutputRange(), Isis::ProcessExportPds::StandardImageImage(), and Isis::ProcessExportPds::StandardJP2Image().
|
protected |
Middle pixel value (minimum+maximun)/2.0 in the Buffer.
Definition at line 223 of file ProcessExport.h.
Referenced by InitProcess(), ProcessExport(), and SetOutputRange().
|
protected |
Desired minimum pixel value in the Buffer.
Definition at line 222 of file ProcessExport.h.
Referenced by Isis::ProcessExportPds4::fileAreaObservational(), GetOutputMinimum(), InitProcess(), OutputLis(), OutputLrs(), OutputNull(), ProcessExport(), SetOutputRange(), Isis::ProcessExportPds::StandardImageImage(), and Isis::ProcessExportPds::StandardJP2Image().
|
protected |
The bits per pixel of the output image.
Definition at line 241 of file ProcessExport.h.
Referenced by Isis::ProcessExportPds4::fileAreaObservational(), Isis::ProcessExportPds::FixedJP2ImageRoot(), Isis::ProcessExportPds::LineBytes(), Isis::ProcessExportPds4::PDS4PixelType(), SetOutputType(), Isis::ProcessExportPds::StandardImageImage(), Isis::ProcessExportPds::StandardJP2Image(), StartProcess(), and Isis::ProcessExportPds::StreamJP2ImageRoot().
|
protectedinherited |
Pointer to a Progress object.
Definition at line 145 of file Process.h.
Referenced by Isis::ProcessByBrick::BlockingReportProgress(), InitProcess(), Isis::Process::Process(), Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), Isis::ProcessImport::ProcessBsq(), ProcessExport(), Isis::ProcessImport::ProcessImport(), Isis::ProcessImport::ProcessJp2(), Isis::ProcessRubberSheet::processPatchTransform(), Isis::Process::Progress(), Isis::ProcessByBrick::RunProcess(), Isis::ProcessMosaic::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessByBrick::StartProcess(), StartProcess(), Isis::ProcessRubberSheet::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessByBrick::StartProcess(), StartProcess(), Isis::ProcessByBoxcar::StartProcess(), Isis::ProcessByQuickFilter::StartProcess(), Isis::ProcessByBrick::StartProcess(), and Isis::Process::~Process().
|
protectedinherited |
Flag indicating if history is to be propagated to output cubes.
Definition at line 161 of file Process.h.
Referenced by Isis::Process::Process(), Isis::Process::PropagateHistory(), Isis::ProcessMapMosaic::StartProcess(), and Isis::Process::WriteHistory().
|
protectedinherited |
Flag indicating if labels are be propagated to output cubes.
Definition at line 149 of file Process.h.
Referenced by Isis::Process::Process(), Isis::Process::PropagateLabels(), and Isis::Process::SetOutputCube().
|
protectedinherited |
Flag indicating if original lable is to be propagated to output cubes.
Definition at line 165 of file Process.h.
Referenced by Isis::Process::Process(), Isis::Process::PropagateOriginalLabel(), and Isis::Process::SetOutputCube().
|
protectedinherited |
Flag indicating if blobs are be propagated to output cubes.
Definition at line 157 of file Process.h.
Referenced by Isis::Process::Process(), Isis::Process::PropagatePolygons(), and Isis::Process::SetOutputCube().
|
protectedinherited |
Flag indicating if tables are be propagated to output cubes.
Definition at line 153 of file Process.h.
Referenced by Isis::Process::Process(), Isis::Process::PropagateTables(), and Isis::Process::SetOutputCube().
|
protected |
Stretch object to ensure a reasonable range of pixel values in the output data.
Definition at line 243 of file ProcessExport.h.
Referenced by InitProcess(), StartProcess(), StartProcess(), and ~ProcessExport().