RasterDataDescriptor Class Reference

Describes a raster data element. More...

#include <RasterDataDescriptor.h>

Inheritance diagram for RasterDataDescriptor:

Inheritance graph

List of all members.

Public Member Functions

virtual void setDataType (EncodingType dataType)=0
virtual EncodingType getDataType () const =0
virtual void setValidDataTypes (const std::vector< EncodingType > &validDataTypes)=0
virtual const std::vector
< EncodingType > & 
getValidDataTypes () const =0
virtual unsigned int getBytesPerElement () const =0
virtual void setBadValues (const std::vector< int > &badValues)=0
virtual const std::vector< int > & getBadValues () const =0
virtual void setInterleaveFormat (InterleaveFormatType format)=0
virtual InterleaveFormatType getInterleaveFormat () const =0
virtual void setRows (const std::vector< DimensionDescriptor > &rows)=0
virtual const std::vector
< DimensionDescriptor > & 
getRows () const =0
virtual unsigned int getRowSkipFactor () const =0
virtual DimensionDescriptor getOriginalRow (unsigned int originalNumber) const =0
virtual DimensionDescriptor getOnDiskRow (unsigned int onDiskNumber) const =0
virtual DimensionDescriptor getActiveRow (unsigned int activeNumber) const =0
virtual unsigned int getRowCount () const =0
virtual void setColumns (const std::vector< DimensionDescriptor > &columns)=0
virtual const std::vector
< DimensionDescriptor > & 
getColumns () const =0
virtual unsigned int getColumnSkipFactor () const =0
virtual DimensionDescriptor getOriginalColumn (unsigned int originalNumber) const =0
virtual DimensionDescriptor getOnDiskColumn (unsigned int onDiskNumber) const =0
virtual DimensionDescriptor getActiveColumn (unsigned int activeNumber) const =0
virtual unsigned int getColumnCount () const =0
virtual void setBands (const std::vector< DimensionDescriptor > &bands)=0
virtual const std::vector
< DimensionDescriptor > & 
getBands () const =0
virtual DimensionDescriptor getOriginalBand (unsigned int originalNumber) const =0
virtual DimensionDescriptor getOnDiskBand (unsigned int onDiskNumber) const =0
virtual DimensionDescriptor getActiveBand (unsigned int activeNumber) const =0
virtual unsigned int getBandCount () const =0
virtual void setXPixelSize (double pixelSize)=0
virtual double getXPixelSize () const =0
virtual void setYPixelSize (double pixelSize)=0
virtual double getYPixelSize () const =0
virtual void setUnits (const Units *pUnits)=0
virtual UnitsgetUnits ()=0
virtual const UnitsgetUnits () const =0
virtual void setDisplayBand (RasterChannelType eColor, DimensionDescriptor band)=0
virtual DimensionDescriptor getDisplayBand (RasterChannelType eColor) const =0
virtual void setDisplayMode (DisplayMode displayMode)=0
virtual DisplayMode getDisplayMode () const =0

Static Public Member Functions

static const std::string & signalDataTypeChanged ()
static const std::string & signalValidDataTypesChanged ()
static const std::string & signalBadValuesChanged ()
static const std::string & signalInterleaveFormatChanged ()
static const std::string & signalRowsChanged ()
static const std::string & signalColumnsChanged ()
static const std::string & signalBandsChanged ()
static const std::string & signalPixelSizeChanged ()
static const std::string & signalDisplayBandChanged ()
static const std::string & signalDisplayModeChanged ()

Protected Member Functions

virtual ~RasterDataDescriptor ()


Detailed Description

Describes a raster data element.

In addition to the anscillary information stored in the DataDescriptor base class, this class contains information pertinent to raster data elements.

This subclass of Subject will notify upon the following conditions:

See also:
RasterElement
Examples:

SampleRasterElementImporter.cpp, Tutorial/Tutorial3.cpp, Tutorial/Tutorial4.cpp, and Tutorial/Tutorial5.cpp.

