DCARITH(1)

NAME
dcarith - ACR/NEMA DICOM PS3 ... DICOM PS3 - Arithmetic on DICOM pixels

SYNOPSIS

dcarith [ -v|verbose ] [ -ignorereaderrors ] [ -maskhighbits bits ] [ -addvalueoffset offset ] [ -zerovalue value ] [ -replacevalue startvalue endvalue newvalue ] [ -scale scalefactor ] [ -makeidentityrescale ] [ -invertgrayscale ]

DESCRIPTION

dcarith reads the named dicom or acr-nema input file and copies the information and pixel data to a new dicom file, performing the same arithmetic computation on all of the pixel data values (i.e., a point operation).

Note that the command only changes the stored pixel values in PixelData, and does not affect any other attributes, including PixelPaddingValue, except as described below for specific options. This means that other attributes that describe the pixel data may need to be changed manually (using, for example, the -r option).

OPTIONS
The verbose output goes to standard error.

The basic input switches are described in dcintro(1). Options specific to this program are:

-verbose
    Display byte offset from file start and message start, in hexadecimal, and dump contents while reading, once read, during replacement, and before writing.

-ignorereaderrors
    Normally dccp stops if read errors are encountered, but if this option is turned on, it will try to write what it can. This may be useful to remove trailing garbage after a valid dicom set that has been padded past the pixel data (e.g. to a blocksize) or similar.

-pixelpaddingvalue
    Apply the same operation to PixelPaddingValue as well as the stored pixel values. Implied by -makeidentityrescale.

-maskhighbits bits
    Set to zero all bits above (to the left of) the specified bit.

-addvalueoffset offset
    Add a fixed offset value to all pixels.

-zerovalue value
    Sets all stored pixel values with the specified value to a new value of zero.

-replacevalue startvalue endvalue newvalue
    Sets all stored pixel values greater than or equal to the start value and less than or equal to the end value to the specified new value.

-scale scalefactor
    Multiply all stored pixel values by the specified scale factor (which may be a floating point value).

-makeidentityrescale
    Determine from the existing RescaleSlope and RescaleIntercept values what computation to apply to the stored pixel values to make RescaleSlope 1 and RescaleIntercept 0, and apply that computation to the stored pixel values, setting PixelRepresentation to 1 (signed) and BitsStored to 16, regardless of their previous values. Also applies the same computation to PixelPaddingValue (i.e., implies -pixelpaddingvalue).

-invertgrayscale
    Invert the grayscale of the pixel values, using the BitsStored value to establish the range (i.e. a value of 0 is replaced by (2^BitsStored)-1 and vice versa).

ENVIRONMENT

EXAMPLES

FILES

SEE ALSO
dcintro(1)

AUTHOR
Copyright (c) 1993-2022, David A. Clunie DBA PixelMed Publishing. All rights reserved.

BUGS