# QisMRip

Command-line program to generate high-res monochrome bitmaps from a set of large windows by utilizing multiple threads towards rasterizing each image

## Command-line reference

qismrip   +input:{input_file_path}   +outdir:{output_dir}   {Window Spec.}   -format:{format}   [{File Settings}]   [{Image Settings}]   [{Misc. Options}]

### Required

#### +input:{input-gdsii-file}

• Specify a valid GDSII file to extract clips from

#### +outdir:{output_dir}

• Specify the path of a directory where the output file will be created
• The output directory MUST exist prior to executing clipextract

#### -format:NONE | -format:TIFF | -format:RAW | -format:BMP | -format:VBMP

• Specify output format
• NONE : Only generate raster image in buffer, no output to disk
• TIFF : Write image as a TIFF file with packbits compression
• RAW : Extract a raster image for each window and write them to disk as Artwork's RAW format
• BMP : Extract a raster image for each window and write them to disk as monochrome BMP images (uncompressed) (top-down via the biHeight paramter of the BITMAPINFOHEADER)
• VBMP : Extract a raster image for each window and write them to disk as monochrome BMP images (uncompressed) (bottom-up via the biHeight paramter of the BITMAPINFOHEADER)

### Window Spec.

• Specify at least ONE of the following

#### -window:LLUR:{filename}:{lx},{ly},{ux},{uy}

• Specify a window using it's lower left and upper right co-ordinates (in file units)
• The filename is used to identify the window and the file generated thereof
• Final output path = {output_dir} + {filename} + {extension}

#### -window:LLWH:{filename}:{lx},{ly},{width},{height}

• Specify a window using it's lower left co-ordinates, width and height (in file units)
• The filename is used to identify the window and the file generated thereof
• Final output path = {output_dir} + {filename} + {extension}

#### -window:CWH:{filename}:{cx},{cy},{width},{height}

• Specify a window using it's center co-ordinates, width and height (in file units)
• The filename is used to identify the window and the file generated thereof
• Final output path = {output_dir} + {filename} + {extension}

#### @window:LLUR:{filename}:{window_list_file}

• Read a set of windows from a text file located at {window_list_file}
• Each line in that file specifies a single window as {lx},{ly},{ux},{uy} (in file units)
• Lines beginning with a # are treated as comments
• The filename is used to identify the windows and the files generated thereof
• Final output path = {output_dir} + {filename} + {line_num} + {extension}

#### @window:LLWH:{filename}:{window_list_file}

• Read a set of windows from a text file located at {window_list_file}
• The first line specifies the {width},{height} (in file units) to be used for all windows
• Each subsequent line in that file specifies the lower left co-ordinate (in file units) where a single window is to be placed
• Lines beginning with a # are treated as comments
• The filename is used to identify the windows and the files generated thereof
• Final output path = {output_dir} + {filename} + {line_num} + {extension}

#### @window:CWH:{filename}:{window_list_file}

• Read a set of windows from a text file located at {window_list_file}
• The first line specifies the {width},{height} (in file units) to be used for all windows
• Each subsequent line in that file specifies the co-ordinates a point (in file units) where the center of a window is to be placed
• Lines beginning with a # are treated as comments
• The filename is used to identify the windows and the files generated thereof
• Final output path = {output_dir} + {filename} + {line_num} + {extension}

#### -tile:RXY:{filename}:{roi-lx},{roi-ly},{roi-ux},{roi-uy}:{nx},{ny}[:{i},{j}]*

• Generate {nx} x {ny} same sized tiles from a region defined by it's lower left and upper right co-ordinates (in file units)
• Optionally, if a set of {i},{j} tile positions (1 <= i <= nx and 1 <= j <= ny)are specified, only those tiles will be extracted. Otherwise, all tiles will be extracted
• The filename is used to identify the windows and the files generated thereof
• Final output path = {output_dir} + {filename} + {i}.{j} + {extension}

#### -tile:RWH:{filename}:{roi-lx},{roi-ly},{roi-ux},{roi-uy}:{width},{height}[:{i},{j}]*