Definition at line 36 of file RasterDataDescriptor.h.


Constructor & Destructor Documentation

virtual RasterDataDescriptor::~RasterDataDescriptor (  )  [protected, virtual]

This should be destroyed by calling ModelServices::destroyDataDescriptor.

Definition at line 670 of file RasterDataDescriptor.h.


Member Function Documentation

static const std::string& RasterDataDescriptor::signalDataTypeChanged (  )  [static]

Emitted when the data type changes with boost::any<EncodingType> containing the new data type.

See also:
setDataType()

Definition at line 46 of file RasterDataDescriptor.h.

static const std::string& RasterDataDescriptor::signalValidDataTypesChanged (  )  [static]

Emitted when the vector of valid data types changes with boost::any<std::vector<EncodingType> > containing the new valid data types.

See also:
setValidDataTypes()

Definition at line 55 of file RasterDataDescriptor.h.

static const std::string& RasterDataDescriptor::signalBadValuesChanged (  )  [static]

Emitted when the vector of bad values changes with boost::any<std::vector<int> > containing the new bad values.

See also:
setBadValues()

Definition at line 63 of file RasterDataDescriptor.h.

static const std::string& RasterDataDescriptor::signalInterleaveFormatChanged (  )  [static]

Emitted when the interleave format changes with boost::any<InterleaveFormatType> containing the new interleave format.

See also:
setInterleaveFormat()

Definition at line 72 of file RasterDataDescriptor.h.

static const std::string& RasterDataDescriptor::signalRowsChanged (  )  [static]

Emitted when the rows change with boost::any<std::vector<DimensionDescriptor> > containing the new rows.

See also:
setRows()

Definition at line 81 of file RasterDataDescriptor.h.

static const std::string& RasterDataDescriptor::signalColumnsChanged (  )  [static]

Emitted when the columns change with boost::any<std::vector<DimensionDescriptor> > containing the new columns.

See also:
setColumns()

Definition at line 90 of file RasterDataDescriptor.h.

static const std::string& RasterDataDescriptor::signalBandsChanged (  )  [static]

Emitted when the bands change with boost::any<std::vector<DimensionDescriptor> > containing the new bands.

See also:
setBands()

Definition at line 99 of file RasterDataDescriptor.h.

static const std::string& RasterDataDescriptor::signalPixelSizeChanged (  )  [static]

Emitted when the X or Y pixel size changes.

No value is associated with this signal.

See also:
setXPixelSize(), setYPixelSize()

Definition at line 108 of file RasterDataDescriptor.h.

static const std::string& RasterDataDescriptor::signalDisplayBandChanged (  )  [static]

Emitted when the band to display changes for any raster channel.

No value is associated with this signal.

See also:
setDisplayBand(), RasterChannelType

Definition at line 117 of file RasterDataDescriptor.h.

static const std::string& RasterDataDescriptor::signalDisplayModeChanged (  )  [static]

Emitted when the initial display mode changes with boost::any<DisplayMode> containing the new display mode.

See also:
setDisplayMode()

Definition at line 126 of file RasterDataDescriptor.h.

virtual void RasterDataDescriptor::setDataType ( EncodingType  dataType  )  [pure virtual]

Sets the data type of the values in the data set.

Parameters:
dataType The data type of the values in the data set.
Subject Notifications:
This method notifies signalDataTypeChanged() if the given data type is different than the current data type.

virtual EncodingType RasterDataDescriptor::getDataType (  )  const [pure virtual]

Returns the data type of the values in the data set.

Returns:
The data type.
Examples:
Tutorial/Tutorial3.cpp, Tutorial/Tutorial4.cpp, and Tutorial/Tutorial5.cpp.

virtual void RasterDataDescriptor::setValidDataTypes ( const std::vector< EncodingType > &  validDataTypes  )  [pure virtual]

