Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

ISIS Documentation

cropspecial

Crops specified special pixels from a cube

This program automatically crops as many of the special pixels in a cube as possible, without removing any valid data. The user can specify which of the five special pixel types the program should attempt to crop and which should be retained in the output cube. Labels are duplicated from the input to the output cube.

Categories


Related Objects and Documents

Applications


History

Travis Addair2009-02-24 Original version
Janet Barrett2009-10-22 Now uses the SubArea class to produce output cube labels with corrected Mapping, Instrument, and AlphaCube groups.
Travis Addair2010-01-06 Changed Progress to tell the user when the program is finding the perimeter and when it is removing special pixels from the image.

Parameters

Files

Input cube to be cropped.
Type cube
File Mode input
Filter *.cub

The resultant cropped cube.
Type cube
File Mode output
Filter *.cub

Crop Pixels

This option will cause the program to consider NULL pixels when cropping pixels for the output cube.
Type boolean
Default TRUE

This option will cause the program to consider high representation saturation (HRS) pixels when cropping pixels for the output cube.
Type boolean
Default FALSE

This option will cause the program to consider low representation saturation (LRS) pixels when cropping pixels for the output cube.
Type boolean
Default FALSE

This option will cause the program to consider high instrument saturation (HIS) pixels when cropping pixels for the output cube.
Type boolean
Default FALSE

This option will cause the program to consider low instrument saturation (LIS) pixels when cropping pixels for the output cube.
Type boolean
Default FALSE

Example 1

Crop NULL pixels

Cropping the cube with default settings selected.

Command Line

In this example, cropspecial will extract a sub-area from a cube surrounded in special pixels with only the NULL pixel type selected.
cropspecial from=allspecial.cub+1 to=nonulls.cub

GUI Screenshot

cropspecial gui

Example GUI

cropspecial gui

Screenshot of GUI with the default parameter settings, ready to perform a crop on the NULL pixels contained within the first band of the input cube.

Input Image

Input image

Input image for cropspecial

Input image

Parameter Name: FROM

The original, 82x361 image. NULL, HRS, LRS, HIS, and LIS pixels are shown in blue, light green, yellow, pink, and light blue, respectively. NULL SPACE is shown here in black.

Output Image

Output image showing results on the default settings

Output image for cropspecial

Output image showing results on the default settings

Parameter Name: TO

This is the 82x315 output image that results. The NULL pixels at the bottom have been removed, but the NULL pixels surrounded by saturation pixels have not been removed as doing so would result in the loss of pixels not selected for cropping.

Example 2

Crop all special pixels

Cropping the cube with all special pixels selected.

Command Line

In this example, cropspecial will extract a sub-area from a cube surrounded in special pixels with all pixel types selected.
cropspecial from=allspecial.cub+1 to=nospecial.cub hrs=yes lrs=yes his=yes lis=yes

GUI Screenshot

cropspecial gui

Example GUI

cropspecial gui

Screenshot of GUI with parameters filled in to perform a crop on all special pixels contained within the first band of the input cube.

Input Image

Input image

Input image for cropspecial

Input image

Parameter Name: FROM

The original, 82x361 image. NULL, HRS, LRS, HIS, and LIS pixels are shown in blue, light green, yellow, pink, and light blue, respectively. NULL SPACE is shown here in black.

Output Image

Output image showing results of the cropspecial application

Output image for cropspecial

Output image showing results of the cropspecial application

Parameter Name: TO

This is the 22x173 output image that results. Some HRS, HIS, and NULL pixels are still present due to the rectangular dimensions of the cube, but their occurence has been minimized.