USGS

Isis 2 Documentation


mermos Documentation

mermos - Mermos cubes

MERMOS merges an input cube with an output mosaic cube. This can be done
in three ways.  The first method mosaics all bands (including back
planes) from the input cube into the corresponding bands in the output
cube.  MERMOS checks the BAND_BIN_CENTER(wavelength) keyword in the
labels to insure the input band is mosaicked into the correct output
band.  The entire cube is used, a subcube is not allowed unless the
output mosaic is being initialized.  The second method mosaics one band
from the input cube into the band given by OBAND in the output cube.
There is no checking of the BAND_BIN_CENTER keyword for this method.
The third method creates an average mosaic which instead of laying
images on top of or underneath the mosaic averages the pixels of the
images put into the mosaic.  This method is implemented by setting
AVERAGE=YES.  See the parameters AVERAGE and LAST for more information.

Part of the requirement of mosaicking an input cube with a mosaic cube
is to define where in the mosaic cube the input cube is to be placed.
There are three ways, specified by the OPTION parameter, to define the
position of the input cube.

If OPTION=RECT, then the position of the input cube in the mosaic cube
is defined by rectangular coordinates.  The parameters SLM, starting
line position, and SSM, starting sample position, are used to define
where the upper-left corner of the input cube is to be positioned
spatially in the mosaic cube.  For example, if SLM=101 and SSM=307 then
the upper left corner of the specified input cube will be positioned at
line 101, sample 307 in the mosaic cube.  MOSAIC will determine which
output band from the BAND_BIN_CENTER keyword in the labels.  For more
details on mosaicking with the OPTION=RECT parameter, consult the
parameters SFROM, SSM, SLM.

If OPTION=MAP, then the position of the input cube in the mosaic cube is
specified by mapping label parameters found in both the input cube and
mosaic cube.  This option requires that the mosaic cube and the input
cube have the same mapping parameters including the same scale, center
latitude and longitude, standard parallels and other mapping parameters.
Except for the latitude and longitude ranges, the first cube put into a
mosaic defines the mapping parameters of the mosaic cube.  The latitude
and longitude ranges of a mosaic cube are specified by the LAT and LON
parameters.  For more information on mosaicking with the OPTION=MAP
parameter, consult the parameters LAT, LON, and OUTPNT.

If OPTION=TVREG, then the position of the input cube in the mosaic cube
is defined by a file which was created by the TVREG display program.
The TVREG program allows a user to interactively select where the input
cube is to be placed in the mosaic cube.  For more details on mosaicking
with the OPTION=TVREG parameter, consult the parameter TVREG, and the
TVREG display program documentation.

If TOP=YES, and MOSALL=NO, MERMOS will overlay the input values over the
mosaic values.  The chart below describes how the special pixel values
are handled.  The left side indicates the input values the bar across
the top indicates the output mosaic value, and the "I" or "M" within the
chart indicates whether the input value or the mosaic value is used in
the output mosaic.

Low_I = Low instrument saturation
Low_R = Low representation saturation
High_I = High instrument saturation
High_R = High representation saturation
(** NOTE ** See $ISISINC/special_pixel.inc for the special pixel values)

                         Mosaic (M)
Input (I) | Valid |  Null | Low_I | Low_R | High_I | High_R
------------------------------------------------------------
  Valid   |   I   |   I   |   I   |   I   |    I   |    I   |
------------------------------------------------------------
  Null    |   M   |   I   |   M   |   M   |    M   |    M   |
------------------------------------------------------------
  Low_I   |   M   |   I   |   I   |   I   |    I   |    I   |
------------------------------------------------------------
  Low_R   |   M   |   I   |   I   |   I   |    I   |    I   |
------------------------------------------------------------
  High_I  |   M   |   I   |   I   |   I   |    I   |    I   |
------------------------------------------------------------
  High_R  |   M   |   I   |   I   |   I   |    I   |    I   |
------------------------------------------------------------

If TOP=NO, MERMOS will put the input data underneath the mosaic so that
the only data which will show from the input cube will be where the
corresponding data in the mosaic area is a special pixel value.  The
chart below shows in detail how the special pixel values are handled.

                         Mosaic (M)
Input (I) | Valid |  Null | Low_I | Low_R | High_I | High_R
------------------------------------------------------------
  Valid   |   M   |   I   |   I   |   I   |    I   |    I   |
------------------------------------------------------------
  Null    |   M   |   M   |   M   |   M   |    M   |    M   |
------------------------------------------------------------
  Low_I   |   M   |   I   |   M   |   M   |    M   |    M   |
------------------------------------------------------------
  Low_R   |   M   |   I   |   M   |   M   |    M   |    M   |
------------------------------------------------------------
  High_I  |   M   |   I   |   M   |   M   |    M   |    M   |
------------------------------------------------------------
  High_R  |   M   |   I   |   M   |   M   |    M   |    M   |
------------------------------------------------------------


If TOP=NO, MOSALL will always be set to NO.

