#include <tcl.h>
#include <tk.h>
#include <sadie.h>
#include "tclsadie.h"
Go to the source code of this file.
Functions | |
Tcl_Obj * | NewSadieImageObj (IMAGE *img) |
Create a Tcl object representation from a SADIE image. | |
int | GetSadieImageFromObj (Tcl_Obj *objPtr, IMAGE **imagehandle) |
Recover a pointer to a SADIE image from a Tcl object. | |
int | SetSadieNamedImageResult (Tcl_Interp *interp, IMAGE *imagePtr, Tcl_Obj *nameobjPtr) |
Reset a SADIE image name, then return its ID as the Tcl interpreter result. | |
int | GetSadieImageFromObj2 (Tcl_Interp *interp, Tcl_Obj *arrayobjPtr, const char *ixname, IMAGE **imagehandle) |
Recover a pointer to a SADIE image from a Tcl array element. | |
Tcl_Obj * | NewSadieImageObj2 (Tcl_Interp *interp, Tcl_Obj *arrayobjPtr, const char *ixname, IMAGE *imagePtr) |
Make a Tcl object representing a SADIE image ID, resetting the image name. | |
int | SetSadieImageObj2 (Tcl_Interp *interp, Tcl_Obj *arrayobjPtr, const char *ixname, IMAGE *imagePtr) |
Set the Tcl interpreter result to the ID of a renamed SADIE image. | |
int | SetSadieComponentObj2 (Tcl_Interp *interp, Tcl_Obj *arrayobjPtr, const char **ixname, IMAGE **comp_image) |
Set the Tcl interpreter result to a list representing a SADIE image pair. | |
int | GetSadiePixelFromObj2 (Tcl_Interp *interp, Tcl_Obj *arrayobjPtr, const char *ixname, PIXEL *pixelPtr) |
Recover a PIXEL value from a Tcl array element. | |
int | GetSadieUintFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, uint32_t *uintPtr) |
Recover a 32-bit unsigned integer value from a Tcl object. | |
int | GetSadieUint64FromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, uint64_t *uintPtr) |
Recover a 64-bit unsigned integer value from a Tcl object. | |
int | GetSadieUintFromObj2 (Tcl_Interp *interp, Tcl_Obj *arrayobjPtr, const char *ixname, uint32_t *uintPtr) |
Recover a 32-bit unsigned integer value from a Tcl array element. | |
int | GetSadieIntFromObj2 (Tcl_Interp *interp, Tcl_Obj *arrayobjPtr, const char *ixname, int *intPtr) |
Recover an integer value from a Tcl array element. | |
int | GetSadieDoubleFromObj2 (Tcl_Interp *interp, Tcl_Obj *arrayobjPtr, const char *ixname, double *doublePtr) |
Recover a double value from a Tcl array element. | |
int | GetSadieBooleanFromObj2 (Tcl_Interp *interp, Tcl_Obj *arrayobjPtr, const char *ixname, int *boolPtr) |
Recover an Boolean value from a Tcl array element. | |
int | GetSadieDkeyFromObj (Tcl_Obj *objPtr, const char **dkeyhandle) |
Obtain a hashable string from a Tcl object representing a SADIE image ID. | |
int | GetSadieDkeyFromObj2 (Tcl_Interp *interp, Tcl_Obj *arrayobjPtr, const char *ixname, const char **dkeyhandle) |
Obtain a hashable string value from a Tcl array element. |
The Tcl parts of tclSadie make extensive use of Tcl array elements for data storage (even in some cases where Tcl lists would be more appropriate); the functions with names beginning GetSadie recover tclSadie data from Tcl array elements (specified by an array name and index). In the opposite direction, the Tcl interpreter needs access to SADIE-specific objects, so the SetSadie functions return these through the Tcl interpreter result. The SADIE image IDs manipulated by tclSadie are currently identical to the string representations of their addresses, but anything that relies on this implementation is deprecated, since future versions will use arbitrary strings (the current implementation cannot handle persistent or cross-platform image IDs).
Definition in file tclSadie_getset.c.
|
Recover an Boolean value from a Tcl array element.
Tcl Boolean values are a little more versatile than just the integer constants 0 and 1. Objects whose string representation is
Definition at line 617 of file tclSadie_getset.c. Referenced by Sadie_Classify_MaxLikeCmd(), Sadie_Classify_MinDistCmd(), and Sadie_Filter_ImageConvCmd(). |
|
Obtain a hashable string from a Tcl object representing a SADIE image ID. The string representation of the image ID object is already a reasonable hash key. Note however that we do not copy it here, and it should generally be copied for subsequent use, lest the Tcl object be nodified or freed.
Definition at line 664 of file tclSadie_getset.c. Referenced by GetSadieDkeyFromObj2(), Sadie_General_IndexImageCmd(), and Sadie_Plot_CreateROICmd(). |
|
Obtain a hashable string value from a Tcl array element. The standard Tcl library function Tcl_ObjGetVar2 finds the string value through a pair of Tcl objects: an array name (provided as an existing Tcl object) and an index (newly created from the specified C string), then GetSadieDkeyFromObj recovers the string pointer, which we deposit in dkeyhandle, or set this NULL if an error arises.
Definition at line 699 of file tclSadie_getset.c. References GetSadieDkeyFromObj(). Referenced by Sadie_Classify_LvlSliceCmd(), Sadie_Classify_MaxLikeCmd(), and Sadie_Classify_MinDistCmd(). |
|
Recover a double value from a Tcl array element. We use Tcl_ObjGetVar2 to find the double value through a pair of Tcl objects: an array name (provided as an existing Tcl object) and an index (newly created from a C string argument). If possible, we deposit the value in the location specified by doublePtr, but otherwise set this to zero.
Definition at line 561 of file tclSadie_getset.c. Referenced by Sadie_Classify_MaxLikeCmd(), Sadie_Classify_SegmentCmd(), Sadie_Contrast_LinearStretchCmd(), Sadie_Contrast_NormStretchCmd(), Sadie_Filter_FFTFiltCmd(), Sadie_Filter_MajFiltCmd(), Sadie_Filter_MaskConvCmd(), Sadie_Filter_MaskGradCmd(), Sadie_Multi_CombineCmd(), Sadie_NewFunctions_ChirpCmd(), Sadie_NewFunctions_FunctionCmd(), Sadie_NewFunctions_RandomCmd(), Sadie_NewFunctions_SineStarCmd(), Sadie_NewFunctions_SineWaveCmd(), Sadie_Tools_ContMapCmd(), and Sadie_Tools_ReliefCmd(). |
|
Recover a pointer to a SADIE image from a Tcl object. If possible, we deposit a pointer to a SADIE image in the specified location, but otherwise set it to NULL. Note that the string representation we use here may change in future.
Definition at line 73 of file tclSadie_getset.c. Referenced by Sadie_FileIO_SaveCmd(), Sadie_FileIO_SaveEPSCmd(), Sadie_FileIO_SavePNMCmd(), Sadie_FileIO_SaveTEXTCmd(), Sadie_FileIO_SaveTIFFCmd(), Sadie_General_GetNumBandsCmd(), Sadie_General_GetPixelCmd(), Sadie_General_GmaxCmd(), Sadie_General_GminCmd(), Sadie_General_HeightCmd(), Sadie_General_IndexImageCmd(), Sadie_General_SetNameCmd(), Sadie_General_WidthCmd(), Sadie_Plot_CreateROICmd(), Sadie_Plot_ProfileCmd(), and Sadie_Plot_StatisticsCmd(). |
|
|
Recover an integer value from a Tcl array element. We use Tcl_ObjGetVar2 to find the integer value through a pair of Tcl objects: an array name (provided as an existing Tcl object) and an index (newly created from a C string argument). If possible, we deposit the value in the location specified by intPtr, but otherwise set this to zero.
Definition at line 511 of file tclSadie_getset.c. Referenced by Sadie_Classify_ClusterCmd(), Sadie_Classify_LvlSliceCmd(), Sadie_Classify_MaxLikeCmd(), Sadie_Classify_MinDistCmd(), Sadie_Classify_SegmentCmd(), Sadie_Contrast_LinearStretchCmd(), Sadie_Filter_FFTCmd(), Sadie_Filter_FFTConvCmd(), Sadie_Filter_FFTFiltCmd(), Sadie_Filter_FHTCmd(), Sadie_Filter_LibGradCmd(), Sadie_Filter_PSpectCmd(), Sadie_Multi_CombineCmd(), Sadie_Multi_Comp2RealCmd(), Sadie_Multi_CompareCmd(), Sadie_Multi_Real2CompCmd(), Sadie_Multi_RotateCubeCmd(), Sadie_NewFunctions_FunctionCmd(), Sadie_NewFunctions_RandomCmd(), Sadie_Tools_ContMapCmd(), and Sadie_Tools_DestripeCmd(). |
|
Recover a PIXEL value from a Tcl array element. A straightforward application of Tcl_ObjGetVar2 finds the PIXEL value through a pair of Tcl objects: an array name (provided as an existing Tcl object) and an index (newly created from the specified C string). If possible, we deposit the value in the specified location, but otherwise set it to zero.
Definition at line 345 of file tclSadie_getset.c. Referenced by Sadie_Classify_ClusterCmd(), Sadie_Classify_LvlSliceCmd(), Sadie_Classify_SegmentCmd(), Sadie_Contrast_NormStretchCmd(), Sadie_Contrast_PWLStretchCmd(), Sadie_Contrast_QntStretchCmd(), Sadie_Contrast_SatStretchCmd(), Sadie_Contrast_TblStretchCmd(), Sadie_Contrast_ThreshStretchCmd(), Sadie_Filter_CAvgFiltCmd(), and Sadie_NewFunctions_GrayScaleCmd(). |
|
Recover a 64-bit unsigned integer value from a Tcl object. Newer versions of Tcl support 64-bit values through the Tcl_WideInt type, but we fall back to using longs if this isn't available, and in ether case set the value to zero on errors.
Definition at line 420 of file tclSadie_getset.c. Referenced by Sadie_FileIO_ImportCmd(), and Sadie_FileIO_OpenCmd(). |
|
Recover a 32-bit unsigned integer value from a Tcl object. We rely on the Tcl object's long value being large enough to encode an unsigned 32-bit value, which we deposit in the specified location if possible, but otherwise set it to zero.
Definition at line 395 of file tclSadie_getset.c. Referenced by Sadie_FileIO_ImportCmd(), Sadie_FileIO_SaveCmd(), Sadie_FileIO_SaveEPSCmd(), Sadie_FileIO_SaveTIFFCmd(), Sadie_General_GetPixelCmd(), and Sadie_Plot_CreateROICmd(). |
|
Recover a 32-bit unsigned integer value from a Tcl array element. A straightforward application of Tcl_ObjGetVar2 finds a 32-bit unsigned integer value through a pair of Tcl objects: an array name (provided as an existing Tcl object) and an index (newly created from the specified C string). If possible, we deposit the value in the specified location, but otherwise set it to zero.
Definition at line 458 of file tclSadie_getset.c. Referenced by Sadie_Contrast_AdaptStretchCmd(), Sadie_Contrast_HisteqStretchCmd(), Sadie_Contrast_NormStretchCmd(), Sadie_Contrast_QntStretchCmd(), Sadie_Contrast_RefStretchCmd(), Sadie_Filter_CAvgFiltCmd(), Sadie_Filter_MajFiltCmd(), Sadie_Filter_MaskConvCmd(), Sadie_Filter_MedFiltCmd(), Sadie_Multi_PCSCmd(), Sadie_Multi_PCTCmd(), Sadie_NewFunctions_CheckerboardCmd(), Sadie_NewFunctions_ChirpCmd(), Sadie_NewFunctions_FunctionCmd(), Sadie_NewFunctions_GrayScaleCmd(), Sadie_NewFunctions_RandomCmd(), Sadie_NewFunctions_SineStarCmd(), Sadie_NewFunctions_SineWaveCmd(), Sadie_Tools_ScatterCmd(), and tclsadie_plotter(). |
|
Create a Tcl object representation from a SADIE image. Note that the object has a zero reference count, and the particular string representation may change in future.
Definition at line 53 of file tclSadie_getset.c. Referenced by SetSadieNamedImageResult(). |
|
Make a Tcl object representing a SADIE image ID, resetting the image name. We create a new Tcl object (with a zero reference count) to represent the ID of a SADIE image, resetting the image name to a string taken from a Tcl array element.
Definition at line 192 of file tclSadie_getset.c. Referenced by Sadie_Multi_BIL2BSQCmd(), and SetSadieComponentObj2(). |
|
Set the Tcl interpreter result to a list representing a SADIE image pair. We create new Tcl objects representing the IDs of two SADIE images, renaming these to strings taken from two Tcl array elements (specified by a Tcl object giving the array name, and a pair of index strings). The list as a whole has a reference count of zero, but the image ID objects end up with reference counts of one (they have their counts incremented before inserting them in the list, so just after insertion they are briefly two, and must be decremented).
Definition at line 301 of file tclSadie_getset.c. References NewSadieImageObj2(). Referenced by Sadie_Filter_ImageGradCmd(), Sadie_Filter_LibGradCmd(), Sadie_Filter_MaskGradCmd(), and Sadie_Multi_Comp2RealCmd(). |
|
Set the Tcl interpreter result to the ID of a renamed SADIE image. We create a new Tcl object (with a zero reference count) to represent the ID of a SADIE image, resetting the image name to a string taken from a Tcl array element, and return the image ID object through the Tcl interpreter result. Note that the string representation of the image ID may change in future.
Definition at line 246 of file tclSadie_getset.c. Referenced by Sadie_Classify_ClusterCmd(), Sadie_Classify_LvlSliceCmd(), Sadie_Classify_MaxLikeCmd(), Sadie_Classify_MinDistCmd(), Sadie_Classify_SegmentCmd(), Sadie_Classify_SigMapCmd(), Sadie_Contrast_AdaptStretchCmd(), Sadie_Contrast_HisteqStretchCmd(), Sadie_Contrast_LinearStretchCmd(), Sadie_Contrast_LogStretchCmd(), Sadie_Contrast_NormStretchCmd(), Sadie_Contrast_PWLStretchCmd(), Sadie_Contrast_QntStretchCmd(), Sadie_Contrast_RefStretchCmd(), Sadie_Contrast_RootStretchCmd(), Sadie_Contrast_SatStretchCmd(), Sadie_Contrast_SqrStretchCmd(), Sadie_Contrast_TblStretchCmd(), Sadie_Contrast_ThreshStretchCmd(), Sadie_Filter_CAvgFiltCmd(), Sadie_Filter_FFTCmd(), Sadie_Filter_FFTConvCmd(), Sadie_Filter_FFTFiltCmd(), Sadie_Filter_FHTCmd(), Sadie_Filter_ImageConvCmd(), Sadie_Filter_MajFiltCmd(), Sadie_Filter_MaskConvCmd(), Sadie_Filter_MedFiltCmd(), Sadie_Filter_PSpectCmd(), Sadie_Multi_BSQ2BILCmd(), Sadie_Multi_CombineCmd(), Sadie_Multi_CompareCmd(), Sadie_Multi_HSV2RGBCmd(), Sadie_Multi_PCSCmd(), Sadie_Multi_PCTCmd(), Sadie_Multi_Real2CompCmd(), Sadie_Multi_RGB2HSVCmd(), Sadie_Multi_RotateCubeCmd(), Sadie_NewFunctions_CheckerboardCmd(), Sadie_NewFunctions_ChirpCmd(), Sadie_NewFunctions_FunctionCmd(), Sadie_NewFunctions_GrayScaleCmd(), Sadie_NewFunctions_RandomCmd(), Sadie_NewFunctions_SineStarCmd(), Sadie_NewFunctions_SineWaveCmd(), Sadie_Tools_ContMapCmd(), Sadie_Tools_DestripeCmd(), Sadie_Tools_ReliefCmd(), and Sadie_Tools_ScatterCmd(). |
|
Reset a SADIE image name, then return its ID as the Tcl interpreter result. We create a new Tcl object representing the ID of a SADIE image, set the name of this image to a string extracted from another Tcl object, and make the image ID object the current interpreter result.
Definition at line 102 of file tclSadie_getset.c. References NewSadieImageObj(). Referenced by Sadie_FileIO_ImportCmd(), Sadie_FileIO_OpenCmd(), Sadie_FileIO_OpenPNMCmd(), and Sadie_FileIO_OpenTIFFCmd(). |