[Exercises]
[Workspace]
Purpose:
The purpose of this lab exercise is to demonstrate uses of
the data object validity mask. In this exercise, you will add a
validity mask to an image, and then calculate the statistics of that
image. The validity mask will cause the statistics calculation to be
performed using valid image data points only.
Activities:
-
Read the image $DIP/data/echo.kdf and display it using the
operators "User defined" and Display Image.
-
Glyphs:Input/Output:Data Files:User defined
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Compute the statistics of the image using the Statistics operator.
-
Glyphs:Data Manip:Analysis & Information:Statistics
-
Glyphs:Input/Output:Information:File Viewer
-
Read the image $DIP/data/echo-mask.kdf and display it.
-
Copy the value data in "echo-mask.kdf" to the mask segment using
the Copy from Value operator with the "Mask" option selected. The
resultant image will have no value segment but will have a mask
segment.
-
Glyphs:Data Manip:Segment Operators:Copy from Value
-
Input this new file with only a mask segment into the first image
using the Insert Segments operator. Use the mask image as "Input 1" and
the echo image as "Input 2". The resultant image now has value and
mask segments.
-
Glyphs:Data Manip:Segment Operators:Insert Segments
-
Open the Insert Segments pane and set up the parameters so that
the "Mask" is inserted.
-
Display the new image and compute its statistics. Compare the
statistics with those of the unasked image. Also compare how the
images are displayed. Note that when you move the mouse cursor over
the masked areas in the image, the position is printed, but there is
no value associated with it.
Exercises
-
Compute the histograms of the original image and the new image
with a validity mask segment, and compare them.
Khoros Workspace
Execute the visual program c3s5mask-application-echo.wk
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved