User Tools

Site Tools


api:dk11:activex:tatukgis_xdk11.tgis_layerpixel

TGIS_LayerPixel class

DK11 for ActiveX | TatukGIS_XDK11.TGIS_LayerPixel | Classes | Methods | Properties

Encapsulation of a common image layer - abstract class.

Available also on: Delphi | .NET | Java.

Syntax

// C#
public class TGIS_LayerPixel : ITGIS_LayerPixel, IConnectionPointContainer, ITGIS_LayerPixelEvents 
{
}
' VisualBasic
Public Class TGIS_LayerPixel
  Implements ITGIS_LayerPixel
  Implements IConnectionPointContainer
  Implements ITGIS_LayerPixelEvents
End Class
// Oxygene
type
  TGIS_LayerPixel = public class
  end;

Implements

ITGIS_LayerPixel IConnectionPointContainer ITGIS_LayerPixelEvents

Methods

Inherited Overrides Protected
Name Visibility Description
Alive public Makes a layer non-dormant.
(Inherited from ITGIS_Layer)
ApplyAntialiasSettings public Applies antialias settings used in scaling operations.
ApplyAntialiasSettings_2 public Applies antialias settings used in scaling operations.
ApplyCuttingPolygon public Sets a cutting polygon for a layer.
(Inherited from ITGIS_Layer)
AssignedParentLayerInternal public Assigns a parent layer.
AttachDelphiObj public Only for internal use of TatukGIS.
(Inherited from ITBaseObject)
Build public Builds an in-memory layer.
Build_2 public Builds a layer.
Build_3 public Builds an image layer.
Build_4 public Builds an in-memory layer.
Build_5 public Builds a layer.
Build_6 public Builds an image layer.
ChangeHash public Changes the hash for the purpose of verifying layer's modifications.
(Inherited from ITGIS_Layer)
ClearModified public Sets IsModified flag to false for a layer and its sublayers.
(Inherited from ITGIS_Layer)
DelphiObj public Only for internal use of TatukGIS.
(Inherited from ITBaseObject)
Dormant public Makes a layer dormant.
(Inherited from ITGIS_Layer)
DormantGain public Calculates the approximate gain (in Megabytes) which can be achieved by releasing memory by calling Dormant method.
(Inherited from ITGIS_Layer)
Draw public Draws a layer.
(Inherited from ITGIS_Layer)
DrawEx public Draws a layer within a defined extent.
(Inherited from ITGIS_Layer)
DrawFlash public Draws a flash.
(Inherited from ITGIS_Layer)
DrawSelected public Draws only the selected item(s) on layer.
(Inherited from ITGIS_Layer)
DrawSelectedEx public Draws only the selected item(s) on layer that are within a defined extent.
(Inherited from ITGIS_Layer)
ExportLayer public Export layer.
FinalizeWrite public Performs any operation required to safely finalize write operation, such as building quad trees for TGIS_FilePixelStore.
ForEachSubLayer public Returns in callback event the layer and all sublayers belonging to it.
(Inherited from ITGIS_Layer)
GenerateRamp public Generates a grid ramp.
GenerateRampEx public Generates a grid ramp from a mapped color array.
GenerateRampEx_2 public Generates a grid ramp from a mapped color array.
GenerateRamp_2 public Generates a grid ramp.
GetAvailableLayers public Gets a list of layers available in storage.
(Inherited from ITGIS_Layer)
GetBitmap public Fills provided _bitmap array with values defined by _extent.
GetColorRamp public Calculates default color ramp RGB values.
GetGrid public Fills provided _grid array with values defined by _extent.
GetRawBitmap public Fills provided _bitmap array with values defined by _extent.
GridOperationEvent public Grid operation event.
(Inherited from ITGIS_LayerPixelEvents)
HourglassShake public Notifies of busy state using an hourglass.
(Inherited from ITGIS_Layer)
ImportLayer public Imports layer from an existing pixel layer.
ImportLayer_2 public Imports layer from an existing pixel layer.
ImportLayer_3 public Imports layer from an existing pixel layer.
InitializeWrite public Performs any operation required to safely initialize write operation, such as batch operations for TGIS_FilePixelStore.
IsGrid public Checks if the layer type is grid.
(Inherited from ITGIS_Layer)
IsPixel public Checks if the layer type is pixel.
(Inherited from ITGIS_Layer)
IsSupported public Checks if the operation is supported by the layer.
(Inherited from ITGIS_Layer)
IsVector public Checks if the layer type is vector.
(Inherited from ITGIS_Layer)
IsVector3D public Checks if the layer type is vector 3D.
(Inherited from ITGIS_Layer)
IsVisible public Checks if the layer is visible in a defined extent and current params.
(Inherited from ITGIS_Layer)
Locate public If a given point is located in the image area, returns true and sets variables.
LocateEx public If a given point is located in the image area, returns true and sets variables.
Lock public Locks layer in burst-mode operation.
(Inherited from ITGIS_Layer)
LockEstimate public Estimates memory size for pixel layer to be update.
LockPixels public Locks a fragment of the pixel layer for updating.
LockPixels_2 public Locks a fragment of the pixel layer for updating.
LockPixels_3 public Locks a fragment of the pixel layer for updating.
LockPixels_4 public Locks a fragment of the pixel layer for updating.
LockPixels_5 public Locks a fragment of the pixel layer for updating.
LockPixels_6 public Locks a fragment of the pixel layer for updating.
LockPixels_7 public Locks a fragment of the pixel layer for updating.
Loop public Prepares enumerator to iterate the layer through the linear shape.
Loop_2 public Prepares enumerator to iterate the layer (pixels are treated as points).
Loop_3 public Prepares enumerator to iterate the layer.
Loop_4 public Prepares enumerator to iterate the layer (pixels are treated as points).
Loop_5 public Prepares enumerator to iterate the layer through the linear shape.
Loop_6 public Prepares enumerator to iterate the layer.
Loop_7 public Prepares enumerator to iterate the layer (pixels are treated as points).
Loop_8 public Prepares enumerator to iterate the layer (pixels are treated as points).
MapColorValue public Maps color value to pixel color.
MapGridValue public Maps grid value to pixel color.
MapToRaster public Converts map coordinates to raster pixel location.
MapToRasterRect public Converts map extent to raster rectangle.
MergeLayer public Merge layer to an existing layer.
Move public Moves a layer up or down in the viewer zorder list.
(Inherited from ITGIS_Layer)
MoveEx public Moves a layer up or down in the viewer zorder list (only visible layers).
(Inherited from ITGIS_Layer)
MustCalculateStatistics public Verifies if all statistics required to properly render the layer are available.
(Inherited from ITGIS_Layer)
MustReproject public Checks if the layer must be reprojected.
(Inherited from ITGIS_Layer)
MustSave public Checks if the layer was modified by editing.
(Inherited from ITGIS_Layer)
Open public Opens the layer.
(Inherited from ITGIS_Layer)
Paint public Draws the layer or fires PaintLayer event (if defined).
(Inherited from ITGIS_Layer)
PixelOperationEvent public Pixel operation event.
(Inherited from ITGIS_LayerPixelEvents)
Prepare public Opens the layer.
(Inherited from ITGIS_Layer)
PreRecognize public Checks if the layer can read the file.
(Inherited from ITGIS_Layer)
Project public Applies a projection on the single point.
(Inherited from ITGIS_Layer)
Project3D public Applies a projection on the single point in 3D.
(Inherited from ITGIS_Layer)
Project3D_Ref public Applies a projection on the single point in 3D.
(Inherited from ITGIS_Layer)
ProjectExtent public Applies a projection on the extent.
(Inherited from ITGIS_Layer)
Project_Ref public Applies a projection on the single point.
(Inherited from ITGIS_Layer)
PutGrid public Puts _grid array into layer at the place defined by _extent.
RaiseBusyEvent public Fires Busy event of the layer.
(Inherited from ITGIS_Layer)
RaiseBusyPrepare public Fires BusyPrepare method of the assigned viewer.
(Inherited from ITGIS_Layer)
RaiseBusyRelease public Fires BusyRelease method of the assigned viewer.
(Inherited from ITGIS_Layer)
RaiseBusyShake public Fires BusyShake method of the assigned viewer.
(Inherited from ITGIS_Layer)
RasterToMap public Converts raster pixel location to map coordinates
RasterToMapRect public Convert raster rectangle to map extent
ReadConfig public Reads the layer configuration files.
(Inherited from ITGIS_Layer)
ReadConfigParam public Reads the layer configuration parameters.
(Inherited from ITGIS_Layer)
ReadGridLine public Reads a specific line of the grid into the preallocated buffer.
RecalcExtent public Recalculates extent based on real shapes.
(Inherited from ITGIS_Layer)
RecalcProjectedExtent public Recalculates a projected extent.
(Inherited from ITGIS_Layer)
Recalculate public Recalculates layer MinZ and MaxZ values.
ReOpen public Reopens the layer.
(Inherited from ITGIS_Layer)
RereadConfig public Rereads the layer configuration files.
(Inherited from ITGIS_Layer)
RevertAll public Reverts layer to its original content.
(Inherited from ITGIS_Layer)
RootLayer public Returns the absolute parent layer.
(Inherited from ITGIS_Layer)
SaveAll public Saves layer and destroys mirrored items.
(Inherited from ITGIS_Layer)
SaveData public Saves layer and destroys mirrored items.
(Inherited from ITGIS_Layer)
ScaleGrid public Scales grid array using a linear filter by default.
ScaleGrid_2 public Scales grid array using defined filtering.
SetCSByEPSG public Sets up Coordinate System to a coordinate system provided by a EPSG code.
(Inherited from ITGIS_Layer)
SetCSByWKT public Sets up Coordinate System to a coordinate system provided by a WKT string (GEOGCS or PROJCS).
(Inherited from ITGIS_Layer)
SetCSByWKTFile public Sets up Coordinate System to a coordinate system provided by a file which contains a WKT string (GEOGCS or PROJCS).
(Inherited from ITGIS_Layer)
SetCurrentFileScale public Sets internal file scales - (1.0, 1.0) is always possible
SetWorld public Sets world parameters (equivalent to worldfile).
Unlock public Unlocks layer from burst-mode operation.
(Inherited from ITGIS_Layer)
UnlockPixels public UnLocks a fragment.
Unproject public Applies reverse projection (recovers from the projection) on the single point.
(Inherited from ITGIS_Layer)
Unproject3D public Applies reverse projection (recovers from the projection) on the singlepoint in 3D.
(Inherited from ITGIS_Layer)
Unproject3D_Ref public Applies reverse projection (recovers from the projection) on the single point in 3D.
(Inherited from ITGIS_Layer)
UnprojectExtent public Applies reverse projection (recovers from the projection) on the extent.
(Inherited from ITGIS_Layer)
Unproject_Ref public Applies reverse projection (recover from projection) on the single point.
(Inherited from ITGIS_Layer)
WriteConfig public Writes layer configuration files.
(Inherited from ITGIS_Layer)

