ITT Rule IDL Version 7.0 Manual De Usuario
254
Chapter 10: Creating a File Writer
Overview of iTool File Writers
iTool Developer’s Guide
Overview of iTool File Writers
A file writer is an iTool component object class that defines how data stored in the
iTool data manager can be exported to a file. File writers have mechanisms for
manipulating data stored in iTool data objects into the proper format for a given file
type. Some examples of iTool file writers are:
iTool data manager can be exported to a file. File writers have mechanisms for
manipulating data stored in iTool data objects into the proper format for a given file
type. Some examples of iTool file writers are:
•
the ASCII file writer, which uses the IDL PRINTF procedure to write data to a
text file.
text file.
•
various image file writers, which allow the user to save data in JPEG, BMP,
PNG, and other well-defined image format files,
PNG, and other well-defined image format files,
•
a generic binary file writer, which uses the IDL WRITEU procedure to write
unformatted binary data to a file.
unformatted binary data to a file.
A number of standard file writers are predefined and included in the IDL iTools
package; if none of the predefined file writers suits your needs, you can create your
own file writer by subclassing either from the base IDLitWriter class on which all of
the predefined file writers are based, or from one of the predefined file writers.
package; if none of the predefined file writers suits your needs, you can create your
own file writer by subclassing either from the base IDLitWriter class on which all of
the predefined file writers are based, or from one of the predefined file writers.
The File Writer Creation Process
To create a new iTool file writer, you will do the following:
•
Choose an iTool file writer class on which your new operation will be based.
In almost all cases, you will base your new operation on the IDLitWriter class,
which handles registration of standard file properties and provides standard
messaging features.
In almost all cases, you will base your new operation on the IDLitWriter class,
which handles registration of standard file properties and provides standard
messaging features.
•
Provide methods that extract the image data from the data object and create a
file using IDL’s output routines (PRINT, WRITE, or one of the IDL WRITE_*
routines).
file using IDL’s output routines (PRINT, WRITE, or one of the IDL WRITE_*
routines).
describes the process of creating a new file writer based on the
IDLitWriter class.