Home
About Isis
Support
Download

Isis 3

Documentation
Tutorials
Technical Documents

Isis 2

Documentation
Tutorials
Technical Documents

Search

USGS

Isis 3 Application Documentation


reduce

Printer Friendly View | TOC | Home

Scale cube down

Overview Parameters Example 1

Description

This program will reduce a cube either by averaging pixels or using the nearest-neighbor algorithm.

Categories


History

Jeff Anderson1995-11-06 Original version
Tracie Sucharski2002-10-12 Ported to Isis 3.0, Separated magcube into reduce and enlarge.
Tracie Sucharski2003-05-13 Read in ons/onl as integers not doubles.
Stuart Sides2003-05-16 Modified schema location from astogeology... to isis.astrogeology..."
Stuart Sides2003-07-29 Modified filename parameters to be cube parameters where necessary
Jeff Anderson2004-07-14 Fixed propagation bug
Tracie Sucharski2004-07-15 Forget to change ons/onl minimum inclusive values from 1.0 to 1 during the 2003-5-13 change.
Drew Davidson2005-08-17 Added example
Tracie Sucharski2006-04-03 Fixed bug in average algorithm, forgot to divide Vper by 100.
Jeff Anderson2006-09-19 Fixed problems when program ran in batchlist
Sean Crosby2007-02-28 Program now updates output file's mapping keywords
Steven Koechle2008-01-23 Changed so if it failed VPER the output cube would get null values. Now processes cube bands from user input correctly
Steven Lambright2008-05-13 Removed references to CubeInfo
Steven Koechle2008-05-15 Added radio button for VPER options to allow original functionaliy.

Parameter Groups

Files

Name Description
FROM Input cube to reduce
TO Output cube

Scaling Parameters

Name Description
ALGORITHMAlgorithm used to reduce image (Average,Nearest neighbor)
SSCALESample scaling factor
LSCALELine scaling factor
ONSNumber of samples in output
ONLNumber of lines in output
VALIDPERValid percentage
VPER_REPLACEReplacement method when VPER fails
X

Files: FROM


Description

Use this parameter to select the filename. All bands within the file will be scaled down.

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: TO


Description

This file will contain the results of the shrunken cube.

Type cube
File Mode output
Filter *.cub
Close Window
X

Scaling Parameters: ALGORITHM


Description

This chooses the algorithm used to reduce the image. The possibilities are: average or nearest-beighbor.

Type string
Default AVERAGE
Option List:
Option Brief Description
AVERAGEAverage surrounding pixels Use pixel averaging to reduce the image.
NEARESTNearest-Neighbor Use nearest neighbor to reduce the image.
Close Window
X

Scaling Parameters: SSCALE


Description

This is the scaling factor for the sample direction. For example, SSCALE=4 will reduce the number of samples by 1/4th.

Type double
Default 1.0
Minimum 1.0 (inclusive)
Exclusions
  • ONS
  • ONL
Inclusions
  • LSCALE
Close Window
X

Scaling Parameters: LSCALE


Description

This is the scaling factor for the line direction. For example, LSCALE=4 will reduce the number of lines by 1/4th.

Type double
Default 1.0
Minimum 1.0 (inclusive)
Exclusions
  • ONS
  • ONL
Inclusions
  • SSCALE
Close Window
X

Scaling Parameters: ONS


Description

The number of samples desired in the output cube. This value must be less than or equal to the number of samples in the input image.

Type integer
Minimum 1 (inclusive)
Exclusions
  • SSCALE
  • LSCALE
Inclusions
  • ONL
Close Window
X

Scaling Parameters: ONL


Description

The number of lines desired in the output cube. This value must be less than or equal to the number of lines in the input image.

Type integer
Minimum 1 (inclusive)
Exclusions
  • SSCALE
  • LSCALE
Inclusions
  • ONS
Close Window
X

Scaling Parameters: VALIDPER


Description

This parameter specifies what percentage of the pixels need to be valid (non-special pixels). For example, scaling down by a factor of two results in a 2x2 window (four pixels) being reduced to one pixel. If VPER is set at 50, then at least two pixels of the four must be valid (50%). If this criteria is met, the resulting value of the output pixel will be the average of the valid input pixels. Otherwise the output pixel will be set to the input pixel which is closest to the center of the window.

Type double
Default 50
Close Window
X

Scaling Parameters: VPER_REPLACE


Description

When the set VPER variable is not met, this is how the pixel with be filled.

Type string
Default NULL
Option List:
Option Brief Description
NULLNULL replacement Use NULL value when VPER is invalid..
NEARESTNearest-Neighbor replacement Use nearest neighbor when VPER is invalid.
Close Window

Example 1

Reduce the number of samples by a factor of 2

Description

Essentially the opposite of enlarge, this configuration for reduce takes an image and scales down the samples.

Command Line

reduce from= peaks.cub to=reducedPeaks.cub sscale=2 lscale=1
In this example the sample scale is 2. Note that this implies that the image will be scaled down by a factor of 2, not scaled up.

GUI Screenshot

reduce gui

Example GUI

Screenshot of the GUI with parameters set to perform a sample reduction.

Input Image

The image before the filter

Input image before reduce

Parameter Name: FROM

This is the image as it was taken originally.

Output Image

The image after the filter

Output image after minmax

Parameter Name: TO

The reduced image. Though it has been scaled down so that it can be viewed by a web browser, the essential change can still be observed. The vertical distortion is noticable, and the output cube is 1/2 the size of the input cube.