Sets the valid data types for the data set.

The current data type may or may not be valid. By default, all Encoding Types are valid.

Parameters:
validDataTypes The valid data types for the data set.
Subject Notifications:
This method notifies signalValidDataTypesChanged() if the given valid data types are different than the current valid data types.
See also:
setDataType()

virtual const std::vector<EncodingType>& RasterDataDescriptor::getValidDataTypes (  )  const [pure virtual]

Returns the valid data types for the data set.

The current data type may or may not be valid. By default, all Encoding Types are valid.

Returns:
The valid data types.
See also:
getDataType()

virtual unsigned int RasterDataDescriptor::getBytesPerElement (  )  const [pure virtual]

Returns the number of bytes used for each pixel element value.

This is a convenience method that returns the number of bytes used for each pixel element as determined by the data type.

Returns:
The number of bytes.
See also:
getDataType()

virtual void RasterDataDescriptor::setBadValues ( const std::vector< int > &  badValues  )  [pure virtual]

Sets bad values that should be ignored in the data statistics.

This method is intended to be used when creating a data descriptor that will be used to create a RasterElement. When the RasterElement is created, the bad values that were set in the data descriptor by calling this method will be set into the Statistics objects in the raster element. After the raster element is created, the bad values should be changed by calling Statistics::setBadValues() instead of this method.

Parameters:
badValues The bad values that should be ignored.
Subject Notifications:
This method notifies signalBadValuesChanged() if the given bad values are different than the current bad values.
See also:
Statistics::setBadValues()

virtual const std::vector<int>& RasterDataDescriptor::getBadValues (  )  const [pure virtual]

Returns the bad values that should be ignored in the data statistics.

Returns:
The bad values as integers that should be ignored.

virtual void RasterDataDescriptor::setInterleaveFormat ( InterleaveFormatType  format  )  [pure virtual]

Sets the interleave format of the data values.

Parameters:
format The interleave format in which the values in the data set are stored.
Subject Notifications:
This method notifies signalInterleaveFormatChanged() if the given interleave format is different than the current interleave format.

virtual InterleaveFormatType RasterDataDescriptor::getInterleaveFormat (  )  const [pure virtual]

Returns the interleave format of the data values.

Returns:
The interleave format in which the values in the data set are stored.

virtual void RasterDataDescriptor::setRows ( const std::vector< DimensionDescriptor > &  rows  )  [pure virtual]

Sets the rows for the data element that are available for processing.

This method sets the rows of the data element that are available for processing. It is typically called in the following scenarios:

  • Importing - An importer would call this method to set the default rows to import, where the given vector is identical to or a subset of the rows vector in the RasterFileDescriptor contained in this data descriptor. It would then called by the core after the user identifies any subset to load before Executable::execute() is called on the importer.
  • Creating a new raster element - Between calls to ModelServices::createDataDescriptor() and ModelServices::createElement() an object would call this method to set the rows describing the data in the element.

These rows differ from the rows in a corresponding RasterFileDescriptor in that they contain only those row objects that have been imported.

Parameters:
rows A vector of DimensionDescriptors containing one instance for each row of the data set that is available for processing.
Subject Notifications:
This method notifies signalRowsChanged() if the given rows are different than the current rows.
See also:
DimensionDescriptor

virtual const std::vector<DimensionDescriptor>& RasterDataDescriptor::getRows (  )  const [pure virtual]

Returns the rows for the data element that are available for processing.

Returns:
A vector of DimensionDescriptors containing one instance for each row of the data set that is available for processing.

virtual unsigned int RasterDataDescriptor::getRowSkipFactor (  )  const [pure virtual]

Returns the uniform skip factor between the on-disk numbers of DimensionDescriptors returned by getRows().

This is a convenience method.

Returns:
the uniform skip factor. 0 means there is no skipping
See also:
RasterUtilities::determineSkipFactor()