• Generate {width} x {height} same sized tiles from a region defined by it's lower left and upper right co-ordinates (in file units)
• Optionally, if a set of {i},{j} tile positions (1 <= i <= Num. tiles in X and 1 <= j <= Num. tiles in Y)are specified, only those tiles will be extracted. Otherwise, all tiles will be extracted
• The filename is used to identify the windows and the files generated thereof
• Final output path = {output_dir} + {filename} + {i}.{j} + {extension}

#### -tile:CWH:{filename}:{width},{height}:{cx},{cy}[:{cx},{cy}]*

• Generate {width} x {height} sized tiles centered at one or more co-ordinates
• The filename is used to identify the windows and the files generated thereof
• Final output path = {output_dir} + {filename} + {COUNTER} + {extension}

### File-Options

#### -layers:{layers}

• Specify a comma-separated list of layer and/or layer:datatype to be loaded prior to extraction
• e.g -layers:1,2:2,3,4:4,4:5
• If the datatype is omitted, all the datatypes for the corresponding layer will be loaded
• Any layer:datatype that does not match this specification will be filtered out
• By default, all the layers in the file are loaded

#### -cell:{cell}

• Specify the name of the cell to be used as the view cell from which clips will be extracted
• By default, the deepest top cell is used as the view cell

#### -loadfromdisk

• Throughout the execution of clipextract, access data from the file on disk
• This reduces the overall memory footprint of the program at the cost of slower operation
• By default, the file is loaded into memory at start and all the access is memory based in order to get the fastest performance

### Image Settings

#### -pixelsize:{size_x}[,{size_y}] | -dpi:{dpi_x}[,{dpi_y}]

• Specify resolution either in size-of-pixel (in file units) or dots-per-inch
• If the Y-resolution is omitted, the X-resolution is used along both axes
• Default: pixel size = 1.0 file units (X and Y)

#### -dither:{0.0-TO-1.0}

• Specify a value for ordered dithering using a 8x8 Bayer matrix.
• The number of pixels drawn in a 8x8 pixel block for solid fill areas decreases as the dither value changes from 1.0 (all pixels) to 0.0 (no pixels)
• By default, all pixels are drawn (1.0)

#### -invert

• Invert the image polarity by drawing white pixels (data) on a black background
• By default, we draw black pixels (data) on a white background

#### -right-to-left

• Reverse the direction of rasterization along a single row of pixels. The rightmost pixel on a given row corresponds to the min-x position in the data space
• By default, the rightmost pixel on a given row corresponds to the max-x position in the data space

#### -bottom-to-top

• Reverse the direction of rasterization along Y. The topmost pixel row corresponds to the min-y position in the data space
• By default, the topmost pixel row corresponds to the max-y position in the data space

#### -fill:solid | -fill:outline

• solid (default) : Each polygon is filled with pixels entirely
• outline : Only the edges of the polygons are rasterized. Inside is not

### Misc. Settings

#### -thrnum:{n_threads}

• Number of threads to be used for rasterization
• Default (0): No. CPU cores

#### -max-buffer-cnt:{est_num_vertices}

• For better memory usage and multi-threaded rasterization, buffer input polygons upto the specified number of vertices (per window) before invoking the rasterizer
• Default: 1,000,000 vertices
• If set to 0, each polygon is rasterized as it is received from the database with 1 thread

#### -flat

• If specified, do not find repeating cell patterns (slower)
• Default: Use repeating cell patterns to speed up rasterization

#### -log:{new_log_file} or -log+:{existing_log_file}

• Generate an execution log (text file) or append to an existing text file

#### -silent

• Do not send progress updates to stdout/stderr. Doing so might result in slight improvement in execution time
• By default, clipextract prints messages and progress updates to stdout/stderr

ARTWORK CONVERSION SOFTWARE, INC.
417 Ingalls St. Unit C, Santa Cruz, CA 95060 831.426.6163  email: info@artwork.com