[Artwork] / [QisMLib] / [Programmer's Corner]
RTCRClient (QisM)Command-line and usage{JOB} (atleast ONE required) :=+job:{input_gdsii_file_path},{output_dir_path}[-dpi:{dpix}[,{dpiy}] | -pixelsize:{sizex}[,{sizey}]][-correction:{correction_file_path}[,{tolerance}][-annotation:{annotation_file_path}][-invertimage][-shift:INS_WHITE | -shift:INS_BLACK | -shift:REMOVE][-colshift:{col_px},...{col_px}]*[-rowshift:{row_px},...{row_px}]*[-graylayers:{grey_level},{layer_list}][-tiff:packbits | -tiff:packbits64 | -tiff:bmp | -tiff:raw | -tiff:none][-right-to-left][-mask:{minx},{miny},{maxx},{maxy}][-thrnum:{n_threads}][-tile:{minx},{miny},maxpt:{maxx},{maxy}]*[-tile:{minx},{miny},tilesz:{width},{height}]*[-tile:{minx},{miny},tilebuf:{size_mb}]*[-autotiles:{roi_minx},{roi_miny},{roi_maxx},{roi_maxy},ntiles:{nx},{ny}][-autotiles:{roi_minx},{roi_miny},{roi_maxx},{roi_maxy},tilesz:{width},{height}][-origin:LL | -origin:LR | -origin:UL | -origin:UR][-direction:up | -direction:down | -direction:left | -direction:right][-only:{tile_num}[,{tile_num}]*[-subsample | -subsample:{recipe}][-dbg]@{cmd_file_path}{Misc.} (OPTIONAL) :=[-log:{log_path}] | [-log+:{log_path}][-silent]CORRECTION FILE SYNTAXANNOTATION FILE SYNTAXDependenciesWIN64
xxxxxxxxxxqmrtcrclient64.exe {JOB}+ [{MISC}]-- OR --qmrtcrclient64.exe @{cmd_file_path} [{MISC}]
{JOB} (atleast ONE required) :=+job:{input_gdsii_file_path},{output_dir_path}{input_gdsii_file_path} is the path to a valid GDSII file with units = um (microns) and grid = 0.001 (1 nm resolution){output_dir_path} is the path to a valid and writable directory. The directory MUST exist[-dpi:{dpix}[,{dpiy}] | -pixelsize:{sizex}[,{sizey}]][-correction:{correction_file_path}[,{tolerance}]{correction_file_path} is the path of a valid correction file {tolerance} is the margin of error when applying corrections[-annotation:{annotation_file_path}]{annotation_file_path} is the path of a valid annotation file[-invertimage][-shift:INS_WHITE | -shift:INS_BLACK | -shift:REMOVE]INS_WHITE : insert white line(s) at specific pixel rows/columnsINS_BLACK : insert black line(s) at specific pixel rows/columnsREMOVE : remove lines at specific pixel rows/columns-invertimage) or
gray level (-graylayers)-colshift, -rowshift[-colshift:{col_px},...{col_px}]*-shift:[-rowshift:{row_px},...{row_px}]*-shift:[-graylayers:{grey_level},{layer_list}]{grey_level} is the dithering value (0.0 - 1.0). 0.0 = all scratched, 1.0 = all paint{layer_list} is a comma-separated list of layer(s) or layer:datatype(s) e.g 1,2:0,3:1,3:3. If datattype is missing, all datatypes for the specified layer are used-invertimage)[-tiff:packbits | -tiff:packbits64 | -tiff:bmp | -tiff:raw | -tiff:none]packbits = compressed TIFF. packbits64 generates BigTIFF format for files larger than 4GBbmp = uncompressed BMPraw = uncompressed dump of the image buffer with a small header. The
format of the raw file is as follows:
7 bytes [0..6] (identifier): 'L''G''R''A''W''0''0'
4 bytes [7..10] (width in pixels)
4 bytes [11..14] (height in pixels)
8 bytes [15..22] (pixel data size in bytes)
(pixel data)-tiff:packbits[-right-to-left][-mask:{minx},{miny},{maxx},{maxy}]{minx}..{maxy} are the extents of the data to be preserved in the image{minx}..{maxy} will be scratched[-thrnum:{n_threads}][-tile:{minx},{miny},maxpt:{maxx},{maxy}]*{minx}..{maxy} are in file units (um)-tile:, -autotile: can be specified multiple times[-tile:{minx},{miny},tilesz:{width},{height}]*{minx},{miny} represents the lower-left point of the tile while {width}
{height} are the dimensions (>0.0){minx},{miny},{width},{height} are in file units (um)-tile:, -autotile: can be specified multiple times[-tile:{minx},{miny},tilebuf:{size_mb}]*{minx},{miny} represents the lower-left point of the tile (in file units) while {size_mb} is the estimated buffer size in mb (1024*1024 bytes) to hold the raster image -tile:, -autotile: can be specified multiple times[-autotiles:{roi_minx},{roi_miny},{roi_maxx},{roi_maxy},ntiles:{nx},{ny}]{roi_minx}..{roi_maxy} based on the number of tiles along x,y{nx} >= 1, {ny} >= 1. {roi_minx}..{roi_maxy} are in file units (um)-origin, -direction-tile:, -autotile: can be specified multiple times[-autotiles:{roi_minx},{roi_miny},{roi_maxx},{roi_maxy},tilesz:{width},{height}]{roi_minx}..{roi_maxy} based on the tile size {width},{height} (all in file units)-origin, -direction-tile:, -autotile: can be specified multiple times[-origin:LL | -origin:LR | -origin:UL | -origin:UR][-direction:up | -direction:down | -direction:left | -direction:right][-only:{tile_num}[,{tile_num}]*{tile_num} <= (total no. tiles)[-keep:{tile_num}[,{tile_num}]*{tile_num} <= (total no. tiles)-tiff:[-subsample | -subsample:{recipe}]{recipe} if specified, is a string of exactly 16 1's and 0's constituting the sub-sampling recipe. See here for details[-dbg]@{cmd_file_path}{JOB}+ in a text file, one argument per line[-log:{log_path}] | [-log+:{log_path}]-log: will create a new file while -log+: will append to an existing file[-silent]
A correction file consists of multiple correction-sets
Each correction-set is represented by FOUR correction-points
Each correction-point consists of a reference point (from the original file) and X and Y deltas to be applied to this reference point to compute the corresponding corrected point in the corrected file
The X, Y and delta values are in the user units (file units), separated by comma (and space)
Empty lines are not allowed
Correction definition syntax:=
xxxxxxxxxx${REF_X}, ${REF_Y}, ${DELTA_X}, ${DELTA_Y}${REF_X}, ${REF_Y}, ${DELTA_X}, ${DELTA_Y}${REF_X}, ${REF_Y}, ${DELTA_X}, ${DELTA_Y}${REF_X}, ${REF_Y}, ${DELTA_X}, ${DELTA_Y}
where REF_X and REF_Y represent one anchor point in the un-corrected source
data and DELTA_X and DELTA_Y represents the corrected position of the anchor
point
four anchor points form a single domain
more than one domain can be specified
the domains CANNOT overlap
all values specified in file units
Sample correction file with SIX domains
xxxxxxxxxx13549.987, 14300, 1000, 1000159250.012, 14300, 1000, 1000159250.012, 250700.012, 1000, 100013549.987, 250700.012, 1000, 1000172249.987, 14300, 0, 0242750.012, 14300, 0, 0242750.012, 250700.012, 0, 0172249.987, 250700.012, 0, 0255749.987, 14300, 0, 0401450.012, 14300, 0, 0401450.012, 250700.012, 0, 0255749.987, 250700.012, 0, 09500, 264750, 0, 0162499.999, 264749.999, 0, 0162500, 495250, 0, 09500, 495250, 0, 0162499.999, 264749.999, 0, 0252500, 264750, 0, 0252499.999, 495249.999, 0, 0162500, 495250, 0, 0255749.987, 495700.012, 0, 0401450.012, 495700.012, 0, 0401450.012, 259300, 0, 0255749.987, 259300, 0, 0
A text annotation file can define multiple text annotations
Each text annotation definition starts with a B_TEXT_ANNOTATION keyword, followed by a set of properties and ends with a E_TEXT_ANNOTATION keyword
Every keyword or property must be separated from another keyword/property by a new-line
Lines that start with a # are treated as a comment and therefore ignored
Empty lines can occur anywhere and are ignored
Individual items on a single line (property fields) can be separated by tabs or spaces or even a mix of tabs and spaces
Order in which the properties are defined is irrelevant
All measurements of length are in millimeters (MM)
Following properties are mandatory:
BOX : Extents of box that encloses the text. The width and height of the
text are adjusted so that it fits inside the box after the transformations
(rotation, inverse) and margin have been applied. If specified, BOX
overrides HEIGHT and XY HEIGHT : Height of the text annotation (in MM) including all the lines ofXY : Co-ordinates of the anchor point in MM. This along with HEIGHT can be
used instead of BOX. If XY is used, HEIGHT must also be specified B_TEXT ... E_TEXT : Text string. Can be multi-line Following properties are optional :
ROTATION : Orientation of the text box. Defaults to 0 degrees INVERSE : If YES, text is scratched out of a solid box. If NO, text is painted inside an empty box. Defaults to NO MARGIN : Amount of separation between the text and the enclosing box. Defaults to 0 MM SCALE : Uniform scaling to be applied to the text box. Defaults to 1.0 FRAME : Add a frame around the text. Defaults to NO READING : If BACKWARDS, mirror the text about X. If NORMAL, no mirroring is applied. Defaults to NORMALText annotation definition
xxxxxxxxxxB_TEXT_ANNOTATION# Use a BOX to specify text position :BOX ${MINX_MM} ${MINY_MM} ${MAXX_MM} ${MAXY_MM}# Or, use HEIGHT and XY to specify text position :XY ${X_MM} ${Y_MM}HEIGHT ${HEIGHT_MM}ROTATION ${DEGREES}SCALE ${SCALE}INVERSE ${'YES' | 'NO'}FRAME ${'YES' | 'NO'}MARGIN ${MARGIN_MM}READING ${'NORMAL' | 'BACKWARDS'}B_TEXT${LINE1}${LINE2}...${LINEN}E_TEXTE_TEXT_ANNOTATION
Sample text annotation file with THREE annotations
xxxxxxxxxxB_TEXT_ANNOTATIONBOX 497.246 22.6962 511.977 28.6294ROTATION 0INVERSE NOMARGIN 0.2FRAME YESB_TEXTTEXT_1E_TEXTE_TEXT_ANNOTATIONB_TEXT_ANNOTATIONXY 33.5472 581.419HEIGHT 15B_TEXTTEXT_2E_TEXTE_TEXT_ANNOTATIONB_TEXT_ANNOTATIONBOX 548.973 313.895 597.668 326.325ROTATION 90INVERSE YESMARGIN 0.01READING BACKWARDSB_TEXTTEXT_3 ISMULTI -LINEE_TEXTE_TEXT_ANNOTATION