PROGRAMMER: Tracie Sucharski

ParmDescriptionDefault
FROM
Input cube file name
(Default extension is .cub)
NONE
SFROM
Input subcube specifier
--
TO
Output mosaic cube file
(Default extension is .cub)
NONE
OBAND
Output band number
--
BANDCHK
Check the BAND_BIN_CENTER
keyword in the input cube
and output mosaic to find
a match in the band dimention.
(YES, NO)
YES
HIST
Disable processing history text
(YES, NO)
NO
OPTION
Mosaic positioning option
(RECT,MAP,TVREG)

----------------------------
MAP
SLM
Use if OPTION=RECT:
Starting line in mosaic
0
SSM
Starting sample in mosaic

----------------------------

0
TOP
Put input image on top of the
mosaic (YES,NO)
YES
MOSALL
NO=Perform standard mosaic
YES=Mosaic null data as well
NO
MOSSAT
NO=Perform standard mosaic
YES=Mosaic low and high sat
    values
NO
INIT
Create output mosaic
(YES,NO)

----------------------------

Use the following parameters
only if INIT=YES:
NO
NIMGS
Number of images in final
mosaic

-----------------------------

Use the following parameters
only if INIT=YES and OPTION=MAP:
50
XRANGE
X range
(Default=Input cube)
--
YRANGE
Y range
(Default=Input cube)

     OR

--
ELRANGE
Elevation range
(default=cube range)
--
AZRANGE
Azimuth range
(default=cube range)

-------------------------------

Use the following parameters
only if INIT=YES and OPTION=RECT
--
NLM
Number of lines in mosaic
0
NSM
Number of samples in mosaic
0
NBM
Number of bands in mosaic

0
PROPLEV1
Propagate level 1 keyword
groups (ISIS_INSTRUMENT,
ISIS_GEOMETRY,ISIS_TARGET)
(YES,NO)
NO

ADDITIONAL NOTES:

ParmDescription
FROM
Input cube file name.  If the file extension is omitted,
then ".cub" will be assumed.
SFROM
SFROM specifies the subcube using a single string for all
three dimensions of the cube.  The order of the three
dimensions is always "samples:lines:bands".
If a dimension is left blank, all the data for that
dimension is selected.  The default value of NULL for SFROM
selects the entire cube.

Any application below can be used for any dimension.
To select specific data from any dimension:
  "10-100(3):11,12,15-20:1-10(2)" =  This example will
select every third sample starting with sample 10 thru 100.
It selects lines 11 and 12, and 15-20. It selects every
other band, starting with band 1 thru 10.

There are special characters that can be used for
selecting a subcube efficiently, such as "*","#", and "~".
For examples type "help sfrom" in TAE.

**NOTE** For more examples and explanation of the many
features of the SFROM parameter, tutor the sfrom.pdf or
refer to Introduction To ISIS, Section 6, of the ISIS
User's Manual **
TO
Output cube which contains the mosaic.  It can either be
created or one can be used which already exists.  If INIT=Y
then the program creates a cube of zeros.  The size of the
cube is determined by STO or by the latitude and longitude
range and other mapping parameters on the input cube such as
MAP_SCALE and MAP_PROJECTION_TYPE.  The input cube will then
be placed in the blank cube.  If a cube already exists, then
this cube is used and the input cube will be merged with
this cube at the position indicated by SLM and SSM or at the
position determined by the mapping parameters in the image
labels.  The rest of the cube is unaffected.
OBAND
This is the band in the output mosaic cube that an
individual band from the input cube will be mosaicked into.
If this parameter is not NULL, then MOSAIC will not check
the BAND_BIN_CENTER keyword to insure the that the input
band is being mosaicked into the correct output band.
BANDCHK
If this is set MERMOS will check the BAND_BIN_CENTER keyword
of the input cube and output mosaic cube to find the correct
output band to mosaic the input band into.  This will work
even if the input cube does not have the same number of
bands as the output cube.  If this is turned off, MERMOS
assumes a one to one correspondence in the band dimension
between the input cube and the mosaic cube.  The input cube
and the output mosaic must have the same number of bands
if BANDCHK=NO.  In other words band 1 of the input cube will
be mosaicked into band 1 of the mosaic cube and so on up to
the nth band.
HIST
Disable the processing history text.  This will improve the
efficiency if a large mosaic is being created.
OPTION
If OPTION=MAP, the mapping parameters from the labels are
used to position input cube.
If OPTION=RECT, the SLM and SSM of where the input cube is
to be placed in the mosaic must be entered.
If OPTION=TVREG, a data file created by TVREG is used to
position the input cube.
SLM
This parameter is used when OPTION=RECT.  This is the
starting line for the FROM cube to be placed on the TO
cube. If SLM = 1 then the FROM cube would be placed at the
top of the TO cube.  The SLM can be negative, so that the
FROM cube would start off the edge of the TO cube.  For
instance if SLM were -10 then the first 10 lines of the FROM
cube would be cut off and line 11 would be the first line of
the TO cube.
SSM
This parameter is used when OPTION=RECT.  This is the
starting sample for the FROM cube to be placed on the TO
cube. If SSM = 1 then the FROM cube would be placed at the
top of the TO cube.  The SSM can be negative, so that the
FROM cube would start off the edge of the TO cube.  For
instance if SSM were -10 then the first 10 samples of the
FROM cube would be cut off and sample 11 would be the first
sample of the TO cube.
TOP
This option specifies whether to put the FROM cube on top of
the mosaic or underneath the mosaic.  If TOP=Y, the program
will overlay all non-empty pixels on top of the existing
data in the mosaic cube.  An empty pixel is one which is 0
DN for 8-bit data, the NULL value for 16-bit data, and the
null flag (all bits on) for 32-bit real data.  For example,
if the FROM cube had a blank area around the outside of the
actual data which was zeroes, then any data that was already
in the TO cube would "show through" this blank area even
though the FROM cube goes on top.
NOTE: When TOP=N MOSALL will be set to "N".
MOSALL
This option will specify to mosaic null data as well as
non-null data. Thus, with this option all of the data in the
input cube, regardless of whether the data is null or not,
is moved to the output cube.  NOTE: When TOP=N, MOSALL will
be set to "N".
MOSSAT
This option specifies whether mosaic will put LOW_REPR_SAT,
LOW_INSTR_SAT, HIGH_REPR_SAT and HIGH_INSTR_SAT pixels from
the input cube onto the mosaic cube.  If MOSSAT=NO, then
the standard mosaic rules outlined in the graphs in the
general help hold true.  If MOSSAT=YES, then any low and
high sat values from the input cube will be overlayed onto
the mosaic no matter what the mosaic pixel value is.
INIT
If INIT = Y, an output cube will be created called the name
given in TO.  The cube will be all zeros with the size of
the output cube determined by NLM, NSM and NBAND or the
output latitude and longitude range and the mapping
parameters in the input cube.

