#include <tcl.h>
#include <tk.h>
#include <stdio.h>
#include <string.h>
#include <sadie.h>
#include "tclsadie.h"
#include "bresenham.h"
#include "tclSadie_ROI.h"
Go to the source code of this file.
Functions | |
int | Sadie_Plot_ProfileCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
Plot the profiles of image values between two specified image points. | |
int | Sadie_Plot_StatisticsCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
Compute summary statistics and value distribution historams for an image. | |
int | Sadie_Plot_CreateROICmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
Define a rectangular region of interest within an image. | |
int | Sadie_Plot_Init (Tcl_Interp *interp) |
Make the commands defined in this file accessible to the Tcl interpreter. |
The operations to display histograms and other pixel value statistics (and analyse regions of interest within images) are largely defined elsewhere (including callbacks that must be pre-registered with the SADIE library and utilities defined within tclSadie), but we define the high-level Tcl/Tk interfaces to these here.
Definition in file Sadie_Plot.c.
|
Define a rectangular region of interest within an image. Although the SADIE library does not support Regions of Interest (ROIs), an extension within tclSadie allows definition of multiple rectangular ROIs associated with particular images. Here we add a new ROI to an image using this extension (see the file tclSadie_ROI.c for more details). The array of Tcl object arguments is arranged in the following pattern:
Definition at line 288 of file Sadie_Plot.c. References CREATE_ROI(), GetSadieDkeyFromObj(), GetSadieImageFromObj(), GetSadieUintFromObj(), and nlev. Referenced by Sadie_Plot_Init(). |
|
Make the commands defined in this file accessible to the Tcl interpreter.
Definition at line 339 of file Sadie_Plot.c. References Sadie_Plot_CreateROICmd(), Sadie_Plot_ProfileCmd(), and Sadie_Plot_StatisticsCmd(). Referenced by Tcl_AppInit(). |
|
Plot the profiles of image values between two specified image points.
A callback that handles most of the Tcl/Tk drawing interface should already be registered with the SADIE library (see the
Definition at line 74 of file Sadie_Plot.c. References bresenham_from_s_coord(), bresenham_linep_t, bresenham_next(), demolish_bresenham(), and GetSadieImageFromObj(). Referenced by Sadie_Plot_Init(). |
|
Compute summary statistics and value distribution historams for an image.
The SADIE library function STATS computes a variety of statistics for the pixel values of an image, including the histograms of the value distributions in the first few bands (using the same Tcl/Tk-aware callback used indirectly by Sadie_Plot_ProfileCmd). However it requires provision of some temporary workspace for accumulating the statistics for each band, and we augment it here with the RANGE function for finding maxima and minima, and the COVAR function for the optional band covariance matrix. The range option code specifies how to handle the specified range of pixel values, as one of the constants
Definition at line 180 of file Sadie_Plot.c. References GetSadieImageFromObj(), gmax, and gmin. Referenced by Sadie_Plot_Init(). |