Properties

Inherited Protected
Name Visibility Description
Active public Checks if the layer is active? Active means layer is visible and an object can be localized on the layer.
(Inherited from ITGIS_Layer)
Addition public Additional value.
(Inherited from ITGIS_Layer)
Age public Age of the layer (since its creation).
(Inherited from ITGIS_Layer)
Antialias public Antialias scaling (for some layers only like PNG and JPG).
AntialiasFilter public Scaling filter (like Linear, Lanczos) to be used for scaling images and grids.
BandsCount public Number of bands in a file.
Basemap public True if the layer must be interpreted as basemap (for background painting).
(Inherited from ITGIS_Layer)
BitHeight public Height of the layer in pixels.
BitWidth public Width of the layer in pixels.
CachedPaint public False if layer must be painted directly (bypassing cache).
(Inherited from ITGIS_Layer)
Capabilities public Pixel sub-format list that is available for write operation.
Caption public Caption of layer; if not filed directly then will be filed with Name when adding to the Viewer.
(Inherited from ITGIS_Layer)
CellHeight public Height of a cell in pixels.
CellWidth public Width of a cell in pixels.
CodePage public Code Page in which text has been stored.
(Inherited from ITGIS_Layer)
Collapsed public Checks if the layer is collapsed? Collapsed means only the layer's title will be visible inside the legend.
(Inherited from ITGIS_Layer)
Comments public Additional user comments.
(Inherited from ITGIS_Layer)
ConfigFile public Configuration file handle.
(Inherited from ITGIS_Layer)
ConfigName public Configuration file name.
(Inherited from ITGIS_Layer)
CS public Coordinate System that is assigned to the layer.
(Inherited from ITGIS_Layer)
CurrentPage public Current page of multipage file.
CustomData public List of custom, user-defined data.
(Inherited from ITGIS_Layer)
CuttingPolygon public Cutting polygon that defines an input image's valid area.
DefaultSubFormat public Default subformat information.
DirectMode public True if the layer is direct-mode (bypassing cache).
(Inherited from ITGIS_Layer)
DormantMode public Dormant mode for the layer.
(Inherited from ITGIS_Layer)
Driver public The layer's driver name.
(Inherited from ITGIS_Layer)
Extent public Extent of the layer.
(Inherited from ITGIS_Layer)
Extent3D public Three-dimensional extent of the layer.
(Inherited from ITGIS_Layer)
FileCopyrights public Copyright information about the layer.
(Inherited from ITGIS_Layer)
FileInfo public Additional textual information about the layer such as compression, number of pixels, copyright, etc.
(Inherited from ITGIS_Layer)
ForcedBandsDefinition public Forced interpretation of bands in a layer.
GridBand public Grid band number.
HideFromLegend public False if the layer should not be visible in legend.
(Inherited from ITGIS_Layer)
Interpretation public The way the layer is interpreted: the default is as a grid, or as an image.
IsExportable public True if the layer is exportable.
(Inherited from ITGIS_Layer)
IsGridImage public True if image is a grid.
IsLocked public True if the layer is in locked state.
(Inherited from ITGIS_Layer)
IsNativeGridImage public True if image is a native grid.
IsOpened public True if the layer is opened and is ready for operations.
(Inherited from ITGIS_Layer)
IsPersistent public True if the layer is persistent.
(Inherited from ITGIS_Layer)
IsReadOnly public True if the layer is read-only.
(Inherited from ITGIS_Layer)
IsTiled public True if layer is tiled.
IsTopmost public True if the layer can be interpreted as the topmost (trackable) layer.
(Inherited from ITGIS_Layer)
MaxHeight public Maximum elevation value of the grid.
MaxHeightThreshold public Maximum threshold of the grid elevation values to display.
MaxTileSize public Maximum allowed tile size for the layer.
(Inherited from ITGIS_Layer)
MinHeight public Minimum elevation value of the grid.
MinHeightThreshold public Minimum threshold of the grid elevation values to display.
MultiUserMode public Type of multiuser mode.
(Inherited from ITGIS_Layer)
Name public Name of layer; if not filled directly, then will be filled with Path when added to the viewer.
(Inherited from ITGIS_Layer)
NoDataValue public Grid NoData value.
PageCount public Number of pages in an image file.
Params public Returns parameters for pixel layer.
ParamsList public List of all parameter sections attached to the current layer.
(Inherited from ITGIS_Layer)
Params_ public Parameters (colors, fills, etc.) object.
(Inherited from ITGIS_Layer)
ParentLayer public Parent layer of a sub layer.
(Inherited from ITGIS_Layer)
Path public Path to file holding the layer's data.
(Inherited from ITGIS_Layer)
PathTAB public Path to a TAB referencing file.
PathWithDriver public Path to file with the layer's data extended with driver name.
(Inherited from ITGIS_Layer)
Progressive public If true (default), then layer can be drawn as progressive.
ProjectedExtent public Extent of the layer in projected units.
(Inherited from ITGIS_Layer)
Renderer public Handle to a renderer used for drawing shapes.
(Inherited from ITGIS_Layer)
Statistics public Layer statistics engine
(Inherited from ITGIS_Layer)
Stream public Reference to a potential layer underlying the stream.
(Inherited from ITGIS_Layer)
SubFormat public Current sub-format information.
SubLayers public List of sublayers belonging to the layer.
(Inherited from ITGIS_Layer)
SubType public Type of sublayer.
(Inherited from ITGIS_Layer)
Tag public Tag has no predefined meaning.
(Inherited from ITGIS_Layer)
TagInternal public TagInternal has no predefined meaning.
(Inherited from ITGIS_Layer)
TagPointer public TagPointer has no predefined meaning.
(Inherited from ITGIS_Layer)
Transform public Custom transformation.
(Inherited from ITGIS_Layer)
Transparency public Transparency value for the layer (0..100).
(Inherited from ITGIS_Layer)
UnSupportedOperations public Set of operations not supported by the layer.
(Inherited from ITGIS_Layer)
UseConfig public True if config file is active.
(Inherited from ITGIS_Layer)
UserObject public UserObject can be used to associate with the layer a user-defined object.
(Inherited from ITGIS_Layer)
Viewer public Reference to a viewer object.
(Inherited from ITGIS_Layer)
ZOrder public Layer's position relative to other layers.
(Inherited from ITGIS_Layer)
ZOrderEx public Layer position relative to other visible layers.
(Inherited from ITGIS_Layer)

Remarks

Pixel.Params operations

For specifying some more advanced pixel layer appearances, such as color mapping, transparent zones, etc., the property Pixel.Params should be used.

Color Map Zones

For properties, such as: RedMapZones, BlueMapZones, GreenMapZones, it is possible to create a section for different values zones:

lp.Params.Pixel.RedMapZones.Add("1, 100, 0, 127"); 
lp.Params.Pixel.RedMapZones.Add("200, 100, 127, 255"); 

The general format is:

"start_value,end_value,start_value_mapped,end_value_mapped"

Where:

  • start_value
    is the starting value of a zone expressed in native layer values (so for 16-bit layers it can be above 255);
  • end_value
    is a the end value of a zone expressed in native layer values (so for 16-bit layers can be above 255);
  • start_value_mapped
    is the starting value of a zone expressed as a RGB channel value (0..255);
  • end_value_mapped
    is the end value of a zone expressed as a RGB channel value (0..255).

Values between the start_value and end_value will be smoothly mapped to values between the start_value_mapped and end_value_mapped. start_value_mapped can be smaller then end_value_mapped to achieve inversion.

Accepted values are integer, like 37 or hexadecimal like $25.

FullRGB zones

FullRGB zones are used to map one color to another.

lp.Params.Pixel.RedMapZones.Add("$EFEFEF, $FFFFFF, $00FF00"); 
lp.Params.Pixel.RedMapZones.Add("$000000, $0F0F0F, $0000FF"); 

