Contents

Overview
• Introduction
• Applications
• Platform/OS

Programmer's Corner
• geometry details
• stripe orientation
• path miter formula
• Components
• Linking
• Functions
    Setup Arguments
• Simple Flow: Single Thread
• header

Sample Applications
• gdsrip app
• gds2tiff w. GUI
• gds2tiff app
      mirror and rotate
      scale and invert
 
Notes
• Benchmark
• Effect of Rotation on Speed
• Stripe Direction and Width
 
Links
• Download Page
• Revision History
• FAQ Page
• Program Pricing
 
 

gds2tiff Application

We provide the application, gds2tiff, in order help the programmer better understand how to use the gdsriplib in a real life application. It is provided in both source and binary format.

gds2tiff includes:

    conversion of the raw bitmap to TIFF format along with packbit compression.

    support for more than one raster buffer.

Clearly, 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 may represent a significant portion.



The GDS2TIFF Command Line

gds2tiff input_file top_structure input_layer_set [options]

where

 input_file       the GDS file to be rasterized

 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


-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

  -dpm:DPM                             Dots per mm at which rasterisation must occur

  -pixelsize:P                         Rasterisation to occur at P um (micrometer) per dot

  -ram:BSIZE                           Allocate BSIZE 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

  -input_is_conditioned                To be used if input data is guaranteed to be convex in X

  -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 for the gds2tiff application.



  -h                                      Display usage

  -nbuff:NBUFFS                           Number of buffers to be used simultaneously for ripping 
                                          and formatting

  -keep                                   Generate tif files but donot 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: info@artwork.com