CATIMAGE__DEFINE Name
CatImage Purpose
This object implements a class for handling image data. It is a subclassed
CATDATAATOM object and can be subclassed for specific image implementations.
Out first attempts to define an image object class resulted in the three
object classes CatImageData, CatImage2D, and CatTrueColorImage. These are
still used in Catalyst applications, but are included more for historical
reasons than for practical reasons. These days all image object implementations
start with CatImage (or, more likely, with ScaleImage, which is subclassed from
CatImage). It is our recommendation that you start your own object implementation
from this CatImage object.
Authors
FANNING SOFTWARE CONSULTING BURRIDGE COMPUTING
1645 Sheely Drive 18 The Green South
Fort Collins Warborough, Oxon
CO 80526 USA OX10 7DN, ENGLAND
Phone: 970-221-0438 Phone: +44 (0)1865 858279
E-mail: davidf@dfanning.com E-mail: davidb@burridgecomputing.co.uk
Superclasses
CATDATAATOM
CATATOM
CATCONTAINER
IDL_CONTAINER Syntax
imageObject = OBJ_NEW ('CatImage', image)
CLASS DEFINITION:
class = { CatImage, $ ; The CatImage object class.
_displayImage: Ptr_New(), $ ; The byte-scaled, congridded image for display.
_display_mode: 0B, $ ; A flag indicating which display method to use for drawing.
_keep_aspect: 0L, $ ; Flag: Keep the aspect ratio when calculating image position.
_location : DblArr(6,2), $ ; Location information about the "displayed" image.
_interleaving : 0L, $ ; The type of pixel interleaving for this image.
_interpolate: 0L, $ ; Flag: When set, bilinear interpolation is used.
_order : 0L, $ ; Image display order.
_out_xsize : 0L, $ ; The output X size of the image. (Display_Mode=1 and Display_Mode=2)
_out_ysize : 0L, $ ; The output Y size of the image. (Display_Mode=1 and Display_Mode=2)
_position : DblArr(4), $ ; The position of the image in the output window. (Display_Mode=0)
_scale : 0.0, $ ; The zoom scale factor.
_x1 : 0L, $ ; The starting X coordinate in the zoom.
_x2 : 0L, $ ; The ending X coordinate in the zoom.
_y1 : 0L, $ ; The starting Y coordinate in the zoom.
_y2 : 0L, $ ; The ending Y coordinate in the zoom.
_xsize : 0L, $ ; The X size of the image.
_xstart : 0L, $ ; The starting X location for displaying image. (Display_Mode=1)
_ysize : 0L, $ ; The Y size of the image.
_ystart : 0L, $ ; The starting Y location for displaying image. (Display_Mode=1)
_wid : Obj_New(), $ ; The window object where this image should be displayed.
_window_position: 0L, $ ; The window position for displaying this image. (Display_Mode=2)
_zoomcoords : Obj_New(), $ ; A coordinate object for the zoom capability.
INHERITS CatDataAtom $ ; Subclassed from CATDATAATOM.
}
Modification History
Written by: David W. Fanning, 27 March 2003.
Added PAN, ZOOMIN, and ZOOMOUT methods 25 June 2004. DWF.
Removed MINUS_ONE keywords from the CONGRIDs in CreateDisplayImage.
They caused me to get, for example, 15 colors instead of 16 when I
restricted the number of colors in the image. 5 July 2005. DWF.
Fixed a bug in Pixel_To_Value method that caused value to be slightly off.
This was most noticable with really small images. 10 Oct 2008. DWF.
In Draw_Mode_0 (i.e., the mode similar to cgImage), this object will now draw
map outlines and map grids if the coordinate object is a MAPCOORD object, and
it has been loaded with with MAP_OUTLINE or MAP_GRID objects. 4 January 2009.
Removed some testing code in SetProperty that asked to update IMGAXES objects. 31 July 2009. DWF.
Modified the CreateDisplayImage to allow image display in PostScript. 7 November 2009. DWF.
Refactored CreateDisplayImage to two new methods: CheckMultiPlotPosition and CheckKeepAspectRatio.
7 November 2009. DWF.
Modified the Pixel_To_Value function to allow for true-color images with four channels. 12 Jan 2012. DWF.