The general format is:

"start_color,end_color,mapped_color"

Where:

  • start_color
    is the starting color expressed as a RGB value;
  • end_color
    is the end color expressed as a RGB value;
  • mapped_color
    is the mapped color expressed as a RGB value.

If a color is between the start_color and end_color, then it will be mapped to a mapped_color.

The operation “between” is done per channel. So, construction between $102030 and $A0B0C0 means that any color with R:$10..$A0, G:$20..$B0 and B:$30..$C0 will be mapped. This can be used, for example, to match any color that is close to white to another color.

Accepted color values are RGB integer, like 255, hexadecimal like $0000FF, R:G:B like 0:0:255, or using names: AQUA, BLACK, BLUE, FUCHSIA, GRAY, GREEN, LIME, MAROON, NAVY, OLIVE, PURPLE, RED, SILVER, TEAL, WHITE and YELLOW.

If the last provided parameter is BGR, like $112233,$AABBCCF,BGR, then the color will be interpreted as BGR, not RGB.

Gray zones

Gray zones are used to map gray to color:

lp.Params.Pixel.GrayMapZones.Add("0, 127, $0000A0, $0000FF"); 
lp.Params.Pixel.GrayMapZones.Add("127, 255, $A00000, $FF0000FF"); 

The general format is:

"start_value, end_value, start_color, end_color"