virtual DimensionDescriptor RasterDataDescriptor::getOriginalRow ( unsigned int  originalNumber  )  const [pure virtual]

Returns the row object containing a given original number.

Parameters:
originalNumber The zero-based original number for which to get the row object.
Returns:
The row object that has the given original number. An invalid DimensionDescriptor is returned if a row object does not exist with the given original number. This could occur if that particular row has not been imported.

virtual DimensionDescriptor RasterDataDescriptor::getOnDiskRow ( unsigned int  onDiskNumber  )  const [pure virtual]

Returns the row object containing a given on-disk number.

Parameters:
onDiskNumber The zero-based on-disk number for which to get the row object.
Returns:
The row object that has the given on-disk number. An invalid DimensionDescriptor is returned if a row object does not exist with the given on-disk number. This could occur if the element was created from an algorithm instead of an import, where there would be no on-disk representation of the data.

virtual DimensionDescriptor RasterDataDescriptor::getActiveRow ( unsigned int  activeNumber  )  const [pure virtual]

Returns the row object containing a given active number.

Parameters:
activeNumber The zero-based active number for which to get the row object.
Returns:
The row object that has the given active number. An invalid DimensionDescriptor is returned if a row object does not exist with the given active number.
Examples:
Tutorial/Tutorial4.cpp.

virtual unsigned int RasterDataDescriptor::getRowCount (  )  const [pure virtual]

Returns the number of rows available for processing.

This is a convenience method that returns getRows().size().

Returns:
The number of rows available for processing.
Examples:
Tutorial/Tutorial3.cpp, Tutorial/Tutorial4.cpp, and Tutorial/Tutorial5.cpp.

virtual void RasterDataDescriptor::setColumns ( const std::vector< DimensionDescriptor > &  columns  )  [pure virtual]

Sets the columns for the data element that are available for processing.

This method sets the columns of the data element that are available for processing. It is typically called in the following scenarios:

  • Importing - An importer would call this method to set the default columns to import, where the given vector is identical to or a subset of the columns vector in the RasterFileDescriptor contained in this data descriptor. It would then called by the core after the user identifies any subset to load before Executable::execute() is called on the importer.
  • Creating a new raster element - Between calls to ModelServices::createDataDescriptor() and ModelServices::createElement() an object would call this method to set the columns describing the data in the element.

These columns differ from the columns in a corresponding RasterFileDescriptor in that they contain only those column objects that have been imported.

Parameters:
columns A vector of DimensionDescriptors containing one instance for each column of the data set that is available for processing.
Subject Notifications:
This method notifies signalColumnsChanged() if the given columns are different than the current columns.
See also:
DimensionDescriptor

virtual const std::vector<DimensionDescriptor>& RasterDataDescriptor::getColumns (  )  const [pure virtual]

Returns the columns for the data element that are available for processing.

Returns:
A vector of DimensionDescriptors containing one instance for each column of the data set that is available for processing.

virtual unsigned int RasterDataDescriptor::getColumnSkipFactor (  )  const [pure virtual]

Returns the uniform skip factor between the on-disk numbers of DimensionDescriptors returned by getColumns().

This is a convenience method.

Returns:
the uniform skip factor. 0 means there is no skipping
See also:
RasterUtilities::determineSkipFactor()

virtual DimensionDescriptor RasterDataDescriptor::getOriginalColumn ( unsigned int  originalNumber  )  const [pure virtual]

Returns the column object containing a given original number.

Parameters:
originalNumber The zero-based original number for which to get the column object.
Returns:
The column object that has the given original number. An invalid DimensionDescriptor is returned if a column object does not exist with the given original number. This could occur if that particular column has not been imported.

virtual DimensionDescriptor RasterDataDescriptor::getOnDiskColumn ( unsigned int  onDiskNumber  )  const [pure virtual]

Returns the column object containing a given on-disk number.

