#include <tcl.h>
#include <tk.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <sadie.h>
#include "tclsadie.h"
Go to the source code of this file.
Functions | |
int | Sadie_FileIO_OpenCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
Read a SADIE-formatted file into a newly allocated image. | |
int | Sadie_FileIO_OpenTIFFCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
An interface to the TIFF2IMG function in the SADIE library (disabled). | |
int | Sadie_FileIO_OpenPNMCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
An interface to the PNM2IMG function in the SADIE library (disabled). | |
int | Sadie_FileIO_ImportCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
Import data from an arbitrarily defined image file into a SADIE image. | |
int | Sadie_FileIO_SaveCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
Write a SADIE (version 1) formatted image file. | |
int | Sadie_FileIO_SaveEPSCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
Write an Encapsulated PostScript formatted image file. | |
int | Sadie_FileIO_SaveTIFFCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
Write a TIFF formatted image file. | |
int | Sadie_FileIO_SavePNMCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
An interface to the IMG2PNM function in the SADIE library (disabled). | |
int | Sadie_FileIO_SaveTEXTCmd (ClientData client_data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
Dump pixel values to a text file. | |
int | Sadie_FileIO_Init (Tcl_Interp *interp) |
Make the commands defined in this file accessible to the Tcl interpreter. |
Please note that tclSadie also uses an add-on package for Tk called Img. Some of the operations that are disabled here may nevertheless work in tclSadie if it uses Img instead; for more information see http://sourceforge.net/projects/tkimg/ for downloads and the latest versions, but these days it should really be a standard additional option in whatever Tcl/Tk distribution you are using.
Definition in file Sadie_FileIO.c.
|
Import data from an arbitrarily defined image file into a SADIE image. This is a generic image file reader that should handle most formats using uncompressed regular arrays of pixels. The SADIE library function IMPORT allocates a new image to hold the imported data as well as reading from the file. We set the Tcl interpreter result to an ID string representing the new image. The lengthy array of Tcl object arguments have the following meanings:
Definition at line 152 of file Sadie_FileIO.c. References GetSadieUint64FromObj(), GetSadieUintFromObj(), and SetSadieNamedImageResult(). Referenced by Sadie_FileIO_Init(). |
|
Make the commands defined in this file accessible to the Tcl interpreter.
Definition at line 397 of file Sadie_FileIO.c. References Sadie_FileIO_ImportCmd(), Sadie_FileIO_OpenCmd(), Sadie_FileIO_OpenPNMCmd(), Sadie_FileIO_OpenTIFFCmd(), Sadie_FileIO_SaveCmd(), Sadie_FileIO_SaveEPSCmd(), Sadie_FileIO_SavePNMCmd(), Sadie_FileIO_SaveTEXTCmd(), and Sadie_FileIO_SaveTIFFCmd(). Referenced by Tcl_AppInit(). |
|
Read a SADIE-formatted file into a newly allocated image. The SADIE library function DISK2IMG should read files in either the SADIE version 0 or version 1 format, and will allocate space for the image. We set the Tcl interpreter result to an ID string representing the new image. The Tcl object array always contains the following elements:
Definition at line 61 of file Sadie_FileIO.c. References GetSadieUint64FromObj(), and SetSadieNamedImageResult(). Referenced by Sadie_FileIO_Init(). |
|
An interface to the PNM2IMG function in the SADIE library (disabled). This should read PNM files into SADIE images, but is currently disabled. Definition at line 103 of file Sadie_FileIO.c. References SetSadieNamedImageResult(). Referenced by Sadie_FileIO_Init(). |
|
An interface to the TIFF2IMG function in the SADIE library (disabled). This should read TIFF files into SADIE images, but is currently disabled. Definition at line 84 of file Sadie_FileIO.c. References SetSadieNamedImageResult(). Referenced by Sadie_FileIO_Init(). |
|
Write a SADIE (version 1) formatted image file. Given a image ID string and the specified number of bits per pixel, we use the SADIE library function IMG2DISK to write a SADIE v. 1 formatted image to the specified file (version 1 is the post-2003 SADIE file format; the original format is version 0, and isn't handled here). The Tcl object arguments are in an array with the following layout:
Definition at line 244 of file Sadie_FileIO.c. References GetSadieImageFromObj(), and GetSadieUintFromObj(). Referenced by Sadie_FileIO_Init(). |
|
Write an Encapsulated PostScript formatted image file. Given a image ID string and the specified number of bits per pixel, we use the SADIE library function IMG2EPSF to write an EPS formatted image to the specified file. The Tcl object arguments are in an array with the following layout:
Definition at line 281 of file Sadie_FileIO.c. References GetSadieImageFromObj(), and GetSadieUintFromObj(). Referenced by Sadie_FileIO_Init(). |
|
An interface to the IMG2PNM function in the SADIE library (disabled). This should write PNM files from SADIE images, but is currently disabled. Definition at line 341 of file Sadie_FileIO.c. References GetSadieImageFromObj(). Referenced by Sadie_FileIO_Init(). |
|
Dump pixel values to a text file. Given a image ID string, we use the SADIE library function IMG2TEXT to dump the formatted numeric values of the image pixels to the specified file. The Tcl objects passed through the array argument have the following meanings:
Definition at line 374 of file Sadie_FileIO.c. References GetSadieImageFromObj(). Referenced by Sadie_FileIO_Init(). |
|
Write a TIFF formatted image file. Given a image ID string and the specified number of bits per pixel, we use the SADIE library function IMG2TIFF to write a TIFF formatted image to the specified file. This is probably better handled by the Img add-on package for Tk. The Tcl object argument array is arranged as follows:
Definition at line 318 of file Sadie_FileIO.c. References GetSadieImageFromObj(), and GetSadieUintFromObj(). Referenced by Sadie_FileIO_Init(). |