Where:

  • start_value
    is the starting value of a gray-scale image (0..255);
  • end_value
    is a the end value of a gray-scale image (0..255);
  • start_color
    is the starting color expressed as a RGB value;
  • end_color
    is the end color expressed as a RGB value.

Values between the start_value and end_value will be smoothly mapped to values between the start_color and endcolor. start_value can be smaller then the end_value to achieve an inversion.

The operation “between” is done per channel. So construction between $102030 and $A0B0C0 means that any color with R:$10..$A0, G:$20..$B0 and B:$30..$C0 will be mapped.

Accepted color values are RGB integer like 255, hexadecimal like $0000FF, R:G:B like 0:0:255, or names: AQUA, BLACK, BLUE, FUCHSIA, GRAY, GREEN, LIME, MAROON, NAVY, OLIVE, PURPLE, RED, SILVER, TEAL, WHITE and YELLOW.

If the last provided parameter is BGR, like $112233, $AABBCCF, BGR, the color will be interpreted as BGR, not RGB.

Transparency zones

Transparency zones are used to define which color should be transparent:

lp.Params.Pixel.TransparentZones.Add("$EFEFEF, $FFFFFF"); 
lp.Params.Pixel.TransparentZones.Add("$000000, $0F0F0F"); 

The general format is:

