## org.autoplot.imagedatasource.ImageDataSourceFormat

Format data to RGB images, or ARGB images. Formatter presumes data is:

- (m,n,4) for ARGB
- (3,m,n) RGB. (this should not be used)
- (m,n,3) RGB.

When data is (m,n,4) then ds[:,:,0] should be the alpha channel, [:,:,1] should be the red channel, and so on.

## ImageDataSourceFormat( )

## canFormat

canFormat( QDataSet ds ) → boolean

### Parameters

ds - a QDataSet

### Returns:

boolean
[search for examples] [view on GitHub] [view on old javadoc]

## formatData

formatData( String uri, QDataSet data, ProgressMonitor mon ) → void

### Parameters

uri - a String
data - a QDataSet
mon - a ProgressMonitor

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]

## fromHSVtoRGB

fromHSVtoRGB( QDataSet hsv ) → QDataSet

convert HSV QDataSet to RGB. The input should be a rank 3 dataset with rows for the first index, columns for the second index, and 3 indeces for the last index:

- H, the hue, should vary from 0 to 360.
- S, the Saturation, should vary from 0 to 100.
- V, the Value, should vary from 0 to 100.

### Parameters

hsv - rank 3, [rows;columns;h,s,v] dataset.

### Returns:

rank 3, [rows;columns;r,g,b] dataset.

### See Also:

java.awt.Color#HSBtoRGB(float, float, float) where this code was found and converted to QDataSet.
fromRGBtoHSV(QDataSet)
[search for examples] [view on GitHub] [view on old javadoc]

## fromRGBtoHSV

fromRGBtoHSV( QDataSet rgb ) → QDataSet

Converts the components of a color, as specified by the default RGB model, to an equivalent set of values for hue, saturation, and brightness that are the three components of the HSB model. NOTE these values will be a bit different than those returned by ImageDataSource's hue, saturation, and value channels, because of slightly different mappings.

### Parameters

rgb - a QDataSet

### Returns:

hsv array [h,w,3]

### See Also:

java.awt.Color#RGBtoHSB(int, int, int, float[])
fromHSVtoRGB(QDataSet)
[search for examples] [view on GitHub] [view on old javadoc]

## getDescription

getDescription( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc]