Package gov.nasa.pds.objectAccess
Class ThreeDSpectrumExporter
- java.lang.Object
-
- gov.nasa.pds.objectAccess.ObjectExporter
-
- gov.nasa.pds.objectAccess.ImageExporter
-
- gov.nasa.pds.objectAccess.ThreeDSpectrumExporter
-
- All Implemented Interfaces:
Exporter<Array3DSpectrum>
public class ThreeDSpectrumExporter extends ImageExporter implements Exporter<Array3DSpectrum>
Class for converting PDS Array_3D_Spectrum products.- Author:
- mcayanan
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
convert(Array3DSpectrum array3DSpectrum, java.io.OutputStream outputStream)
Converts a 3D spectrum file to a viewable image file.void
convert(java.io.OutputStream outputStream, int objectIndex)
Converts the object at index objectIndex into the desired export type.Array3DSpectrum
getArray3DSpectrum()
Get the Array 3D Spectrumjava.lang.String
getExportType()
Get the export image formatint
getTargetPixelDepth()
Return the target image pixel depth in bitsboolean
isFirstIndexFastest()
Is the first index fastest?boolean
isSampleDirectionRight()
Is the sample direction to the right?boolean
maximizeDynamicRange()
Get whether or not input data elements are scaled up to the target pixel bit depthvoid
maximizeDynamicRange(boolean dynamicRangeScaling)
Set whether or not input data elements are scaled up to the maximum pixel bit depthvoid
setArray3DSpectrum(Array3DSpectrum img)
Set the Array 3D Spectrumvoid
setBands(java.util.List<java.lang.Integer> bands)
Set the bands to process.void
setExportType(java.lang.String exportType)
Set the export image format.void
setFirstIndexFastest(boolean firstIndexFastest)
Set whether the first index is fastest.void
setSampleDirectionRight(boolean sampleDirectionRight)
Set the sample direction.void
setTargetPixelDepth(int targetPixelDepth)
Set the target pixel bit depth-
Methods inherited from class gov.nasa.pds.objectAccess.ImageExporter
getDisplaySettings, parseLabel, parseLabel, parseLabel, parseLabel, setDisplaySettings
-
Methods inherited from class gov.nasa.pds.objectAccess.ObjectExporter
getObjectProvider, getObservationalFileArea, setObjectProvider, setObservationalFileArea
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nasa.pds.objectAccess.Exporter
setObjectProvider, setObservationalFileArea
-
-
-
-
Method Detail
-
convert
public void convert(java.io.OutputStream outputStream, int objectIndex) throws java.io.IOException
Description copied from interface:Exporter
Converts the object at index objectIndex into the desired export type.- Specified by:
convert
in interfaceExporter<Array3DSpectrum>
- Parameters:
outputStream
- the output stream for the output objectobjectIndex
- the index of the input object of type T in the associated observational file area- Throws:
java.io.IOException
-
convert
public void convert(Array3DSpectrum array3DSpectrum, java.io.OutputStream outputStream) throws java.io.IOException
Converts a 3D spectrum file to a viewable image file.- Specified by:
convert
in interfaceExporter<Array3DSpectrum>
- Parameters:
array3DSpectrum
- the array3DSpectrum object to convertoutputStream
- the output stream- Throws:
java.io.IOException
- if there is an exception writing to the stream or reading the image
-
getTargetPixelDepth
public int getTargetPixelDepth()
Return the target image pixel depth in bits- Returns:
- targetPixelBitDepth
-
setTargetPixelDepth
public void setTargetPixelDepth(int targetPixelDepth)
Set the target pixel bit depth- Parameters:
targetPixelDepth
- the target pixel bit depth
-
maximizeDynamicRange
public boolean maximizeDynamicRange()
Get whether or not input data elements are scaled up to the target pixel bit depth- Returns:
- boolean
-
maximizeDynamicRange
public void maximizeDynamicRange(boolean dynamicRangeScaling)
Set whether or not input data elements are scaled up to the maximum pixel bit depth- Parameters:
dynamicRangeScaling
-
-
getExportType
public java.lang.String getExportType()
Get the export image format- Returns:
- exportType the export image format
-
setExportType
public void setExportType(java.lang.String exportType)
Set the export image format. The format is limited to those supported by Java.- Specified by:
setExportType
in interfaceExporter<Array3DSpectrum>
- Parameters:
exportType
- the export image format
-
isSampleDirectionRight
public boolean isSampleDirectionRight()
Is the sample direction to the right?- Returns:
- sampleDirectionRight
-
setSampleDirectionRight
public void setSampleDirectionRight(boolean sampleDirectionRight)
Set the sample direction.- Parameters:
sampleDirectionRight
-
-
isFirstIndexFastest
public boolean isFirstIndexFastest()
Is the first index fastest?- Returns:
- firstIndexFastest
-
setFirstIndexFastest
public void setFirstIndexFastest(boolean firstIndexFastest)
Set whether the first index is fastest.- Parameters:
firstIndexFastest
-
-
getArray3DSpectrum
public Array3DSpectrum getArray3DSpectrum()
Get the Array 3D Spectrum- Returns:
- pdsImage
-
setArray3DSpectrum
public void setArray3DSpectrum(Array3DSpectrum img)
Set the Array 3D Spectrum- Parameters:
img
-
-
setBands
public void setBands(java.util.List<java.lang.Integer> bands)
Set the bands to process.- Parameters:
bands
- A list of bands.
-
-