Object
hdf.view.ImageView.DefaultImageView
ImageView displays an HDF dataset as an image.
A scalar dataset in HDF can be displayed in image or table. By default, an HDF4 GR image and HDF5 image is
displayed as an image. Other scalar datasets are display in a two-dimensional table.
Users can also choose to display a scalar dataset as image. Currently this version of the ImageView only
supports 8-bit raster image with indexed RGB color model of 256 colors or 24-bit true color raster image.
Data of other type will be converted to 8-bit integer. The simple linear conversion is used for this
purpose:
y = f * (x - min), where y = the value of 8-bit integer, x = the value of original data, f = 255/(max-min), conversion factor, max = the maximum of the original data, min = the minimum of the original data.A default color table is provided for images without palette attached to it. Current choice of default palettes include Gray, Rainbow, Nature and Wave. For more infomation on palette, read HDF5 Image and Palette Specification
- Version:
- 2.4 2//2016
- Author:
- Jordan T. Henderson
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
FlipFilter creates image filter to flip image horizontally or vertically.static class
Makes an image filter for rotating image by 90 degrees. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Horizontal direction to flip an image.static final int
Vertical direction to flip an image.static final int
ROTATE IMAGE COUNTER CLOCKWISE 90 DEGREE.static final int
ROTATE IMAGE 90 DEGREE CLOCKWISE.Fields inherited from interface hdf.view.DataView.DataView
DATAVIEW_IMAGE, DATAVIEW_TABLE, DATAVIEW_UNKNOWN
-
Constructor Summary
ConstructorDescriptionDefaultImageView
(DataViewManager theView) Constructs an ImageView.DefaultImageView
(DataViewManager theView, HashMap map) Constructs an ImageView. -
Method Summary
Modifier and TypeMethodDescriptionGet the data object displayed in this data viewergetImage()
Get the image displayed in this imageViewbyte[]
Get the byte array of the image databyte[][]
Get the palette of the imagereturns the selected area of the imageReturns the selected data values.boolean
Check if the image interlace is plane interlace.boolean
Check if the image is a truecolor image.void
Sets the imagevoid
setPalette
(byte[][] pal) Sets the image palette
-
Field Details
-
FLIP_HORIZONTAL
-
FLIP_VERTICAL
-
ROTATE_CW_90
-
ROTATE_CCW_90
-
-
Constructor Details
-
DefaultImageView
Constructs an ImageView.- Parameters:
theView
- the main HDFView.
-
DefaultImageView
Constructs an ImageView.- Parameters:
theView
- the main HDFView.map
- the properties on how to show the data. The map is used to allow applications to pass properties on how to display the data, such as, transposing data, showing data as character, applying bitmask, and etc. Predefined keys are listed at ViewProperties.DATA_VIEW_KEY.
-
-
Method Details
-
getImage
-
getDataObject
Description copied from interface:DataView
Get the data object displayed in this data viewer- Specified by:
getDataObject
in interfaceDataView
- Returns:
- the data object displayed in this data viewer
-
getImageByteData
Description copied from interface:ImageView
Get the byte array of the image data- Specified by:
getImageByteData
in interfaceImageView
- Returns:
- the byte array of the image data
-
getSelectedData
Returns the selected data values.- Specified by:
getSelectedData
in interfaceImageView
- Returns:
- the selected data object.
-
getSelectedArea
returns the selected area of the image- Specified by:
getSelectedArea
in interfaceImageView
- Returns:
- the rectangle of the selected image area.
-
isTrueColor
Description copied from interface:ImageView
Check if the image is a truecolor image.- Specified by:
isTrueColor
in interfaceImageView
- Returns:
- true if the image is a truecolor image.
-
isPlaneInterlace
Description copied from interface:ImageView
Check if the image interlace is plane interlace.- Specified by:
isPlaneInterlace
in interfaceImageView
- Returns:
- true if the image interlace is plance interlace.
-
setImage
-
getPalette
Description copied from interface:ImageView
Get the palette of the image- Specified by:
getPalette
in interfaceImageView
- Returns:
- the palette of the image
-
setPalette
Description copied from interface:ImageView
Sets the image palette- Specified by:
setPalette
in interfaceImageView
- Parameters:
pal
- the palette for the image to view
-