Base class for image supporting "pull" operations. More...
#include <spatmod/imagestage.h>

Base class for image supporting "pull" operations.
| SPATMOD::IMAGE::STAGE::STAGE | ( | ) |
| virtual SPATMOD::IMAGE::STAGE::~STAGE | ( | ) | [virtual] |
| ERRVALUE SPATMOD::IMAGE::STAGE::ComputeMultivariateStats | ( | STAT_MULTIVAR & | Stats | ) |
Compute multivariate statistics for entire image.
This will read entire image once. Initialize() must be done before calling this function.
| Stats | Statistics returned |
| ERRVALUE SPATMOD::IMAGE::STAGE::ComputePixelRange | ( | const SECTION & | section, | |
| PIXEL & | PixelValueMin, | |||
| PIXEL & | PixelValueMax, | |||
| RANGETYPE | accuracy = RANGETYPE_Maximal | |||
| ) | [inline] |
Compute pixel range for specified section.
The specified "accuracy" value may affect the method used to compute the range. If RANGETYPE_Typical is specified and the image supports zoom values lower than that specified, additional zooming may be used to improve performance. If RANGETYPE_Maximal is used, implementations may use previously computed aggregate ranges that cover the specified section, possibly up to the entire image extent. Initialize() must be done before calling this function.
| section | Image section, including zoom factor if desired | |
| PixelValueMin | Minimum pixel values returned | |
| PixelValueMax | Maximum pixel values returned | |
| accuracy | Desired range accuracy |
Compute pixel range for image suitable for specified range type.
Will read entire image if necessary. Initialize() must be done before calling this function.
| RangeType | Required range type |
| ERRVALUE SPATMOD::IMAGE::STAGE::ComputeSampleStats | ( | STATSVALIDITY | StatsValidity | ) |
Compute statistics for image samples.
Will read entire image if necessary. Initialize() must be done before calling this function.
| StatsValidity | Required validity |
| double SPATMOD::IMAGE::STAGE::GetBestZoom | ( | double | ZoomDesired, | |
| BESTZOOM | bestzoom | |||
| ) | const |
Get best allowed zoom value for specified zoom.
| ZoomDesired | Desired zoom value | |
| bestzoom | How to determine best zoom |
Get bounding region for image.
Default implementation returns image rectangular extents.
| region | Region in image coordinates returned |
| void SPATMOD::IMAGE::STAGE::GetMetadata | ( | MISTRING & | result, | |
| METADATACONTENT | content, | |||
| METADATAFORMAT | format | |||
| ) | const |
Get metadata as string.
| result | Resulting string returned | |
| content | Requested content | |
| format | Formatting |
| void SPATMOD::IMAGE::STAGE::GetMetadataThisOnly | ( | MISTRING & | result, | |
| METADATACONTENT | content, | |||
| METADATAFORMAT | format | |||
| ) | const [protected] |
Get metadata for this stage only.
| result | Resulting string returned | |
| content | Requested content | |
| format | Formatting |
| const STAT_UNIVARIATE* SPATMOD::IMAGE::STAGE::GetSampleStats | ( | UINT16 | index | ) | const |
Get statistics for sample.
| index | Sample index |
| STATSVALIDITY SPATMOD::IMAGE::STAGE::GetSampleStatsValidity | ( | ) | const [inline] |
Get validity for sample statistics.
| ERRVALUE SPATMOD::IMAGE::STAGE::Initialize | ( | ) |
Initialize stage.
Must be be called after construction and optional parameter settings before stage is inserted into pipeline.
Pull section of image into buffer.
If buffer has already been created it must match the specified section in size, and have the same pixel properties as the image. If buffer has not been created it will be created with the appropriate size and pixel properties.
| section | Section to pull data from | |
| buffer | Buffer to put data into |
| ERRVALUE SPATMOD::IMAGE::STAGE::PullBegin | ( | const SECTION_ITERATOR & | iterator | ) |
Begin pull of a specific section.
Should not be called directly except within v_PullBegin by class derived from FILTER. May be called multiple times.
| ERRVALUE SPATMOD::IMAGE::STAGE::PullEnd | ( | ) |
Finish pulling subsections.
Should not be called directly except within v_PullEnd by class derived from FILTER.
Pull data for specified subsection into buffer.
Should not be called directly except within v_PullSubSection by class derived from FILTER.
| ERRVALUE SPATMOD::IMAGE::STAGE::SetSampleStats | ( | const STAT_UNIVARIATE * | SampleStatsArray, | |
| STATSVALIDITY | StatsValidity | |||
| ) | [protected] |
Set sample statistics array and validity.
Should only be used in implementations where v_Initialize can efficiently determine statistics.
| void SPATMOD::IMAGE::STAGE::SetSampleStatsValidity | ( | STATSVALIDITY | StatsValidity | ) | [protected] |
Set validity of sample statistics.
Should only be called by override of v_ComputeSampleStats.
| virtual ERRVALUE SPATMOD::IMAGE::STAGE::v_ComputePixelRange | ( | const SECTION & | section, | |
| PIXEL & | PixelValueMin, | |||
| PIXEL & | PixelValueMax, | |||
| RANGETYPE | accuracy | |||
| ) | [protected, virtual] |
Compute pixel range for specified image section.
Implementations are not required to honor RANGETYPE_Exact requests if deemed too inefficient and may instead behave as though RANGETYPE_Maximal is used. Default implementation returns range for entire image if available and specified section is large, otherwise the requested section is read and the exact range determined.
| section | Section, including desired zoom value if allowed | |
| PixelValueMin | Minimum pixel value returned | |
| PixelValueMax | Maximum pixel value returned | |
| accuracy | Desired range accuracy |
| virtual ERRVALUE SPATMOD::IMAGE::STAGE::v_ComputeSampleStats | ( | STAT_UNIVARIATE * | SampleStatsArray, | |
| STATSVALIDITY | StatsValidity | |||
| ) | [private, virtual] |
Compute statistics for image samples.
May read entire image if necessary. Default implementation will compute at less than 1X zoom if supported unless STATSVALIDITY_Exact used. Most implementations should override to maximize efficiency.
| SampleStatsArray | Array to contain statistics, dimension matches number of samples | |
| StatsValidity | Required validity |
| virtual ERRVALUE SPATMOD::IMAGE::STAGE::v_GetBoundingRegion | ( | REGION2D & | region | ) | const [protected, virtual] |
Get bounding region for image.
Default implementation returns image rectangular extents.
| region | Region in image coordinates returned |
| virtual void SPATMOD::IMAGE::STAGE::v_GetMetadata | ( | MISTRING & | result, | |
| METADATACONTENT | content, | |||
| METADATAFORMAT | format | |||
| ) | const [private, pure virtual] |
Get metadata as string.
| result | Resulting string returned | |
| content | Requested content | |
| format | Formatting |
| virtual void SPATMOD::IMAGE::STAGE::v_GetMetadataThisOnly | ( | MISTRING & | result, | |
| METADATACONTENT | content, | |||
| METADATAFORMAT | format | |||
| ) | const [private, virtual] |
Get metadata for this stage only.
| result | Resulting string returned | |
| content | Requested content | |
| format | Formatting |
| virtual ERRVALUE SPATMOD::IMAGE::STAGE::v_Initialize | ( | ) | [private, pure virtual] |
Initialize stage before insertion into pipeline.
Must do the following (in order), checking for error after each call. Validate all class-specific settings. Open any data sources/files if required. Call v_Initialize() on base class (if not private in base). Call SetAllProperties OR call SetPixelProperties(), SetTotalDimensions(), and SetTransToCRS(). Optionally call SetTileDimensions, SetPixelRange and/or other Set... methods needed. Preprocessing of source stages to determine properties may be done here or the first time v_PullBegin is called if does not affect base image properties.
Implemented in SPATMOD::IMAGE::FILTER_FOCAL, SPATMOD::IMAGE::FILTER_FOCALTOPOGRAPHIC, SPATMOD::IMAGE::FILTER_FUSION, SPATMOD::IMAGE::FILTER_LINEAR, SPATMOD::IMAGE::FILTER_MORPHOLOGY_DILATION, SPATMOD::IMAGE::FILTER_MORPHOLOGY_EROSION, SPATMOD::IMAGE::FILTER_MORPHOLOGY_OPENING, and SPATMOD::IMAGE::FILTER_MORPHOLOGY_CLOSING.
| virtual ERRVALUE SPATMOD::IMAGE::STAGE::v_PullBegin | ( | const SECTION_ITERATOR & | iterator | ) | [private, pure virtual] |
Begin pull of a specific section.
May be called multiple times. If any extra processing is done it may be done the first time this is called if not done in v_Initialize.
| iterator | SubSection iterator to be used |
Implemented in SPATMOD::IMAGE::FILTER, SPATMOD::IMAGE::FILTER_FOCAL, SPATMOD::IMAGE::FILTER_FOCALTOPOGRAPHIC, SPATMOD::IMAGE::FILTER_FUSION, SPATMOD::IMAGE::FILTER_MORPHOLOGY_DILATION, and SPATMOD::IMAGE::FILTER_MORPHOLOGY_EROSION.
| virtual ERRVALUE SPATMOD::IMAGE::STAGE::v_PullEnd | ( | ) | [private, pure virtual] |
Finish pulling subsections.
Implemented in SPATMOD::IMAGE::FILTER, and SPATMOD::IMAGE::SOURCE.
| virtual ERRVALUE SPATMOD::IMAGE::STAGE::v_PullSubSection | ( | const SECTION & | SubSection, | |
| BUFFER & | buffer | |||
| ) | [private, pure virtual] |
Pull data for specified subsection into buffer.
Buffer provided may be larger than needed for subsection, in which case data not overwritten in buffer may be left unchanged for efficiency.
| SubSection | Current subsection to read | |
| buffer | Buffer to read into |
Implemented in SPATMOD::IMAGE::FILTER_FOCALTOPOGRAPHIC, SPATMOD::IMAGE::FILTER_MORPHOLOGY_DILATION, SPATMOD::IMAGE::FILTER_MORPHOLOGY_EROSION, SPATMOD::IMAGE::FILTER_MORPHOLOGY_OPENING, and SPATMOD::IMAGE::FILTER_MORPHOLOGY_CLOSING.
| virtual bool SPATMOD::IMAGE::STAGE::v_QueryCapability | ( | CAPABILITY | capability | ) | const [protected, virtual] |
Query image for specified capability.
Reimplemented from SPATMOD::IMAGE::BASE.
| ERRVALUE SPATMOD::IMAGE::STAGE::ZoomCoordinates | ( | DPOINT2D * | PtsImage, | |
| UINT32 | NumPoints, | |||
| double | TgtZoom, | |||
| double | SrcZoom = 1 | |||
| ) | const |
Apply zoom to coordinates as points.
| PtsImage | Points passed/returned in source/target image coordinates | |
| NumPoints | Number of points | |
| TgtZoom | Target zoom factor | |
| SrcZoom | Source zoom factor |
| ERRVALUE SPATMOD::IMAGE::STAGE::ZoomRectangle | ( | DRECT2D & | RectImage, | |
| double | TgtZoom, | |||
| double | SrcZoom = 1 | |||
| ) | const |
Apply zoom to rectangle.
| RectImage | Rectangle passed/returned in source/target image coordinates | |
| TgtZoom | Target zoom factor | |
| SrcZoom | Source zoom factor |
1.6.1