Parameters:
onDiskNumber The zero-based on-disk number for which to get the column object.
Returns:
The column object that has the given on-disk number. An invalid DimensionDescriptor is returned if a column object does not exist with the given on-disk number. This could occur if the element was created from an algorithm instead of an import, where there would be no on-disk representation of the data.

virtual DimensionDescriptor RasterDataDescriptor::getActiveColumn ( unsigned int  activeNumber  )  const [pure virtual]

Returns the column object containing a given active number.

Parameters:
activeNumber The zero-based active number for which to get the column object.
Returns:
The column object that has the given active number. An invalid DimensionDescriptor is returned if a column object does not exist with the given active number.
Examples:
Tutorial/Tutorial4.cpp.

virtual unsigned int RasterDataDescriptor::getColumnCount (  )  const [pure virtual]

Returns the number of columns available for processing.

This is a convenience method that returns getColumns().size().

Returns:
The number of columns available for processing.
Examples:
Tutorial/Tutorial3.cpp, Tutorial/Tutorial4.cpp, and Tutorial/Tutorial5.cpp.

virtual void RasterDataDescriptor::setBands ( const std::vector< DimensionDescriptor > &  bands  )  [pure virtual]

Sets the bands for the data element that are available for processing.

This method sets the bands of the data element that are available for processing. It is typically called in the following scenarios:

  • Importing - An importer would call this method to set the default bands to import, where the given vector is identical to or a subset of the bands vector in the RasterFileDescriptor contained in this data descriptor. It would then called by the core after the user identifies any subset to load before Executable::execute() is called on the importer.
  • Creating a new sensor data element - Between calls to ModelServices::createDataDescriptor() and ModelServices::createElement() an object would call this method to set the bands describing the data in the element.

These bands differ from the bands in a corresponding RasterFileDescriptor in that they contain only those band objects that have been imported.

Parameters:
bands A vector of DimensionDescriptors containing one instance for each band of the data set that is available for processing.
Subject Notifications:
This method notifies signalBandsChanged() if the given bands are different than the current bands.
See also:
DimensionDescriptor

virtual const std::vector<DimensionDescriptor>& RasterDataDescriptor::getBands (  )  const [pure virtual]

Returns the bands for the data element that are available for processing.

Returns:
A vector of DimensionDescriptors containing one instance for each band of the data set that is available for processing.

virtual DimensionDescriptor RasterDataDescriptor::getOriginalBand ( unsigned int  originalNumber  )  const [pure virtual]

Returns the band object containing a given original number.

Parameters:
originalNumber The zero-based original number for which to get the band object.
Returns:
The band object that has the given original number. An invalid DimensionDescriptor is returned if a band object does not exist with the given original number. This could occur if that particular band has not been imported.

virtual DimensionDescriptor RasterDataDescriptor::getOnDiskBand ( unsigned int  onDiskNumber  )  const [pure virtual]

Returns the band object containing a given on-disk number.

Parameters:
onDiskNumber The zero-based on-disk number for which to get the band object.
Returns:
The band object that has the given on-disk number. An invalid DimensionDescriptor is returned if a band object does not exist with the given on-disk number. This could occur if the element was created from an algorithm instead of an import, where there would be no on-disk representation of the data.

virtual DimensionDescriptor RasterDataDescriptor::getActiveBand ( unsigned int  activeNumber  )  const [pure virtual]

Returns the band object containing a given active number.

Parameters:
activeNumber The zero-based active number for which to get the band object.
Returns:
The band object that has the given active number. An invalid DimensionDescriptor is returned if a band object does not exist with the given active number.

virtual unsigned int RasterDataDescriptor::getBandCount (  )  const [pure virtual]

Returns the number of bands available for processing.

This is a convenience method that returns getBands().size().

Returns:
The number of bands available for processing.

virtual void RasterDataDescriptor::setXPixelSize ( double  pixelSize  )  [pure virtual]

Sets the pixel size of each column in the data set.

