Along with the library, we include a sample app or executable that uses the library to produce bitmap files. This app, Nextgenraster64.exe can be helpful to the OEM programmer who is developing his own app to use the library.
A special feature of this sample app is that it can output the API calls to the library that it uses. This is very helpful to an OEM programmer who wishes to better understand how to best use the API.
The sample app is command line driven. The command line syntax and options are shown below:
NextGenRaster.exe <Mandatory Arguments> [<Non-Cumulative Arguments>] [<Cumulative Arguments>]
Mandatory Arguments (must be present, in this order)
+input:${INPUT_FILE} Specify the input GDSII/OASIS or DBLOAD cache (memory map) file to be loaded +out:${OUTPUT_BASE_PATH} Specify the base path (directory + file name - file extension) where the output files will be created
Non-Cumulative Arguments
(Order of appearance does not matter, Multiple occurrence overrides the previous one)
-roi:${LLX},${LLY},${URX},${URY} Specify region of interest (for generating tiles) with the lower left and upper right points in file units Tiling (-tiles) if specified, will be applied on this area of the home view. If absent, the tiling will be applied to the entire home view. This argument does not affect the behavior of -window arguments
-layers:${LAYERLIST} a comma-separated list of layer[:datatype] to be loaded If no datatype is specified, all datatypes of that layer will be loaded Any layers or datatypes not covered by this list will be dropped as if they don't exist in the file e.g 1,2:1,2:2,3:5 Load all datatypes for layer 1, only 2:1, 2:2 for layer 2 and 3:5 for layer 3. Drop any other layer:datatype. If this argument is absent, all layers in the file are loaded.
-cell:${VIEWCELL} Specify the cell/structure to process. The extents of this cell will become the home view If not specified, the default viewcell is the one with the deepest tree below it.
-pixelsize:${PIXELSIZE} Specify the size (diameter) of a single pixel The pixel size is in file units. e.g A pixel size of 1 micron is equivalent to a DPI of 25400. If this argument is absent, pixel size defaults to 1 micron
-fill:${FILL} controls the pixel "filling" of boundaries and paths. If not listed defaults to -fill:solid. solid - fills paths/boundaries using the specified dither density for edge and interior. outline - rasterizes only the edges of paths and boundaries pathline - rasterizes paths as 1 pixel wide lines connecting the vertices. Boundaries are treated as fill:solid were in effect pathpoint - rasterizes each path vertex as a single pixel; boundaries are treated as fill:solid were in effect.
-dither:$X if -dither is in effect the rasterization will use a Bayesian dithering and the density of the fill will be X (where X can range from 0.0 to 1.0)
-flat Directs the library to not use pattern recognition to speed up the rasterization. Every single polygon will be rasterized separately even if it repeats many times. If this argument is not present, the default behavior is to use cell hierarchy to detect repeating patterns within a single window to speed up the rasterization.
-thrnum:${NUM_THREADS} Specify the number of concurrent threads to be used for rasterization and formatting. If not present, the default behavior is for the library to use the number of threads equal to the number of CPUs. If -thrnum is 1 and -max-buffer-cnt is 0, polygon buffering will be disabled and every polygon in a window will be rasterized on the fly. (Very memory efficient but slow)
-max-buffer-cnt:${MAX_BUFFER_VERT} For better memory management, specify an approximate polygon buffer size (as number of vertices) If specified (value > 0), the rasterization will be executed in batches of polygons such that the total number of vertices in each batch is approximately equal to the specified value. If absent, a default size of 1,000,000 vertices will be used. If the value specified is 0 and -thrnum > 1, the entire window will be buffered and rasterized at once (not memory efficient) If the value specified is 0 and -thrnum is 1, polygon buffering will be disabled and each polygon will be rasterized on the fly (very memory efficient but slow)
-verbose Print additional information to stdout and the log file (if specified)
-invert Invert the image polarity If absent, defaults to "black" on "white" background
-format:NONE | -format:TIFF | -format:BMP | -format:RAW Specify output bitmap format: TIFF - produce a TIFF file with packbits compression BMP = a monochrome BMP file (uncompressed) RAW represents an uncompressed raw monochrome image This format has a small header that starts with LGRAW00 followed by the image width in pixels (4 bytes), image height in pixels (4 bytes), total number of pixels (8 bytes) and finally the actual image data straight from the raster buffer
-log:${LOGFILE} Enable logging to a file at the specified path (directory + | file name + extension) -log+:${LOGFILE} If -log+ is used, append to the log file if it already exists. Otherwise, create a new file at the specified path. If absent, no log file is generated.
-silent Do not print messages on the console (stdout/stderr) If absent, emitcode, progress and information messages are printed to stdout, errors and warnings are printed to stderr
-emitcode Emit C++ code snippet to stdout/log file every time the NextgenRaster Library API is used. Each code snippet accompanied by comments and parameter values This allows the user to understand the usage and flow of the QckRaster Library API. Each line of the code emitted is preceded by [c++] to separate it from messages from progress and information updates This option should be used for reference and diagnostic purposes only since it may affect performance Interacts with -silent and -log
Cumulative Arguments
(Order of appearance does not matter, Multiple occurrence has a cumulative effect)
-window:LLUR,${LLX},${LLY},${URX},${URY} Specify a raster window using the lower left and upper right points (in file units) -window is independent of the -roi command The actual raster window extents may be slightly adjusted to account for byte alignment Multiple -tiles and -window commands can be used cumulatively to generate a set of raster windows. The order of occurrence of these commands determines the order in which they are rasterized.
-window:LLWH,${LLX},${LLY},${WIDTH},${HEIGHT} Specify a raster window using the lower left corner, width and height (in file units) -window is independent of the -roi command The actual raster window extents may be slightly adjusted to account for byte alignment Multiple -tiles and -window commands can be used cumulatively to generate a set of raster windows. The order of occurrence of these commands determines the order in which they are rasterized.
-window:CWH,${CENTERX},${CENTERY},${WIDTH},${HEIGHT} Specify raster window using the center point and width and height (in file units -window is independent of the -roi command The actual raster window extents may be slightly adjusted to account for byte alignment Multiple -tiles and -window commands can be used cumulatively to generate a set of raster windows. The order of occurrence of these commands determines the order in which they are rasterized.
-windows@${FILEPATH} Specify a text file containing a set of -window and/or -tiles command (one per line) as an alternate way to specify raster windows. The order of occurrence of these commands determines the order in which they are rasterized.
-tiles:NXY,${N_X},${N_Y} Break a region of interest into a fixed number of raster windows in X and Y The region of interest can be specified using the -roi command. If not specified, the home view is the region of interest. Multiple -tiles and -window commands can be used cumulatively to generate a set of raster windows. The order of occurrence of these commands determines the order in which they are rasterized.
-tiles:WH,${WIDTH},${HEIGHT} Break a region of interest into a fixed number of raster windows by width and height. The region of interest can be specified using the -roi command. If not specified, the home view is the region of interest. Multiple -tiles and -window commands can be used cumulatively to generate a set of raster windows. The order of occurrence of these commands determines the order in which they are rasterized.