Exercises 1

From Isis Workshop

Jump to: navigation, search

Contents

[edit] Before We Start

You should download Peaks.cub[1] as a test image. It is a 1024x1024 image with 7 bands and it has 19 LRS special pixels.


[edit] Setup

Create the following directory path under your home area:

 isis3/isis/src/base/apps/mirror

[edit] Task 1

1. Browse the Isis Website

  1.1 Examine the user documentation
  1.2 Examine the programmer documentation(Technical documents)

2. Look at the Isis 3 directory structure

  2.1 Type command setisis isis3nightly
  2.2 Look at $ISISROOT/src/base/apps
  2.3 Look at $ISISROOT/src/base/objs

[edit] Task 2

 1. Copy the mirror application(mirror.cpp, mirror.xml, Makefile) from $ISISROOT/src/base/mirror into the directory 
    created in the Setup
 2. Type 'make' to build the program
 3. Run 'mirror' using the input file Media:Sample.cub [click to download]
 4. Look at the results with qview
 5. Modify the mirror program so that every other sample in the image is set to zero
 6. Verify the results with qview

[edit] Task 3

 1. Modify the mirror program so that every other line in the image is set to zero [Hint: Use a global variable then 
    later use the appropriate method in the Buffer class]
 2. Verify the results with qview

[edit] Task 4

 1. Add a parameter so that the user can pick either zero or Isis::Null as the output DN. You will need to modify the xml
    file to accomplish this [Hint: Look at a different Isis application for guidance]
 2. Verify the results with qview

[edit] Task 5

 1. Modify the program to compute the average and standard deviation of the output image. To start with just write the
    values using the C++ cout stream. [Hint: See the Statistics class]
 2. Next put the average and standard deviaton in a PvlGroup and write it to the log file(print.prt) [Hint: See the
    Application class]

[edit] Task 6

 1. Use the Unix 'more' utility to look at the labels in the beginning of the cube
 2. Modify the program to add the average and standard deviation into the labels [Hint: Look at the Process and the 
    Cube classes]

Image:Example.jpg

Personal tools
Work Shops