Artwork includes the application, gds2tiff, in order help the programmer better understand how to use the gdsrip library in a real application. It is provided in both source and binary format.
the gds2tiff application includes:
In a real world application just getting a band of data rasterized and sitting in memory is not the final objective. Something has to be done with that bitmap data - for example, it probably needs to be formatted into a form that a subsequent application can use; since we are dealing with very large bitmaps it also likely needs to be compressed before writing it to disk.
The formatting and compression thread will require additional memory and CPU cycles. Depending on how the code is written, this process may represent a small portion of the overall time or it may represent a significant portion.
The GDS2TIFF Command Line
gds2tiff_qwin.exe input_file top_structure input_layer_set [options]
gds2tiff_qwin.exe the full path and name of the executable. i.e. C:\wcad\gds2tiff\gds2wtiff_qwin.exe. Use quotation marks if a space is part of the directory. input_file the GDS file to be rasterized (use full path) top_structure either the name of the structure to process or use "=" to instruct the program to automatically select the top level structure. input_layer_set "=" for all layers or +layer_number[+layer_number] for selected layers i.e. +6+10 to process layers 6 and 10.
Command Line Options
there are two types of command line options: library specific options are passed directly to the gdsriplib library. Application specific options control this particular sample application and are not passed directly to the gdsriplib.
Library Specific Options
The options listed below control the gdsriplip. They are passed from the application directly to the library.
-extents:xlow,ylow,xhigh,yhigh Specify the window to be extracted default is the file extents -dpi:DPI Dots per inch at which rasterisation must occur or -dpm:DPM Dots per mm at which rasterisation must occur or -pixelsize:P Rasterize at P um (micron) per pixel -ram:BUFFSIZE Allocate BUFFSIZE MBytes for the raster buffer -only:i,j...N-1,N-m Process only bands i,j,N-1,N-m where 0i,j=N 0mN This option is generally used for debugging. -input_is_conditioned To be used if input data is guaranteed to be convex in X. It enables the rasterizer to eliminate some polygon checks and hence runs faster. -dbs:n Number of polygon/path vertices reserved for data buffer, used as a reference point to determine how to subdivide a band. 4000000 should be a good nominal value. -out:output_file_base_name Base name for the output .log and .tif files -memstats Enable logging of memory usage at different stages of program execution. Programmer's tool. -logcalls Log the calls made to the library along with the parameter values passed. Programmer's tool. -mirror:M[,m] Where M and m can take on the values of x and/or y mirroring is applied before any other transformation -scale:S[,s] Where S and s are scale factors in x and y respectively. (default S = s) Scaling is applied after mirroring, but before rotation. -rotate:R Where R is an integer multiplier taken modulo 4 applied to 90.0 degrees, e.g. R = 2 implies 180 degrees, while R = -1 implies -90 degree rotatation. Rotation is applied after mirroring and scaling operations. -degrees:D Where D is the rotation in degrees applied after mirroring and scaling if any D must be a multiple of 90.0 -complement Invert raster buffer before output, i.e. take complement of raster buffer which reverses the bitmap polarity. -invert Invert TIFF image by setting inverse flag in TIFF header. -geometry_only Include text and node info to determine data extents, not just geometries such as boundaries and paths. -vertical Each band runs vertically instead of horizontally. -bitmap_clip_dim:M,N Specify bitmap clipping dimensions. M is the number of pixels along X, N is the number of pixels along Y. -bitmap_clip_dim:M Specify bitmap clipping dimensions. If the -vertical option is present, M refers to the number of pixels along X (width) otherwise it refers to the number of pixels along Y (height). -top_edge_golden The raster image is anchored to the high quantized Y window value (default) -bottom_edge_golden The raster image is anchored to the low quantized Y window value -right_edge_golden The raster image is anchored to the high quantized X window value (default) -left_edge_golden The raster image is anchored to the low quantized X window value. -bmp The output data is a 8 bit Bitmap image +bmp The output data is a top to bottom 8 bit Bitmap image (image length is -ve)
Application Specific Options
These options are specific to the sample gds2tiff application.
-h Display usage -nbuff:NBUFFS Number of buffers to be used simultaneously for ripping and formatting. -keep Generate tif files but do not keep any -keep:i,j...N-1,N-m Keep only tif files corresponding to bands i,j,N-1,N-m for 0<i,j<=N 0<m<N -timeout:NSec Specify the maximum time to wait for a band -showinfo Provide extent and dryrun info -dryrun Only run program to get information regarding image size and number of bands +dryrun Get information about imagesize and number of bands first and then continue -verbose Print tiff file information in gds2tiff.log -controlfile:FileName Specify the file name that will be used to pause, abort, kill the program.
ARTWORK CONVERSION SOFTWARE, INC. Company Profile
417 Ingalls St., Santa Cruz, CA 95060 Tel (831) 426-6163 Fax 426-2824 email: firstname.lastname@example.org