If INIT = N, it is assumed the TO cube already exists.

When mosaicking a number of cubes, the first to be mosaicked
should use INIT = Y to create a cube big enough to hold all
the cubes in the mosaic. This can be done one of two ways.
The first would initialize the output cube to have the
spatial size indicated by NLM and NSM and the number of
bands equal to the number of bands in the input cube.  If
you want to create a mosaic cube with more bands in the
mosaic cube than in the input cube, you must use the Table
File option.  After intialization, TO will be the same, and
INIT = N should be used for all the other cubes entered into
the mosaic.
NIMGS
This is the number of input images which will make up the
final mosaic.  This is used to allocate enough room in the
history object.  If there is no room in the history object
when mosaicking an input image, a warning will be issued
indicating that no history entry for this image will be
entered, but the image will be put into the mosaic.

NLM
This parameter is used only if INIT=Y.

For OPTION=RECT or OPTION=TVREG, this defines the number of
lines needed in the TO cube.  This cube should be made big
enough to hold all of the images to be mosaicked.

For OPTION=MAP, this parameter will override the computed
number of lines for the mosaic that is done during
intialization.  In the polar example give for OUTPNT below,
if the image is in the upper left corner NLM can be used to
cut down the number of lines in the mosaic.
NSM
This parameter is used only if INIT=Y.

For OPTION=RECT or OPTION=TVREG, this defines the number of
samples needed in the TO cube.  This cube should be made big
enough to hold all the images to be mosaicked.

For OPTION=MAP, this parameter will override the computed
number of samples for the mosaic that is done during
intialization.  In the polar example give for OUTPNT below,
if the image is in the upper left corner NSM can be used to
cut down the number of samples in the mosaic.

NBM
This parameter is used only if INIT=Y.

This defines the number of bands needed in the TO cube.  The
default will intialize a mosaic cube with the same number of
bands as the input cube.  If you want the mosaic cube to
have more bands than the input cube, you must use the Table
File option.
XRANGE
This parameter is used only if OPTION=MAP and INIT=Y.
X range of the mosaic.  The default will use the
X range of the first input cube of the mosaic.  The
range should be large enough to include all of the cubes to
be mosaicked.   XRANGE is ignored if INIT=N.
YRANGE
This parameter is used only if OPTION=MAP and INIT=Y.
Y range of the mosaic.  The default will use the
Y range of the first input cube of the mosaic.  The
range should be large enough to include all of the cubes to
be mosaicked.  YRANGE is ignored if INIT=N.
ELRANGE
The default procedure is to automatically find the elevation
and azimuth range of the cube.  (zero=horizontal,-90=down)
AZRANGE
See EL.
PROPLEV1
If INIT=YES, then the level 1 keyword groups
(ISIS_INSTRUMENT, ISIS_GEOMETRY, ISIS_TARGET) will be
propagated to the mosaic file if PROPLEV1=YES.

Last updated: Jan 31 2005
File: pdfs2.html

Contact us online at the Isis Support Center: http://isisdist.wr.usgs.gov

ISIS Documentation Home Page