Home
About Isis
Support
Download

Isis 3

Documentation
Tutorials
Technical Documents

Isis 2

Documentation
Tutorials
Technical Documents

Search

USGS

Isis 3 Application Documentation


crop

Printer Friendly View | TOC | Home

This program extracts a sub-area from a cube

Overview Parameters Example 1

Description

This program can be used to crop or select a sub-area from a cube. The crop parameter selection requires that the area of interest be contiguous. That is, the program will not allow non-continuous cropping such as lines 1-5, 10-30, and 80-100. The contiguous area can however be sub-sampled by specifing pixel increments (or skips). For example every third line (1, 4, 7, 10, ...) can be written to the output cube using a line increment (LINC) of three.

Categories


Related Applications in Previous Versions of Isis

This application replaces the following applications existing in previous versions of Isis, which have been deprecated from the current version of Isis:
  • dsk2dsk
  • sfrom

History

Jim Mathews1994-04-20 Original version
Jeff Anderson2002-08-05 Converted to Isis 3.0
K Teal Thompson2002-11-18 Added examples
Jeff Anderson2003-01-28 Removed crop from the Utility category
K Teal Thompson2003-02-03 Make images smaller
K Teal Thompson2003-02-04 Added red rectangle to input image of example to illustrate crop area.
K Teal Thompson2003-03-19 Moved images to /assets/image directory and thumbnails to /assets/thumb directory.
Stuart Sides2003-04-04 Fixed problem with isiscvs not checking in the thumb and image directories.
Stuart Sides2003-04-25 Added extraction labels
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-02-16 Replaced extraction group with AlphaCube group and propagated other labels.
Jeff Anderson2004-02-16 Added LINC and SINC parameters and set defaults for all parameters
Brendan George2006-12-29 Fixed to allow input band selection
Elizabeth Miller2007-02-01 Modified to adjust the upper left corner x and y values in the mapping group of the output cube if the input cube is projected
Steven Lambright2008-05-13 Removed references to CubeInfo
Steven Lambright2008-08-04 Added spice propagation option PROPSPICE. Fixed description of NLINES, NSAMPLES and now line associated and sample associated tables are modified when crop is run.
Steven Lambright2008-08-06 Changed default of PROPSPICE to true. Sample/Line associated tables are no longer modified due to conflicts with other programs, such as pad, which doesn't know what data values to add to the tables.
Steven Lambright2009-06-30 When an invalid projection exists the proper error should now be thrown.
Janet Barrett2009-10-21 Now uses the SubArea class to produce output cube labels with corrected Mapping, Instrument, and AlphaCube groups.

Parameter Groups

Files

Name Description
FROM Input cube
TO Output cropped cube

Sample Extraction

Name Description
SAMPLEStarting Sample
NSAMPLESNumber of Samples
SINCSample increment

Line Extraction

Name Description
LINEStarting Line
NLINESNumber of Lines
LINCLine increment

MISC

Name Description
PROPSPICE Propagate SPICE blobs
X

Files: FROM


Description

The cube which will be cropped.

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

Files: TO


Description

The smaller output cube containing the results of the crop.

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

Sample Extraction: SAMPLE


Description

The starting sample to extract. It must be inside the cube.

Type integer
Default 1
Minimum 1 (inclusive)
Close Window
X

Sample Extraction: NSAMPLES


Description

This defines how many samples will be taken from the input cube, if SINC is 1. The number of samples actually taken from the input cube is NSAMPLES/SINC.

Type integer
Internal Default All samples
Minimum 1 (inclusive)
Close Window
X

Sample Extraction: SINC


Description

A sample increment to use when extracting from the input cube. This effectively skips samples. For example if SINC=2 and SAMPLE=1 the output cube would contain samples 1,3,5,7, and so on. Note that this reduces the size of the output cube as specified by NSAMPLES. That is, if NSAMPLES=200 and SINC=2, the output cube will have 100 samples.

Type integer
Default 1
Minimum 1 (inclusive)
Close Window
X

Line Extraction: LINE


Description

The starting line to extract. It must be inside the cube.

Type integer
Default 1
Minimum 1 (inclusive)
Close Window
X

Line Extraction: NLINES


Description

This defines how many lines will be taken from the input cube, if LINC is 1. The number of lines actually taken from the input cube is NLINES/LINC.

Type integer
Internal Default All lines
Minimum 1 (inclusive)
Close Window
X

Line Extraction: LINC


Description

A line increment to use when extracting from the input cube. This effectively skips lines. For example if LINC=2 and LINE=5 the output cube would contain lines 5,7,9,11 and so on. Note that this reduces the size of the output cube as specified by NLINES. That is, if NLINES=200 and LINC=2, the output cube will have 100 lines.

Type integer
Default 1
Minimum 1 (inclusive)
Close Window
X

MISC: PROPSPICE


Description

The spice information for a cube is less for a cropped cube. This prevents the propagation of the larger amount of spice blobs.

Type boolean
Default true
Filter *.cub
Close Window

Example 1

200x300 sub-area

Description

Extracting a 200x300 sub-area

Command Line

crop f=peaks.cub t=crop.cub samp=100 line=200 nsamp=200 nline=300
In this example crop will extract a 200x300 sub-area that starts at sample 100 and line 200

GUI Screenshot

Crop Gui

Example Gui

Screenshot of GUI with parameters filled in to perform a 200 pixel by 300 pixel crop of the input image.

Input Image

Input image

Input image for crop

Parameter Name: FROM

This is the input image for the 200x300 example of crop. The area to be "cropped" is shown in red.

Output Image

Output image showing results of the crop application with 200 by 300 input.

Output image for crop

Parameter Name: TO

This is the output image for the 200x300 example of crop