|
Isis 3.0 Object Programmers' Reference |
Home |
#include <Process.h>
Inheritance diagram for Isis::Process:


This is the core of the Isis system. Process, a very important base class is often used to derive new classes which process cubes in a systematic manner. Some of these derived classes include ProcessByLine, FilterProcess, RubberSheet, and Export. For history buffs, the Process class equates to DOCUBE in Isis 2.0 and DOIO in PICS. Essentially, this class manages much of the tedious programming work for cube i/o, user interaction, history, etc.
If you would like to see Process being used in implementation, see stats.cpp. For classes that inherit from Process, see ProcessByLine, FilterProcess, ProcessByBoxcar, RubberSheet, Export, or Import
A working application example of Process can be found in the stats class.
For internal use only.
Definition at line 132 of file Process.h.
Public Member Functions | |
| Process () | |
| Constructs a Process Object. | |
| virtual | ~Process () |
| Destroys the Process Object. It will close all opened cubes. | |
| 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. | |
| Isis::Cube * | SetInputCube (const std::string ¶meter, const int requirements=0) |
| Opens an input cube specified by the user and verifies requirements are met. | |
| Isis::Cube * | SetInputCube (const std::string &fname, const Isis::CubeAttributeInput &att, int requirements=0) |
| Opens an input cube specified by the programmer and verifies requirements are met. | |
| void | ClearInputCubes () |
| This method clears the input cube list. | |
| Isis::Cube * | SetOutputCube (const std::string ¶meter) |
| Allocates a user-specified output cube whose size matches the first input cube. | |
| Isis::Cube * | SetOutputCube (const std::string ¶meter, const int nsamps, const int nlines, const int nbands=1) |
| Allocates a user specified output cube whose size is specified by the programmer. | |
| Isis::Cube * | SetOutputCube (const std::string &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. | |
| 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 std::string &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 | 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. | |
| std::string | MissionData (const std::string &mission, const std::string &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. | |
Protected Attributes | |
| 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< Isis::Cube * > | InputCubes |
| A vector of pointers to opened Cube objects. | |
| std::vector< Isis::Cube * > | OutputCubes |
| A vector of pointers to allocated Cube objects. | |
| Isis::Process::Process | ( | ) |
Constructs a Process Object.
Definition at line 41 of file Process.cpp.
References p_progress, p_propagateHistory, p_propagateLabels, p_propagateOriginalLabel, p_propagatePolygons, p_propagateTables, and Isis::Progress::SetText().
| Isis::Process::~Process | ( | ) | [virtual] |
Destroys the Process Object. It will close all opened cubes.
Definition at line 52 of file Process.cpp.
References EndProcess(), and p_progress.
| void Isis::Process::ClearInputCubes | ( | ) |
This method clears the input cube list.
It is most commonly used in applications which need to generate an output cube without an input cube, however, propogation of input characteristics are known. For example, creating the initial cube for a mosaic.
Definition at line 579 of file Process.cpp.
References InputCubes.
Referenced by Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessGroundPolygons::SetOutputCube(), and Isis::ProcessMapMosaic::StartProcess().
| void Isis::Process::EndProcess | ( | ) | [virtual] |
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, and Isis::ProcessPolygons.
Definition at line 444 of file Process.cpp.
References InputCubes, and OutputCubes.
Referenced by Isis::ProcessPolygons::EndProcess(), Isis::ProcessImportPds::EndProcess(), Isis::ProcessByBrick::EndProcess(), Isis::ProcessByBoxcar::EndProcess(), and ~Process().
| string Isis::Process::MissionData | ( | const std::string & | mission, | |
| const std::string & | 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.
| 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 555 of file Process.cpp.
References _FILEINFO_, Isis::Filename::Exists(), Isis::Filename::Expanded(), Isis::PvlObject::FindGroup(), Isis::Filename::HighestVersion(), Isis::iException::Message(), and Isis::Preference::Preferences().
| Isis::Progress* Isis::Process::Progress | ( | ) | [inline] |
This method returns a pointer to a Progress object.
Definition at line 211 of file Process.h.
References p_progress.
Referenced by Isis::ProcessMapMosaic::SetOutputCube(), and Isis::ProcessMapMosaic::StartProcess().
| void Isis::Process::PropagateHistory | ( | const bool | prop | ) |
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 524 of file Process.cpp.
References p_propagateHistory.
Referenced by Isis::ProcessMapMosaic::SetOutputCube().
| void Isis::Process::PropagateLabels | ( | const std::string & | cube | ) |
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 482 of file Process.cpp.
References Isis::PvlObject::AddGroup(), g, incube, OutputCubes, and pvl().
| void Isis::Process::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.
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 471 of file Process.cpp.
References p_propagateLabels.
Referenced by Isis::ProcessMapMosaic::SetOutputCube().
| void Isis::Process::PropagateOriginalLabel | ( | const bool | prop | ) |
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 535 of file Process.cpp.
References p_propagateOriginalLabel.
Referenced by Isis::ProcessMapMosaic::SetOutputCube().
| void Isis::Process::PropagatePolygons | ( | const bool | prop | ) |
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 514 of file Process.cpp.
References p_propagatePolygons.
Referenced by Isis::ProcessMapMosaic::SetOutputCube().
| void Isis::Process::PropagateTables | ( | const bool | prop | ) |
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 503 of file Process.cpp.
References p_propagateTables.
Referenced by Isis::ProcessMapMosaic::SetOutputCube().
| Isis::Cube * Isis::Process::SetInputCube | ( | const std::string & | fname, | |
| const Isis::CubeAttributeInput & | att, | |||
| int | requirements = 0 | |||
| ) |
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 | Same as requirements on SetInputCube. See that method for more details. Defaults to 0 |
| Isis::iException::Message |
Reimplemented in Isis::ProcessByBrick.
Definition at line 72 of file Process.cpp.
References _FILEINFO_, Isis::AllMatchOrOne, Isis::BandMatchOrOne, Isis::Cube::Bands(), Isis::CubeAttributeInput::Bands(), cube, e, InputCubes, Isis::Cube::Lines(), Isis::iException::Message(), Isis::OneBand, Isis::Cube::Open(), Isis::ReadWrite, Isis::Cube::Samples(), Isis::Cube::SetVirtualBands(), Isis::SizeMatch, and Isis::SpatialMatch.
| Isis::Cube * Isis::Process::SetInputCube | ( | const std::string & | parameter, | |
| const int | requirements = 0 | |||
| ) |
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 | Use to specify requirements for the input file. The following are 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 |
Reimplemented in Isis::ProcessByBrick, Isis::ProcessByLine, Isis::ProcessBySample, and Isis::ProcessBySpectra.
Definition at line 214 of file Process.cpp.
References IsisAml::GetFilename(), IsisAml::GetInputAttribute(), and Isis::Application::GetUserInterface().
Referenced by Isis::ProcessMosaic::SetInputCube(), Isis::ProcessBySample::SetInputCube(), Isis::ProcessByLine::SetInputCube(), Isis::ProcessByBrick::SetInputCube(), and Isis::ProcessGroundPolygons::SetOutputCube().
| Isis::Cube * Isis::Process::SetOutputCube | ( | const std::string & | fname, | |
| const Isis::CubeAttributeOutput & | att, | |||
| const int | ns, | |||
| const int | nl, | |||
| const int | nb = 1 | |||
| ) |
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 305 of file Process.cpp.
References _FILEINFO_, Isis::PvlObject::AddGroup(), Isis::CubeAttributeOutput::AttachedLabel(), base, Isis::CubeAttributeOutput::ByteOrder(), cube, Isis::CubeAttributeOutput::DetachedLabel(), e, Isis::CubeAttributeOutput::FileFormat(), incube, InputCubes, Isis::PvlContainer::IsNamed(), Isis::CubeAttributeOutput::Maximum(), Isis::iException::Message(), Isis::CubeAttributeOutput::Minimum(), mult, Isis::PvlContainer::Name(), Isis::PvlObject::Object(), Isis::PvlObject::Objects(), OutputCubes, p_propagateLabels, p_propagateOriginalLabel, p_propagatePolygons, p_propagateTables, Isis::CubeAttributeOutput::PixelType(), Isis::CubeAttributeOutput::PropagateMinimumMaximum(), Isis::CubeAttributeOutput::PropagatePixelType(), Isis::Cube::SetDimensions(), and WriteHistory().
| Isis::Cube * Isis::Process::SetOutputCube | ( | const std::string & | parameter, | |
| const int | ns, | |||
| const int | nl, | |||
| const int | nb = 1 | |||
| ) |
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 |
Reimplemented in Isis::ProcessPolygons.
Definition at line 273 of file Process.cpp.
References _FILEINFO_, IsisAml::GetFilename(), IsisAml::GetOutputAttribute(), Isis::Application::GetUserInterface(), Isis::iException::Message(), and SetOutputCube().
| Isis::Cube * Isis::Process::SetOutputCube | ( | const std::string & | parameter | ) |
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::ProcessImport, Isis::ProcessMapMosaic, and Isis::ProcessMosaic.
Definition at line 237 of file Process.cpp.
References _FILEINFO_, InputCubes, Isis::iException::Message(), nb, nl, and ns.
Referenced by Isis::ProcessPolygons::SetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessImport::SetOutputCube(), Isis::ProcessGroundPolygons::SetOutputCube(), and SetOutputCube().
| void Isis::Process::StartProcess | ( | void | funct() | ) | [inline] |
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 |
| void Isis::Process::WriteHistory | ( | Cube & | cube | ) |
Writes out the History blob to the cube.
Definition at line 591 of file Process.cpp.
References Isis::History::AddEntry(), cube, InputCubes, p_propagateHistory, and Isis::Cube::Write().
Referenced by SetOutputCube(), and Isis::ProcessMapMosaic::StartProcess().
std::vector<Isis::Cube *> Isis::Process::InputCubes [protected] |
A vector of pointers to opened Cube objects.
The pointers are established in the SetInputCube/SetInputWorkCube methods.
Definition at line 160 of file Process.h.
Referenced by ClearInputCubes(), Isis::ProcessExport::CreateWorldFile(), EndProcess(), Isis::ProcessExport::InitProcess(), Isis::ProcessExportPds::LineBytes(), Isis::ProcessExportPds::OutputLabel(), Isis::ProcessRubberSheet::QuadTree(), Isis::ProcessByBrick::SetBrickSize(), Isis::ProcessByBrick::SetInputBrickSize(), Isis::ProcessMosaic::SetInputCube(), SetInputCube(), Isis::ProcessExport::SetInputRange(), Isis::ProcessGroundPolygons::SetOutputCube(), SetOutputCube(), Isis::ProcessRubberSheet::SlowGeom(), Isis::ProcessRubberSheet::SlowQuad(), Isis::ProcessExportPds::StandardAllMapping(), Isis::ProcessExportPds::StandardImageImage(), Isis::ProcessRubberSheet::StartProcess(), Isis::ProcessMosaic::StartProcess(), Isis::ProcessMapMosaic::StartProcess(), Isis::ProcessExport::StartProcess(), Isis::ProcessByTile::StartProcess(), Isis::ProcessBySpectra::StartProcess(), Isis::ProcessBySample::StartProcess(), Isis::ProcessByQuickFilter::StartProcess(), Isis::ProcessByLine::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessByBoxcar::StartProcess(), Isis::ProcessExport::StartProcessBIL(), Isis::ProcessExport::StartProcessBIP(), Isis::ProcessExport::StartProcessBSQ(), and WriteHistory().
std::vector<Isis::Cube *> Isis::Process::OutputCubes [protected] |
A vector of pointers to allocated Cube objects.
The pointers are established in the SetOutputCube method.
Definition at line 166 of file Process.h.
Referenced by Isis::ProcessPolygons::AppendOutputCube(), Isis::ProcessPolygons::DoWork(), Isis::ProcessImportPds::EndProcess(), EndProcess(), Isis::ProcessPolygons::FillPolygon(), Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), Isis::ProcessImport::ProcessBsq(), PropagateLabels(), Isis::ProcessByBrick::SetBrickSize(), Isis::ProcessByBrick::SetOutputBrickSize(), Isis::ProcessPolygons::SetOutputCube(), Isis::ProcessMosaic::SetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessGroundPolygons::SetOutputCube(), SetOutputCube(), Isis::ProcessRubberSheet::StartProcess(), Isis::ProcessMosaic::StartProcess(), Isis::ProcessMapMosaic::StartProcess(), Isis::ProcessByTile::StartProcess(), Isis::ProcessBySpectra::StartProcess(), Isis::ProcessBySample::StartProcess(), Isis::ProcessByQuickFilter::StartProcess(), Isis::ProcessByLine::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessByBoxcar::StartProcess(), and Isis::ProcessImportPds::TranslatePdsProjection().
Isis::Progress* Isis::Process::p_progress [protected] |
Pointer to a Progress object.
Definition at line 134 of file Process.h.
Referenced by Isis::ProcessExport::InitProcess(), Process(), Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), Isis::ProcessImport::ProcessBsq(), Isis::ProcessExport::ProcessExport(), Isis::ProcessImport::ProcessImport(), Progress(), Isis::ProcessRubberSheet::StartProcess(), Isis::ProcessMosaic::StartProcess(), Isis::ProcessExport::StartProcess(), Isis::ProcessByQuickFilter::StartProcess(), Isis::ProcessByBrick::StartProcess(), Isis::ProcessByBoxcar::StartProcess(), Isis::ProcessExport::StartProcessBIL(), Isis::ProcessExport::StartProcessBIP(), Isis::ProcessExport::StartProcessBSQ(), and ~Process().
bool Isis::Process::p_propagateHistory [protected] |
Flag indicating if history is to be propagated to output cubes.
Definition at line 150 of file Process.h.
Referenced by Process(), PropagateHistory(), Isis::ProcessMapMosaic::StartProcess(), and WriteHistory().
bool Isis::Process::p_propagateLabels [protected] |
Flag indicating if labels are be propagated to output cubes.
Definition at line 138 of file Process.h.
Referenced by Process(), PropagateLabels(), and SetOutputCube().
bool Isis::Process::p_propagateOriginalLabel [protected] |
Flag indicating if original lable is to be propagated to output cubes.
Definition at line 154 of file Process.h.
Referenced by Process(), PropagateOriginalLabel(), and SetOutputCube().
bool Isis::Process::p_propagatePolygons [protected] |
Flag indicating if blobs are be propagated to output cubes.
Definition at line 146 of file Process.h.
Referenced by Process(), PropagatePolygons(), and SetOutputCube().
bool Isis::Process::p_propagateTables [protected] |
Flag indicating if tables are be propagated to output cubes.
Definition at line 142 of file Process.h.
Referenced by Process(), PropagateTables(), and SetOutputCube().