VisionX V4 | VXgetresinfo | VisionX V4 |
VXgetresinfo, VXgetrscale, − VisionX size and scale function |
void VXgetresinfo(imginfo) VisXiinfo_t *imginfo; void VXgetrscale(imginfo) VisXiinfo_t *imginfo; void VXbrand(imginfo, file) VisXiinfo_t *imginfo; VisXfile_t *file; void VXbrandstr (imginfo, str) VisXiinfo_t *imginfo; char *str; |
These functions manage the size (pixel resolution) and scale (pixel intesnity scale factors) information for VisionX files. The size and scale informtaion is represented in the file image history as the "most recent command" as discussed on vbrand(1). All of these functions access the current file history. This history is set when the first VisionX file is opened and contains the history of that file. Therefore, reading size and scale information is only current possible for the first VisionX file that and that file must first be opnend with VXopen(3). VXgetresinfo access the current file history to read image resolution information into the imginfo structure. This sets the imginfo values .szfl, .xs, .ys, .zs, and .unit. VXgetrscale access the current file history to read image pixel scale information into the imginfo structure. This sets the imginfo values .rsclfl, .ri, and .rs. VXbrand adds a additional size-scale vbrand command string to the history of the specified output file. The information is extracted from the imgino structure and recast as a vbrand(1) command. This is convenient for size-scale aware commands to revalidate (and possibly change) the image resolution and scale information without the need of the vbrand(1) command. If just revalidation is required then, after opening the input file call VXgetresinfo and VXgetrscale and then call VXbrand. VXbrandstr is used by VXbrand to add the new vbrand command to the file hsitory. However, it may also be directluy used to add any test string to the file history. |
The following elements of the VisXiinfo_t structure are used for resolution-scale information: |
.szfl |
size valid flag, 0 is not valid and 1 is valid |
||
.unit |
scale unit value, currently defined values are: 0 (pixels), 1 millimeters (mm) |
||
.xs |
x-dimension resolution |
||
.ys |
y-dimension resolution |
||
.zs |
z-dimension resolution |
||
.rsclfl |
scale valid flag, 0 is not valid and 1 is valid |
||
.ri |
scale intercept value (as defined for DICOM CT) |
||
.rs |
scale slope value (as defined for DICOM CT) |
A. P. Reeves |
vbrand(1), VXopen(3) |