ROT -- Database Channel and GCP Rotation

Rotates rectangular image data in up to 1024 image channels between two database files or within one database file. Optionally, a GCP (Ground Control Point) segment can be rotated along with the image.

Progress of this program can be monitored. See MONITOR section.

PARAMETERS

ROT is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILI     Database Input File Name                1-64      Char
FILO     Database Output File Name               0-64      Char
DBIC     Database Input Channel List             1-1024    Int
DBOC     Database Output Channel List            0-1024    Int
DBGC     Database Ground Control Segment         0-1       Int
DBIW     Database Input Window                   0-4       Int
ANGLE    Angle                                   1         Real
RCENTRE  Centre of Rotation                      0-2       Real
RESAMPLE Resample Mode: NEAR/BILIN/CUBIC         0-5       Char

FILI

Specify the name of the PCIDSK file from which image data is to be rotated.

 EASI>FILI="filespec1"

FILO

Specifies the name of the PCIDSK file to which the rotated image data is to be written. FILO can be the same as FILI. If FILO is not specified, then it is defaulted to FILI. If FILO is specified but the file does not exist, ROT will create a file automatically which will fit the rotated image. FILO must exist for rotating GCPs only

 EASI>FILO="filespec2"

DBIC

Optionally specifies the list of input channels to be rotated from file FILI.

 EASI>DBIC=i,j,...,p                    (maximum 1024 channels)
 EASI>DBIC=                             (no image rotation)

DBOC

Optionally specifies the list of channels to be output to file FILO.

 EASI>DBOC=i,j,...,p                    (maximum 1024 channels)

DBGC

Optionally specifies the GCP segment to be rotated along with FILI. If this parameter is specified, a new GCP segment will be created in FILO.

 EASI> DBGC=i           | rotate GCP segment i
 EASI> DBGC=            | no gcp segment rotation
Only the image coordinates inside the GCP segment will be rotated.

DBIW

Optionally specifies a rectangular subset of the image to be rotated.

 EASI>DBIW=Xoffset,Yoffset,Xsize,Ysize
 EASI>DBIW=                            | defaults to entire image

RCENTRE

Optionally specifies the centre of rotation in pixel and line coordinates.

 EASI>RCENTRE=i,j       | Use Pixel i and Line j as the rotation centre
 EASI>RCENTRE=          | defaults to centre of DBIW window

ANGLE

  Valid Values:   0.0 <= x <= 360.0
  Default:        90.0
Specifies the clockwise angle of rotation, in degrees.

RESAMPLE

  Valid Values:   NEAREST, BILINEAR, CUBIC
  Default:        NEAREST
Specifies which type of resampling will be performed on the image data. The following methods are supported:

 NEAREST        | Nearest Neighbour (fastest)
 BILINEAR       | Bilinear Interpolation
 CUBIC          | Cubic Convolution (recommended)

DETAILS

ROT rotates selected rectangular database image channels (DBIC) and optionally a GCP segment (DBGC) in FILI at an angle (ANGLE) specified by the user, or just rotates a GCP segment only from FILI into FILO. For image rotation, the result is saved in selected output image channels (DBOC) in FILO. If FILO is not specified, it is defaulted to FILI. If FILO is specified but the file does not exist, ROT will create an output file automatically which will fit the rotated image.

The rotation can be restricted within a specified window (DBIW), if desired. By default, the entire image is rotated.

The user can also specify the centre of rotation (RCENTRE) in pixel and line coordinates. Default is the centre of DBIW window.

RESAMPLE specifies the type of resampling method used during rotation.

If the rotation angle is 180 degrees and RCENTRE parameter is not specified, it will be treated as a special case and ROT will run much faster.

MONITOR

Program progress can be monitored by printing the percentage of completed processing in odometer fashion. A system parameter, MONITOR, controls this activity:

 EASI>MONITOR="ON"           | turn monitor ON  (default)
 EASI>MONITOR="OFF"          | turn monitor OFF (recommended if
                             | running in batch/background mode)

EXAMPLE

(1) Rotate channel 1 of the demo file "irvine.pix" 45 degrees and save the result in channel 7.

 EASI>FILI="irvine.pix"
 EASI>FILO=                     | defaults to FILI
 EASI>DBIC=1                    | specify channels to rotate
 EASI>DBOC=7                    | specify output channels
 EASI>DBGC=                     | no gcp segment
 EASI>DBIW=                     | use the entire image
 EASI>ANGLE=45
 EASI>RCENTRE                   | use centre of image as rotation 
                                  centre
 EASI>RESAMPLE="CUBIC"          | use cubic resampling
 EASI>R ROT
(2) The user has a 400x200 file "file1.pix" and wants to rotate channel 1 of the file by 90 degrees. The result is to be saved in channel 1 of a 200x400 file "file2.pix".

 EASI>FILI="file1.pix"
 EASI>FILO="file2.pix"
 EASI>DBIC=1                    | specify channels to rotate
 EASI>DBOC=1                    | specify output channels
 EASI>DBGC=                     | no gcp segment
 EASI>DBIW=                     | use the entire image
 EASI>ANGLE=90
 EASI>RCENTRE                   | use centre of image as rotation 
                                  centre
 EASI>RESAMPLE="CUBIC"          | use cubic resampling
 EASI>R ROT
(3) The user has a 400x200 file "file1.pix" and wants to rotate channel 1 and 2 of the file by 45 degrees. The result is to be saved in channel 1 and 2 of a file "file2.pix" which does not exist.

 EASI>FILI="file1.pix"
 EASI>FILO="file2.pix"          | file to be created automatically
 EASI>DBIC=1,2                  | specify channels to rotate
 EASI>DBOC=1,2                  | specify output channels
 EASI>DBGC=2                    | rotate GCP segment 2
 EASI>DBIW=                     | use the entire image
 EASI>ANGLE=45
 EASI>RCENTRE                   | use centre of image as rotation 
                                  centre
 EASI>RESAMPLE="CUBIC"          | use cubic resampling
 EASI>R ROT
(4) The user has a 400x200 file "file1.pix" and wants to rotate GCP segment 2 the file by 45 degrees. The result is to be saved in an existing file "file2.pix".

 EASI>FILI="file1.pix"
 EASI>FILO="file2.pix"          | file to be created automatically
 EASI>DBIC=                     | no image rotation
 EASI>DBOC=                     | no image rotation
 EASI>DBGC=2                    | rotate GCP segment 2
 EASI>DBIW=                     | use the entire image
 EASI>ANGLE=45
 EASI>RCENTRE                   | use centre of image as rotation 
                                  centre
 EASI>RESAMPLE="CUBIC"          | use cubic resampling
 EASI>R ROT

About PCI Help Gateway