"start_color, end_color"

Where:

  • start_color
    is the starting color expressed as a RGB value;
  • end_color
    is the end color expressed as a RGB value;

If color is between the start_color and end_color, it will be mapped as transparent.

This operation “between” is done per channel. So construction between $102030 and $A0B0C0 means that any color with R:$10..$A0, G:$20..$B0 and B:$30..$C0 will be mapped. This can be used, for example, to match any color that is close to white to transparent.

Accepted color values are RGB integer like 255, hexadecimal like $0000FF, R:G:B like 0:0:255, or names: AQUA, BLACK, BLUE, FUCHSIA, GRAY, GREEN, LIME, MAROON, NAVY, OLIVE, PURPLE, RED, SILVER, TEAL, WHITE and YELLOW.

If the last provided parameter is BGR, like $112233, $AABBCCF, BGR, then the color will be interpreted as BGR, not RGB.

Altitude zones

Altitude zones are used to apply grid layer coloring:

lp.Params.Pixel.AltitudeMapZones.Add("100.45, 800.12, $FF0000"); 
lp.Params.Pixel.AltitudeMapZones.Add("800.12, 900.45, $FFFF00"); 

The general format is:

"start_value, end_value, color"

Where:

  1. start_value
    is the starting value of the zone expressed in native layer values;
  2. end_value
    is the end value of the zone expressed in native layer values;
  3. color
    is the RGB value representing the zone color.

Accepted grid values are float values with dot decimal point, like “123.45”.

Accepted color values are RGB integer like 255, hexadecimal like $0000FF, R:G:B like 0:0:255, or names: AQUA, BLACK, BLUE, FUCHSIA, GRAY, GREEN, LIME, MAROON, NAVY, OLIVE, PURPLE, RED, SILVER, TEAL, WHITE and YELLOW.

If the last provided parameter is BGR, like $112233, $AABBCCF, BGR then the color will be interpreted as BGR, not RGB.

Order of operation

Image layers

  1. Selecting which channel will be used to form RGB.
  2. Mapping native layer values to 0..255 (RGB) zone with the use of RedMapZones, GreenMapZones, and BlueMapZones, if any of these exists.
  3. Mapping color-to-color, if FullRGMMapZones exits.
  4. Firing event for additional custom color mapping.
  5. Applying TransparentZoneMaps, if any exists.
  6. Making grayscale, if requested.
  7. Applying GreyScaleZones, if any exist.
  8. Applying histogram correction, if requested.
  9. Applying brightness, contrast, inverse, and RGB channel value modifications.

Grid Layers

  1. Selecting which channel will be used as the grid source.
  2. Applying AltitudeMapZones, if these exist; if not, perform simple mapping to a grayscale image.

All properties of Params.Pixel are available as: TGIS_ParamsPixel class.

References

2020/07/03 01:02