By default, each row and column has a pixel size of 1.0, thereby producing a size ratio of 1.0, which indicates that the pixel appears as a square in the view. Calling this method with a value other than 1.0 allows for non-square pixels, which may represent the true nature of the data.

This method serves as a default for the view that can be associated with a model element. Once a view is created, call the Layer::setXScaleFactor() and Layer::setXOffset() method to change the display pixel size.

Parameters:
pixelSize The pixel size for each column in the data set. If this value is negative or zero, this method does nothing.
Subject Notifications:
This method notifies signalPixelSizeChanged() if the given column pixel size is different than the current column pixel size.

virtual double RasterDataDescriptor::getXPixelSize (  )  const [pure virtual]

Returns the pixel size of each column in the data set.

Returns:
The column pixel size.
See also:
setXPixelSize()

virtual void RasterDataDescriptor::setYPixelSize ( double  pixelSize  )  [pure virtual]

Sets the pixel size of each row in the data set.

By default, each row and column has a pixel size of 1.0, thereby producing a size ratio of 1.0, which indicates that the pixel appears as a square in the view. Calling this method with a value other than 1.0 allows for non-square pixels, which may represent the true nature of the data.

This method serves as a default for the view that can be associated with a model element. Once a view is created, call the Layer::setYScaleFactor() and Layer::setYOffset() method to change the display pixel size.

Parameters:
pixelSize The pixel size for each row in the data set. If this value is negative or zero, this method does nothing.
Subject Notifications:
This method notifies signalPixelSizeChanged() if the given row pixel size is different than the current row pixel size.

virtual double RasterDataDescriptor::getYPixelSize (  )  const [pure virtual]

Returns the pixel size of each row in the data set.

Returns:
The row pixel size.
See also:
setYPixelSize()

virtual void RasterDataDescriptor::setUnits ( const Units pUnits  )  [pure virtual]

Sets the units the values in the data set.

Parameters:
pUnits The units of the values in the data set.
Subject Notifications:
This method notifies Subject::signalModified if the given units object is different than the current units object.

virtual Units* RasterDataDescriptor::getUnits (  )  [pure virtual]

Returns a pointer to the element's units object.

Returns:
A pointer to the element's units object.

virtual const Units* RasterDataDescriptor::getUnits (  )  const [pure virtual]

Returns read-only access to the element's units object.

Returns:
A const pointer to the element's units object. The units represented by the returned pointer should not be modified. To modify the values, call the non-const version of getUnits().

virtual void RasterDataDescriptor::setDisplayBand ( RasterChannelType  eColor,
DimensionDescriptor  band 
) [pure virtual]

Sets the band that is initially displayed in a RasterLayer.

This method sets a band to be initially displayed when a raster layer is created.

Parameters:
eColor The color in which to display the given band.
band The band object to display in the given color.
Subject Notifications:
This method notifies signalDisplayBandChanged() if the given display band is different than the current display band for the given raster channel.
See also:
setDisplayMode()

virtual DimensionDescriptor RasterDataDescriptor::getDisplayBand ( RasterChannelType  eColor  )  const [pure virtual]

Returns the band object that is initially displayed in a RasterLayer.

Parameters:
eColor The color in which to get the initially displayed band.
Returns:
A pointer to the band object that is initially displayed in the given color. NULL is returned if no band has been set to be initially displayed for the given color.

virtual void RasterDataDescriptor::setDisplayMode ( DisplayMode  displayMode  )  [pure virtual]

Sets the initial display mode for the data in a RasterLayer.

Parameters:
displayMode The initial display mode.
Subject Notifications:
This method notifies signalDisplayModeChanged() if the given initial display mode is different than the current display mode.
See also:
setDisplayBand()

virtual DisplayMode RasterDataDescriptor::getDisplayMode (  )  const [pure virtual]

Returns the initial display mode for the data in a RasterLayer.

Returns:
The initial display mode.


Software Development Kit - Opticks 4.9.0 Build 16218