OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Class to scan pixels and flip target dn value to a replacement dn value. More...
#include <ossimPixelFlipper.h>
Public Types | |
enum | ReplacementMode { REPLACE_BAND_IF_TARGET = 0, REPLACE_BAND_IF_PARTIAL_TARGET = 1, REPLACE_ALL_BANDS_IF_PARTIAL_TARGET = 2, REPLACE_ONLY_FULL_TARGETS = 3, REPLACE_ALL_BANDS_IF_ANY_TARGET = 4 } |
Target Replacement Mode: More... | |
enum | ClampingMode { DISABLED = 0, CLAMPING_LO = 1, CLAMPING_HI = 2, CLAMPING_LO_AND_HI = 3 } |
When either a lo and/or hi clamp value is set, the clamping mode will be enabled accordingly and override any target replacement defined. More... | |
enum | ClipMode { NONE = 0, BOUNDING_RECT = 1, VALID_VERTICES = 2 } |
![]() | |
enum | ossimConnectableObjectDirectionType { CONNECTABLE_DIRECTION_NONE = 0, CONNECTABLE_DIRECTION_INPUT = 1, CONNECTABLE_DIRECTION_OUTPUT = 2 } |
typedef std::vector< ossimRefPtr< ossimConnectableObject > > | ConnectableObjectList |
Public Member Functions | |
ossimPixelFlipper (ossimObject *owner=NULL) | |
default constructor More... | |
virtual ossimString | getShortName () const |
virtual void | initialize () |
Initializes the state of the object from theInputConnection. More... | |
virtual ossimRefPtr< ossimImageData > | getTile (const ossimIrect &tile_rect, ossim_uint32 resLevel=0) |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
Method to save the state of an object to a keyword list. More... | |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
Method to the load (recreate) the state of an object from a keyword list. More... | |
virtual ossimScalarType | getOutputScalarType () const |
This will be used to query the output pixel type of the tile source. More... | |
virtual ossim_float64 | getMaxPixelValue (ossim_uint32 band=0) const |
Returns the max pixel of the band. More... | |
virtual ossim_float64 | getMinPixelValue (ossim_uint32 band=0) const |
Returns the min pixel of the band. More... | |
virtual std::ostream & | print (std::ostream &out) const |
Outputs theErrorStatus as an ossimErrorCode and an ossimString. More... | |
void | setTargetValue (ossim_float64 target_value) |
void | setTargetRange (ossim_float64 target_min, ossim_float64 target_max) |
Instead of a single value for a target, this method allows for specifying a range of values to flip to the replacement. More... | |
void | setReplacementValue (ossim_float64 replacement_value) |
void | setClampValue (ossim_float64 clamp_value, bool is_high_clamp_value=true) |
void | setClampValues (ossim_float64 clamp_value_lo, ossim_float64 clamp_value_hi) |
void | setReplacementMode (ossimPixelFlipper::ReplacementMode mode) |
bool | setReplacementMode (const ossimString &modeString) |
Accepts a string that must match the enumerator's label (can be lower case) and sets the replacement mode accordingly. More... | |
void | setClipMode (const ossimString &modeString) |
Clipping here refers to bounding rect or valid polygon (spacial) clipping, where all pixels outside the valid area are mapped to the replacement value. More... | |
void | setClipMode (ClipMode mode) |
ossim_float64 | getReplacementValue () const |
ossimPixelFlipper::ReplacementMode | getReplacementMode () const |
ossimString | getReplacementModeString () const |
ossimString | getClipModeString () const |
ClipMode | getClipMode () const |
virtual ossimRefPtr< ossimProperty > | getProperty (const ossimString &name) const |
virtual void | setProperty (ossimRefPtr< ossimProperty > property) |
virtual void | getPropertyNames (std::vector< ossimString > &propertyNames) const |
![]() | |
ossimImageSourceFilter (ossimObject *owner=NULL) | |
ossimImageSourceFilter (ossimImageSource *inputSource) | |
ossimImageSourceFilter (ossimObject *owner, ossimImageSource *inputSource) | |
virtual void | getOutputBandList (std::vector< ossim_uint32 > &bandList) const |
virtual ossim_uint32 | getNumberOfInputBands () const |
bool | canConnectMyInputTo (ossim_int32 inputIndex, const ossimConnectableObject *object) const |
required to be overriden by derived classes More... | |
virtual void | connectInputEvent (ossimConnectionEvent &event) |
virtual void | disconnectInputEvent (ossimConnectionEvent &event) |
virtual void | propertyEvent (ossimPropertyEvent &event) |
virtual void | refreshEvent (ossimRefreshEvent &event) |
![]() | |
ossimImageSource (ossimObject *owner=0) | |
ossimImageSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true) | |
virtual | ~ossimImageSource () |
virtual ossimRefPtr< ossimImageData > | getTile (const ossimIpt &origin, ossim_uint32 resLevel=0) |
virtual bool | getTile (ossimImageData *result, ossim_uint32 resLevel=0) |
Method to get a tile. More... | |
virtual ossimObject * | getObject () |
For RTTI support. More... | |
virtual const ossimObject * | getObject () const |
For RTTI support. More... | |
virtual void | getDecimationFactor (ossim_uint32 resLevel, ossimDpt &result) const |
Will return the decimation factor for the given resolution level. More... | |
virtual void | getDecimationFactors (std::vector< ossimDpt > &decimations) const |
Will return an array of all decimations for each resolution level. More... | |
virtual ossim_uint32 | getNumberOfDecimationLevels () const |
Will return the number of resolution levels. More... | |
virtual ossim_uint32 | getNumberOfOutputBands () const |
Returns the number of bands in a tile returned from this TileSource. More... | |
virtual ossim_uint32 | getTileWidth () const |
Returns the default processing tile width. More... | |
virtual ossim_uint32 | getTileHeight () const |
Returns the default processing tile height. More... | |
virtual double | getNullPixelValue (ossim_uint32 band=0) const |
Each band has a null pixel associated with it. More... | |
virtual ossimIrect | getBoundingRect (ossim_uint32 resLevel=0) const |
This will return the bounding rect of the source. More... | |
virtual void | getBoundingRect (ossimIrect &rect, ossim_uint32 resLevel=0) const |
Gets the bounding rectangle of the source. More... | |
virtual void | getValidImageVertices (std::vector< ossimIpt > &validVertices, ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER, ossim_uint32 resLevel=0) const |
ordering specifies how the vertices should be arranged. More... | |
virtual ossimRefPtr< ossimImageGeometry > | getImageGeometry () |
Returns the image geometry object associated with this tile source or NULL if not defined. More... | |
virtual void | setImageGeometry (const ossimImageGeometry *geom) |
Default implementation sets geometry of the first input to the geometry specified. More... | |
virtual void | saveImageGeometry () const |
Default method to call input's saveImageGeometry. More... | |
virtual void | saveImageGeometry (const ossimFilename &geometry_file) const |
Default method to call input's saveImageGeometry. More... | |
virtual bool | isIndexedData () const |
![]() | |
ossimSource (ossimObject *owner=0) | |
ossimSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true) | |
virtual | ~ossimSource () |
virtual bool | isSourceEnabled () const |
virtual void | enableSource () |
virtual void | disableSource () |
virtual bool | getEnableFlag () const |
virtual void | setEnableFlag (bool flag) |
virtual bool | isInitialized () const |
virtual void | setInitializedFlag (bool flag) |
![]() | |
ossimConnectableObject (ossimObject *owner=0) | |
Base constructor of this object. More... | |
ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true) | |
virtual | ~ossimConnectableObject () |
void | setId (const ossimId &id) |
All connectable objects will have id's. More... | |
const ossimId & | getId () const |
Will allow us to get this object's id. More... | |
const ossimObject * | getOwner () const |
Fetches the current owner, most likely a container but not limited to one. More... | |
virtual void | changeOwner (ossimObject *owner) |
Permits changing the object's owner. More... | |
virtual void | setDescription (const ossimString &description) |
virtual ossimString | getDescription () const |
virtual bool | isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const |
will check the direction specified to see if all slots are full. More... | |
OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id)) | |
OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true)) | |
OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true)) | |
OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className)) | |
virtual ossim_int32 | findInputIndex (const ossimConnectableObject *object) |
Return a valid index of the input list if the passed in object is found else return -1. More... | |
virtual ossim_int32 | findInputIndex (const ossimId &id) |
Return a valid index of the input list if the passed id is found else return -1. More... | |
virtual ossim_int32 | findOutputIndex (const ossimConnectableObject *object) |
Return a valid index of the output list if the passed in object is found else return -1. More... | |
virtual ossim_int32 | findOutputIndex (const ossimId &id) |
Return a valid index of the output list if the passed in object is found else return -1. More... | |
virtual ossim_int32 | getMyInputIndexToConnectTo (ossimConnectableObject *object) const |
Should return the first available index to connect to. More... | |
virtual ossim_int32 | getMyOutputIndexToConnectTo (ossimConnectableObject *object) const |
Should return the first available index to connect to. More... | |
virtual bool | canConnectMyOutputTo (ossim_int32 myOutputIndex, const ossimConnectableObject *object) const |
default implementation is to allow anyone to connect to us. More... | |
virtual void | disconnect (ossimConnectableObject *object=0) |
Will disconnect the object passed in. More... | |
virtual void | disconnect (const ossimId &id) |
Will disconnect the object passed in. More... | |
virtual ossimRefPtr< ossimConnectableObject > | disconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true) |
Will disconnect the object at the given input index and generate a connection event. More... | |
virtual void | disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true) |
Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More... | |
virtual void | disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true) |
virtual ossimRefPtr< ossimConnectableObject > | disconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true) |
Will disconnect the object at the given output index and generate a connection event. More... | |
virtual void | disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true) |
Will disconnect the output object. More... | |
virtual void | disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true) |
virtual void | disconnectAllInputs () |
Will disconnect all of the input objects. More... | |
virtual void | disconnectAllOutputs () |
Will disconnect all of the output objects. More... | |
virtual ossim_int32 | connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true) |
Will try to connect this objects input to the passed in object. More... | |
virtual ossim_int32 | connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true) |
Will connect the specified input to the passed in object. More... | |
virtual bool | connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true) |
virtual ossim_int32 | connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true) |
Will try to connect this objects output to the passed in object. More... | |
virtual bool | connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true) |
virtual bool | connectInputList (ConnectableObjectList &inputList) |
Will disconnect itself from all inputs and reset to the passed in input list. More... | |
virtual bool | connectOutputList (ConnectableObjectList &outputList) |
Will disconnect itself from all outputs and reset to the passed in output list. More... | |
virtual ossim_uint32 | getNumberOfInputs () const |
Returns the number of input objects. More... | |
virtual ossim_uint32 | getNumberOfOutputs () const |
Return the number of output objects. More... | |
ossimConnectableObject * | getInput (ossim_uint32 index=0) |
returns the object at the specified index. More... | |
const ossimConnectableObject * | getInput (ossim_uint32 index=0) const |
returns the object at the specified index. More... | |
ossimConnectableObject * | getOutput (ossim_uint32 index=0) |
returns the object at the specified index. More... | |
const ossimConnectableObject * | getOutput (ossim_uint32 index=0) const |
returns the object at the specified index. More... | |
virtual void | setNumberOfInputs (ossim_int32 numberOfInputs) |
Will set the number of inputs. More... | |
virtual bool | getInputListIsFixedFlag () const |
virtual bool | getOutputListIsFixedFlag () const |
virtual void | setNumberOfOutputs (ossim_int32 numberOfInputs) |
Will set the number of outputs. More... | |
const ConnectableObjectList & | getInputList () const |
const ConnectableObjectList & | getOutputList () const |
ConnectableObjectList & | getInputList () |
ConnectableObjectList & | getOutputList () |
OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true)) | |
OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true)) | |
virtual void | propagateEventToOutputs (ossimEvent &event) |
virtual void | propagateEventToInputs (ossimEvent &event) |
virtual void | setProperty (const ossimString &name, const ossimString &value) |
virtual ossim_uint32 | saveStateOfAllInputs (ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const |
Save the state of all inputs to a keyword list. More... | |
virtual bool | fillContainer (ossimConnectableContainer &container) |
Inserts this object and all of its children and inputs into the container provided. More... | |
bool | moveInputUp (const ossimId &id) |
Moves the input connection matching id up one in the connection list. More... | |
bool | moveInputDown (const ossimId &id) |
Moves the input connection matching id down one in the connection list. More... | |
bool | moveInputToTop (const ossimId &id) |
Moves the input connection matching id to the top of the connection list. More... | |
bool | moveInputToBottom (const ossimId &id) |
Moves the input connection matching id to the bottom of the connection list. More... | |
virtual void | accept (ossimVisitor &visitor) |
We will add a visitor interface for all connectable objects. More... | |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimObject * | dup () const |
virtual ossimString | getLongName () const |
virtual ossimString | getClassName () const |
virtual RTTItypeid | getType () const |
virtual bool | canCastTo (ossimObject *obj) const |
virtual bool | canCastTo (const RTTItypeid &id) const |
virtual bool | canCastTo (const ossimString &parentClassName) const |
virtual bool | isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
![]() | |
ossimListenerManager () | |
virtual | ~ossimListenerManager () |
virtual void | fireEvent (ossimEvent &event) |
virtual bool | addListener (ossimListener *listener) |
virtual bool | removeListener (ossimListener *listener) |
virtual bool | findListener (ossimListener *listener) |
![]() | |
ossimPropertyInterface () | |
virtual | ~ossimPropertyInterface () |
virtual ossimString | getPropertyValueAsString (const ossimString &name) const |
void | getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const |
void | setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList) |
![]() | |
ossimErrorStatusInterface () | |
virtual | ~ossimErrorStatusInterface () |
virtual ossimErrorCode | getErrorStatus () const |
virtual ossimString | getErrorStatusString () const |
virtual void | setErrorStatus (ossimErrorCode error_status) const |
virtual void | setErrorStatus () const |
virtual void | clearErrorStatus () const |
bool | hasError () const |
![]() | |
ossimConnectableObjectListener () | |
virtual | ~ossimConnectableObjectListener () |
virtual void | processEvent (ossimEvent &event) |
ProcessEvent. More... | |
virtual void | objectDestructingEvent (ossimObjectDestructingEvent &) |
virtual void | connectionEvent (ossimConnectionEvent &) |
virtual void | disconnectOutputEvent (ossimConnectionEvent &) |
virtual void | connectOutputEvent (ossimConnectionEvent &) |
virtual void | addObjectEvent (ossimContainerEvent &) |
virtual void | removeObjectEvent (ossimContainerEvent &) |
virtual void | containerEvent (ossimContainerEvent &) |
![]() | |
ossimListener () | |
virtual | ~ossimListener () |
void | enableListener () |
void | disableListener () |
void | setListenerEnableFlag (bool flag) |
bool | isListenerEnabled () const |
bool | getListenerEnableFlag () const |
Static Public Attributes | |
static const char | PF_TARGET_VALUE_KW [] = "target_value" |
static const char | PF_TARGET_RANGE_KW [] = "target_range" |
static const char | PF_REPLACEMENT_VALUE_KW [] = "replacement_value" |
static const char | PF_REPLACEMENT_MODE_KW [] = "replacement_mode" |
static const char | PF_CLAMP_VALUE_KW [] = "clamp_value" |
static const char | PF_CLAMP_VALUE_LO_KW [] = "clamp_value_lo" |
static const char | PF_CLAMP_VALUE_HI_KW [] = "clamp_value_hi" |
static const char | PF_CLIP_MODE_KW [] = "border_clip_mode" |
Protected Member Functions | |
virtual | ~ossimPixelFlipper () |
destructor More... | |
template<class T > | |
void | flipPixels (T dummy, ossimImageData *inpuTile, ossim_uint32 resLevel) |
This object can be used outside of an image chain for offline processing of existing tile. More... | |
template<class T > | |
void | clipTile (T dummy, ossimImageData *inpuTile, ossim_uint32 resLevel) |
bool | inRange (ossim_float64 value) const |
Verifies pixel is in range. More... | |
void | allocateClipTileBuffer (ossimRefPtr< ossimImageData > inputImage) |
![]() | |
virtual | ~ossimImageSourceFilter () |
![]() | |
ossimImageSource (const ossimImageSource &rhs) | |
const ossimImageSource & | operator= (const ossimImageSource &) |
![]() | |
ossimSource (const ossimSource &rhs) | |
const ossimSource & | operator= (const ossimSource &rhs) |
![]() | |
ossimConnectableObject * | findObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor) |
![]() | |
virtual | ~ossimReferenced () |
![]() | |
ossimListenerManager (const ossimListenerManager &rhs) | |
Class to scan pixels and flip target dn value to a replacement dn value.
This was written to fix problems with null pixels, i.e. an image has a digital number(dn) of 255 for null and it is desired to use a dn of 0 as a null. This can really be used to flip any pixel value to another.
Definition at line 37 of file ossimPixelFlipper.h.
When either a lo and/or hi clamp value is set, the clamping mode will be enabled accordingly and override any target replacement defined.
Enumerator | |
---|---|
DISABLED | |
CLAMPING_LO | |
CLAMPING_HI | |
CLAMPING_LO_AND_HI |
Definition at line 94 of file ossimPixelFlipper.h.
Enumerator | |
---|---|
NONE | |
BOUNDING_RECT | |
VALID_VERTICES |
Definition at line 102 of file ossimPixelFlipper.h.
Target Replacement Mode:
Examples given for 3-band pixel values as (R, G, B) with target = 0, and replacement = 1
If mode is REPLACE_BAND_IF_TARGET (default): Any pixel band with value of target will be replaced. (0, 0, 0) becomes (1, 1, 1) (0, 3, 2) becomes (1, 3, 2)
If mode is REPLACE_BAND_IF_PARTIAL_TARGET: A band with target value will be replaced only if at least one other band in the pixel does not have the target. (0, 0, 0) remains (0, 0, 0) (0, 3, 2) becomes (1, 3, 2)
If mode is REPLACE_ALL_BANDS_IF_PARTIAL_TARGET: All bands of the pixel will be replaced if any but not all bands in the pixel have the target value. (0, 0, 0) remains (0, 0, 0) (0, 3, 2) becomes (1, 1, 1)
If mode is REPLACE_ONLY_FULL_TARGETS: All bands in the pixel will be replaced only if they all have the target. (0, 0, 0) becomes (1, 1, 1) (0, 3, 2) remains (0, 3, 2)
If mode is REPLACE_ALL_BANDS_IF_ANY_TARGET: All bands in the pixel will be replaced if even one band has the target. (0, 0, 0) becomes (1, 1, 1) (0, 3, 2) remains (1, 1, 1)
Enumerator | |
---|---|
REPLACE_BAND_IF_TARGET | |
REPLACE_BAND_IF_PARTIAL_TARGET | |
REPLACE_ALL_BANDS_IF_PARTIAL_TARGET | |
REPLACE_ONLY_FULL_TARGETS | |
REPLACE_ALL_BANDS_IF_ANY_TARGET |
Definition at line 81 of file ossimPixelFlipper.h.
ossimPixelFlipper::ossimPixelFlipper | ( | ossimObject * | owner = NULL | ) |
default constructor
Definition at line 43 of file ossimPixelFlipper.cpp.
|
protectedvirtual |
|
protected |
Definition at line 543 of file ossimPixelFlipper.cpp.
References ossimImageData::dup(), ossimImageData::getImageRectangle(), ossimImageData::getNumberOfBands(), ossimRectilinearDataObject::getScalarType(), ossimImageData::setImageRectangle(), theClipTileBuffer, and ossimRefPtr< T >::valid().
Referenced by clipTile().
|
protected |
Definition at line 425 of file ossimPixelFlipper.cpp.
References allocateClipTileBuffer(), BOUNDING_RECT, ossimIrect::clipToRect(), ossimIrect::completely_within(), ossimRefPtr< T >::get(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getHeight(), ossimImageData::getImageRectangle(), ossimImageData::getWidth(), ossimIrect::intersects(), ossimPolygon::isPointWithin(), ossimIrect::ll(), ossimImageData::loadTile(), ossimIrect::lr(), ossimImageData::makeBlank(), NONE, OSSIM_EMPTY, OSSIM_FULL, ossimDataObject::setDataObjectStatus(), ossimImageData::setImageRectangle(), ossimImageData::setNull(), theBoundingRects, theClipMode, theClipTileBuffer, theValidVertices, ossimIrect::ul(), ossimIrect::ur(), ossimRefPtr< T >::valid(), VALID_VERTICES, ossimImageData::validate(), ossimIpt::x, x, ossimIpt::y, and y.
|
protected |
This object can be used outside of an image chain for offline processing of existing tile.
Definition at line 158 of file ossimPixelFlipper.cpp.
References BOUNDING_RECT, ossimIrect::completely_within(), ossimImageData::getBuf(), ossimImageData::getImageRectangle(), ossimImageData::getNumberOfBands(), ossimIrect::intersects(), ossim::isnan(), ossimIrect::ll(), ossimIrect::lr(), REPLACE_ALL_BANDS_IF_ANY_TARGET, REPLACE_ALL_BANDS_IF_PARTIAL_TARGET, REPLACE_BAND_IF_PARTIAL_TARGET, REPLACE_BAND_IF_TARGET, REPLACE_ONLY_FULL_TARGETS, theBoundingRects, theClampingMode, theClampValueHi, theClampValueLo, theClipMode, theReplacementMode, theReplacementValue, theTargetValueHi, theTargetValueLo, theValidVertices, ossimIrect::ul(), ossimIrect::ur(), VALID_VERTICES, ossimImageData::validate(), ossimIpt::x, and ossimIpt::y.
Referenced by getTile().
ossimPixelFlipper::ClipMode ossimPixelFlipper::getClipMode | ( | ) | const |
Definition at line 967 of file ossimPixelFlipper.cpp.
References theClipMode.
ossimString ossimPixelFlipper::getClipModeString | ( | ) | const |
Definition at line 956 of file ossimPixelFlipper.cpp.
References BOUNDING_RECT, theClipMode, and VALID_VERTICES.
Referenced by print(), and saveState().
|
virtual |
Returns the max pixel of the band.
Reimplemented from ossimImageSource.
Definition at line 660 of file ossimPixelFlipper.cpp.
References ossimImageSource::getMaxPixelValue(), ossimImageSource::getMinPixelValue(), MAX, MIN, and theClampValueHi.
|
virtual |
Returns the min pixel of the band.
Reimplemented from ossimImageSource.
Definition at line 671 of file ossimPixelFlipper.cpp.
References ossimImageSource::getMaxPixelValue(), ossimImageSource::getMinPixelValue(), MAX, MIN, and theClampValueLo.
|
virtual |
This will be used to query the output pixel type of the tile source.
Please ignore the argument. It will soon be removed.
Reimplemented from ossimImageSource.
Definition at line 603 of file ossimPixelFlipper.cpp.
References ossimImageSource::getOutputScalarType(), OSSIM_SCALAR_UNKNOWN, OSSIM_USHORT11, OSSIM_USHORT12, OSSIM_USHORT13, OSSIM_USHORT14, OSSIM_USHORT15, OSSIM_USHORT16, theClampValueHi, and ossimImageSourceFilter::theInputConnection.
|
virtual |
Reimplemented from ossimImageSourceFilter.
Definition at line 986 of file ossimPixelFlipper.cpp.
References PF_TARGET_RANGE_KW, PF_TARGET_VALUE_KW, ossimProperty::setCacheRefreshBit(), theMutex, theTargetValueLo, and ossimString::toString().
|
virtual |
Reimplemented from ossimImageSourceFilter.
Definition at line 1133 of file ossimPixelFlipper.cpp.
References PF_TARGET_VALUE_KW.
ossimPixelFlipper::ReplacementMode ossimPixelFlipper::getReplacementMode | ( | ) | const |
Definition at line 930 of file ossimPixelFlipper.cpp.
References theReplacementMode.
ossimString ossimPixelFlipper::getReplacementModeString | ( | ) | const |
Definition at line 935 of file ossimPixelFlipper.cpp.
References REPLACE_ALL_BANDS_IF_ANY_TARGET, REPLACE_ALL_BANDS_IF_PARTIAL_TARGET, REPLACE_BAND_IF_PARTIAL_TARGET, REPLACE_BAND_IF_TARGET, REPLACE_ONLY_FULL_TARGETS, and theReplacementMode.
Referenced by print(), and saveState().
ossim_float64 ossimPixelFlipper::getReplacementValue | ( | ) | const |
Definition at line 925 of file ossimPixelFlipper.cpp.
References theReplacementValue.
|
virtual |
Reimplemented from ossimObject.
Definition at line 1148 of file ossimPixelFlipper.cpp.
|
virtual |
tile_rect | Rectangle to fill tile with. |
resLevel | Reduced resolution level to grab from. |
Reimplemented from ossimImageSource.
Definition at line 72 of file ossimPixelFlipper.cpp.
References flipPixels(), ossimRefPtr< T >::get(), ossimImageData::getBuf(), ossimRectilinearDataObject::getScalarType(), ossimImageSource::getTile(), ossimSource::isSourceEnabled(), OSSIM_FLOAT32, OSSIM_FLOAT64, OSSIM_NORMALIZED_DOUBLE, OSSIM_NORMALIZED_FLOAT, OSSIM_SCALAR_UNKNOWN, OSSIM_SINT32, OSSIM_SSHORT16, OSSIM_UCHAR, OSSIM_UINT16, OSSIM_UINT32, OSSIM_USHORT11, OSSIM_USHORT12, OSSIM_USHORT13, OSSIM_USHORT14, OSSIM_USHORT15, ossimNotify(), ossimNotifyLevel_WARN, ossimImageSourceFilter::theInputConnection, theMutex, ossimRefPtr< T >::valid(), and ossimImageData::validate().
Referenced by ossimBitMaskWriter::generateMask().
|
virtual |
Initializes the state of the object from theInputConnection.
Reimplemented from ossimImageSourceFilter.
Definition at line 571 of file ossimPixelFlipper.cpp.
References ossimImageSource::getBoundingRect(), ossimImageSource::getNumberOfDecimationLevels(), ossimImageSource::getValidImageVertices(), ossimImageSourceFilter::initialize(), OSSIM_CLOCKWISE_ORDER, theBoundingRects, theMutex, and theValidVertices.
Referenced by ossimBitMaskWriter::generateMask().
|
protected |
Verifies pixel is in range.
Definition at line 1153 of file ossimPixelFlipper.cpp.
References ossimImageSource::getMaxPixelValue(), ossimImageSource::getMinPixelValue(), ossimImageSource::getNullPixelValue(), ossimNotify(), ossimNotifyLevel_WARN, and ossimImageSourceFilter::theInputConnection.
Referenced by setClampValue(), and setReplacementValue().
|
virtual |
Method to the load (recreate) the state of an object from a keyword list.
Return true if ok or false on error.
Reimplemented from ossimImageSourceFilter.
Definition at line 682 of file ossimPixelFlipper.cpp.
References ossimString::after(), ossimString::before(), ossimKeywordlist::find(), ossimImageSourceFilter::loadState(), PF_CLAMP_VALUE_HI_KW, PF_CLAMP_VALUE_KW, PF_CLAMP_VALUE_LO_KW, PF_CLIP_MODE_KW, PF_REPLACEMENT_MODE_KW, PF_REPLACEMENT_VALUE_KW, PF_TARGET_RANGE_KW, PF_TARGET_VALUE_KW, setClampValue(), setClipMode(), setReplacementMode(), setReplacementValue(), setTargetRange(), setTargetValue(), status, and ossimString::toFloat64().
Referenced by ossimBitMaskWriter::loadState().
|
virtual |
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
Reimplemented from ossimSource.
Definition at line 972 of file ossimPixelFlipper.cpp.
References ossimString::c_str(), getClipModeString(), getReplacementModeString(), theClampValueHi, theClampValueLo, theReplacementValue, theTargetValueHi, and theTargetValueLo.
|
virtual |
Method to save the state of an object to a keyword list.
Return true if ok or false on error.
Reimplemented from ossimImageSourceFilter.
Definition at line 751 of file ossimPixelFlipper.cpp.
References ossimKeywordlist::add(), getClipModeString(), getReplacementModeString(), PF_CLAMP_VALUE_HI_KW, PF_CLAMP_VALUE_LO_KW, PF_CLIP_MODE_KW, PF_REPLACEMENT_MODE_KW, PF_REPLACEMENT_VALUE_KW, PF_TARGET_RANGE_KW, PF_TARGET_VALUE_KW, ossimImageSourceFilter::saveState(), theClampingMode, theClampValueHi, theClampValueLo, theReplacementValue, theTargetValueHi, theTargetValueLo, and ossimString::toString().
void ossimPixelFlipper::setClampValue | ( | ossim_float64 | clamp_value, |
bool | is_high_clamp_value = true |
||
) |
clamp_value | If set all pixel values above this range will (or below if clamp_max_value = false) be clamped to clamp_value. Must be less than max pixel (or greater than the min pixel) value of the input and cannot be null. |
Definition at line 817 of file ossimPixelFlipper.cpp.
References CLAMPING_HI, CLAMPING_LO, inRange(), theClampingMode, theClampValueHi, theClampValueLo, and theMutex.
Referenced by loadState(), and setClampValues().
void ossimPixelFlipper::setClampValues | ( | ossim_float64 | clamp_value_lo, |
ossim_float64 | clamp_value_hi | ||
) |
Definition at line 839 of file ossimPixelFlipper.cpp.
References DISABLED, setClampValue(), and theClampingMode.
void ossimPixelFlipper::setClipMode | ( | const ossimString & | modeString | ) |
Clipping here refers to bounding rect or valid polygon (spacial) clipping, where all pixels outside the valid area are mapped to the replacement value.
Definition at line 895 of file ossimPixelFlipper.cpp.
References BOUNDING_RECT, ossimString::downcase(), NONE, ossimNotify(), ossimNotifyLevel_WARN, and VALID_VERTICES.
Referenced by loadState().
void ossimPixelFlipper::setClipMode | ( | ossimPixelFlipper::ClipMode | mode | ) |
Definition at line 889 of file ossimPixelFlipper.cpp.
References theClipMode, and theMutex.
|
virtual |
Reimplemented from ossimImageSourceFilter.
Definition at line 1087 of file ossimPixelFlipper.cpp.
References PF_TARGET_VALUE_KW, setTargetValue(), and ossimString::toDouble().
void ossimPixelFlipper::setReplacementMode | ( | ossimPixelFlipper::ReplacementMode | mode | ) |
Definition at line 846 of file ossimPixelFlipper.cpp.
References theMutex, and theReplacementMode.
Referenced by ossimBitMaskWriter::initializeFlipper(), and loadState().
bool ossimPixelFlipper::setReplacementMode | ( | const ossimString & | modeString | ) |
Accepts a string that must match the enumerator's label (can be lower case) and sets the replacement mode accordingly.
If the string is not understood, the mode remains unchanged and FALSE is returned.
Definition at line 852 of file ossimPixelFlipper.cpp.
References ossimNotify(), ossimNotifyLevel_WARN, REPLACE_ALL_BANDS_IF_ANY_TARGET, REPLACE_ALL_BANDS_IF_PARTIAL_TARGET, REPLACE_BAND_IF_PARTIAL_TARGET, REPLACE_BAND_IF_TARGET, REPLACE_ONLY_FULL_TARGETS, theMutex, theReplacementMode, and ossimString::upcase().
void ossimPixelFlipper::setReplacementValue | ( | ossim_float64 | replacement_value | ) |
replacement_value | This is the value to flip target to. |
Definition at line 806 of file ossimPixelFlipper.cpp.
References inRange(), theMutex, and theReplacementValue.
Referenced by ossimBitMaskWriter::initializeFlipper(), and loadState().
void ossimPixelFlipper::setTargetRange | ( | ossim_float64 | target_min, |
ossim_float64 | target_max | ||
) |
Instead of a single value for a target, this method allows for specifying a range of values to flip to the replacement.
The replacement mode is still referenced.
This | is the value to flip. |
Definition at line 793 of file ossimPixelFlipper.cpp.
References theMutex, theTargetValueHi, and theTargetValueLo.
Referenced by loadState(), and ossimBitMaskWriter::setBogusPixelRange().
void ossimPixelFlipper::setTargetValue | ( | ossim_float64 | target_value | ) |
target_value | This is the value to flip. |
Definition at line 780 of file ossimPixelFlipper.cpp.
References theMutex, theTargetValueHi, and theTargetValueLo.
Referenced by ossimBitMaskWriter::initializeFlipper(), loadState(), ossimBitMaskWriter::setBogusPixel(), and setProperty().
|
static |
Definition at line 46 of file ossimPixelFlipper.h.
Referenced by loadState(), and saveState().
|
static |
Definition at line 44 of file ossimPixelFlipper.h.
Referenced by loadState().
|
static |
Definition at line 45 of file ossimPixelFlipper.h.
Referenced by loadState(), and saveState().
|
static |
Definition at line 47 of file ossimPixelFlipper.h.
Referenced by loadState(), and saveState().
|
static |
Definition at line 43 of file ossimPixelFlipper.h.
Referenced by loadState(), and saveState().
|
static |
Definition at line 42 of file ossimPixelFlipper.h.
Referenced by loadState(), and saveState().
|
static |
Definition at line 41 of file ossimPixelFlipper.h.
Referenced by getProperty(), loadState(), and saveState().
|
static |
Definition at line 40 of file ossimPixelFlipper.h.
Referenced by getProperty(), getPropertyNames(), loadState(), saveState(), and setProperty().
|
mutableprotected |
Definition at line 267 of file ossimPixelFlipper.h.
Referenced by clipTile(), flipPixels(), and initialize().
|
protected |
Definition at line 244 of file ossimPixelFlipper.h.
Referenced by flipPixels(), saveState(), setClampValue(), and setClampValues().
|
protected |
Definition at line 243 of file ossimPixelFlipper.h.
Referenced by flipPixels(), getMaxPixelValue(), getOutputScalarType(), print(), saveState(), and setClampValue().
|
protected |
The range of desired pixel values.
Any pixels outside this range are set to the corresponding clamp value. Note that theReplacementValue is not referenced when clamping.
Definition at line 242 of file ossimPixelFlipper.h.
Referenced by flipPixels(), getMinPixelValue(), print(), saveState(), and setClampValue().
|
protected |
Border Clip mode.
This will flip to nulls any pixel value outside the specified mode.
Valid modes are:
none bounding_rect valid_vertices
if the mode is "none" then nothing is done. if the mode is "bounding_rect" then the bounding rect for the requested rlevel is used and every pixel outside that
Definition at line 261 of file ossimPixelFlipper.h.
Referenced by clipTile(), flipPixels(), getClipMode(), getClipModeString(), and setClipMode().
|
protected |
Definition at line 269 of file ossimPixelFlipper.h.
Referenced by allocateClipTileBuffer(), and clipTile().
|
mutableprotected |
For lock and unlock.
Definition at line 264 of file ossimPixelFlipper.h.
Referenced by getProperty(), getTile(), initialize(), setClampValue(), setClipMode(), setReplacementMode(), setReplacementValue(), setTargetRange(), and setTargetValue().
|
protected |
See documentation for ReplacementMode enum above.
Definition at line 238 of file ossimPixelFlipper.h.
Referenced by flipPixels(), getReplacementMode(), getReplacementModeString(), and setReplacementMode().
|
protected |
When target values are defined, this is the value the pixel will assume if the pixel falls within the target range (according to the rules for replacement mode)
Definition at line 237 of file ossimPixelFlipper.h.
Referenced by flipPixels(), getReplacementValue(), print(), saveState(), and setReplacementValue().
|
protected |
Definition at line 233 of file ossimPixelFlipper.h.
Referenced by flipPixels(), print(), saveState(), setTargetRange(), and setTargetValue().
|
protected |
The value range to replace.
For a single value replacement, both Lo and Hi are equal. Any pixel within this range will be remapped to the replacement value
Definition at line 232 of file ossimPixelFlipper.h.
Referenced by flipPixels(), getProperty(), print(), saveState(), setTargetRange(), and setTargetValue().
|
mutableprotected |
Definition at line 266 of file ossimPixelFlipper.h.
Referenced by clipTile(), flipPixels(), and initialize().