CPlotView:PlotCursorCol
The PlotCursorCol method plots the pixel values in the column at the center of the image cursor on a displayed image. This plots the pixel value as a function of y-axis position measured in pixel coordinates.
CPlotView:PlotCursorCol( CImageView ) |
CImageView is a reference to the class object where the image is displayed.
This method works with an image displayed in a CImageView. It creates a graph of luminance value versus row number for one column passing through the center of the image cursor. The number of rows plotted (i.e., the plot length) is defined by the cursor height. If the cursor rectangle is used to define the center position in pixel coordinates, then the central row is calculated as y = (ymin + ymax) / 2. The cursor region can be set using the SetCursorRect method or the cursor can be positioned using SetCursorPos or SetCursorPosWcs.
Assume that a CImageView object named V exists. The following script plots column 150 over a length of 200 pixels (rows 300:499) for the current image of the image set:
|
-- set the averaging method to 1 (median) |
|
-- create a CRect object |
|
-- specify the region to plot |
|
-- assign the CRect to the cursor |
|
-- create a CPlotView object |
|
-- make the plot |
Alternatively, suppose an astronomical image is the current image and that it has an equatorial form of world coordinate calibration. The following script plots the image luminance at coordinate (5:20:13.54,-12:15:20.4), over 100 pixels long and aligned in the column (vertical) direction. Since this fragment plots 200 rows, the cursor's column extent is unimportant and we need only to set the number of rows (height):
|
-- set the first coordinate (right ascension) |
|
-- set the second coordinate (right ascension) |
|
-- position the image cursor |
|
-- set the cursor height, in pixels |
|
-- create a CPlotView |
|
-- plot the column at the center of the cursor |
CPlotView class, CImageView, SetCursorRect, SetCursorPosWcs, PlotCursorRow, Image Coordinate System, Subpixel Coordinate Definition
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.