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
Nested ClassesModifier and TypeClassDescriptionstatic classFlipFilter creates image filter to flip image horizontally or vertically.static classMakes an image filter for rotating image by 90 degrees. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHorizontal direction to flip an image.static final intVertical direction to flip an image.static final intROTATE IMAGE COUNTER CLOCKWISE 90 DEGREE.static final intROTATE IMAGE 90 DEGREE CLOCKWISE.Fields inherited from interface hdf.view.DataView.DataView
DATAVIEW_IMAGE, DATAVIEW_TABLE, DATAVIEW_UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionDefaultImageView(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.booleanCheck if the image interlace is plane interlace.booleanCheck if the image is a truecolor image.voidSets the imagevoidsetPalette(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:DataViewGet the data object displayed in this data viewer- Specified by:
getDataObjectin interfaceDataView- Returns:
- the data object displayed in this data viewer
-
getImageByteData
Description copied from interface:ImageViewGet the byte array of the image data- Specified by:
getImageByteDatain interfaceImageView- Returns:
- the byte array of the image data
-
getSelectedData
Returns the selected data values.- Specified by:
getSelectedDatain interfaceImageView- Returns:
- the selected data object.
-
getSelectedArea
returns the selected area of the image- Specified by:
getSelectedAreain interfaceImageView- Returns:
- the rectangle of the selected image area.
-
isTrueColor
Description copied from interface:ImageViewCheck if the image is a truecolor image.- Specified by:
isTrueColorin interfaceImageView- Returns:
- true if the image is a truecolor image.
-
isPlaneInterlace
Description copied from interface:ImageViewCheck if the image interlace is plane interlace.- Specified by:
isPlaneInterlacein interfaceImageView- Returns:
- true if the image interlace is plance interlace.
-
setImage
-
getPalette
Description copied from interface:ImageViewGet the palette of the image- Specified by:
getPalettein interfaceImageView- Returns:
- the palette of the image
-
setPalette
Description copied from interface:ImageViewSets the image palette- Specified by:
setPalettein interfaceImageView- Parameters:
pal- the palette for the image to view
-