Package gov.nasa.pds.objectAccess
Class TwoDImageExporter
- java.lang.Object
- 
- gov.nasa.pds.objectAccess.ObjectExporter
- 
- gov.nasa.pds.objectAccess.ImageExporter
- 
- gov.nasa.pds.objectAccess.TwoDImageExporter
 
 
 
- 
- All Implemented Interfaces:
- Exporter<Array2DImage>
 
 public class TwoDImageExporter extends ImageExporter implements Exporter<Array2DImage> Class for converting 2D PDS images.- Author:
- dcberrio, mcayanan
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconvert(Array2DImage array2DImage, java.io.OutputStream outputStream)Converts a 2D array file to a viewable image file.voidconvert(java.io.OutputStream outputStream, int objectIndex)Converts the object at index objectIndex into the desired export type.Array2DImagegetArray2DImage()Get the Array 2D Imagejava.lang.StringgetExportType()Get the export image formatintgetTargetPixelDepth()Return the target image pixel depth in bitsbooleanisFirstIndexFastest()Is the first index fastest?booleanisSampleDirectionRight()Is the sample direction to the right?booleanmaximizeDynamicRange()Get whether or not input data elements are scaled up to the target pixel bit depthvoidmaximizeDynamicRange(boolean dynamicRangeScaling)Set whether or not input data elements are scaled up to the maximum pixel bit depthvoidsetArray2DImage(Array2DImage img)Set the Array 2D ImagevoidsetExportType(java.lang.String exportType)Set the export image format.voidsetFirstIndexFastest(boolean firstIndexFastest)Set whether the first index is fastest.voidsetSampleDirectionRight(boolean sampleDirectionRight)Set the sample direction.voidsetTargetPixelDepth(int targetPixelDepth)Set the target pixel bit depth- 
Methods inherited from class gov.nasa.pds.objectAccess.ImageExportergetDisplaySettings, parseLabel, parseLabel, parseLabel, parseLabel, setDisplaySettings
 - 
Methods inherited from class gov.nasa.pds.objectAccess.ObjectExportergetObjectProvider, getObservationalFileArea, setObjectProvider, setObservationalFileArea
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface gov.nasa.pds.objectAccess.ExportersetObjectProvider, setObservationalFileArea
 
- 
 
- 
- 
- 
Method Detail- 
convertpublic void convert(java.io.OutputStream outputStream, int objectIndex) throws java.io.IOExceptionDescription copied from interface:ExporterConverts the object at index objectIndex into the desired export type.- Specified by:
- convertin interface- Exporter<Array2DImage>
- Parameters:
- outputStream- the output stream for the output object
- objectIndex- the index of the input object of type T in the associated observational file area
- Throws:
- java.io.IOException
 
 - 
convertpublic void convert(Array2DImage array2DImage, java.io.OutputStream outputStream) throws java.io.IOException Converts a 2D array file to a viewable image file.- Specified by:
- convertin interface- Exporter<Array2DImage>
- Parameters:
- outputStream- the output stream
- array2DImage- the array2DImage object to convert
- Throws:
- java.io.IOException- if there is an exception writing to the stream or reading the image
 
 - 
getTargetPixelDepthpublic int getTargetPixelDepth() Return the target image pixel depth in bits- Returns:
- targetPixelBitDepth
 
 - 
setTargetPixelDepthpublic void setTargetPixelDepth(int targetPixelDepth) Set the target pixel bit depth- Parameters:
- targetPixelDepth- the target pixel bit depth
 
 - 
maximizeDynamicRangepublic boolean maximizeDynamicRange() Get whether or not input data elements are scaled up to the target pixel bit depth- Returns:
- boolean
 
 - 
maximizeDynamicRangepublic void maximizeDynamicRange(boolean dynamicRangeScaling) Set whether or not input data elements are scaled up to the maximum pixel bit depth- Parameters:
- dynamicRangeScaling-
 
 - 
getExportTypepublic java.lang.String getExportType() Get the export image format- Returns:
- exportType the export image format
 
 - 
setExportTypepublic void setExportType(java.lang.String exportType) Set the export image format. The format is limited to those supported by Java.- Specified by:
- setExportTypein interface- Exporter<Array2DImage>
- Parameters:
- exportType- the export image format
 
 - 
isSampleDirectionRightpublic boolean isSampleDirectionRight() Is the sample direction to the right?- Returns:
- sampleDirectionRight
 
 - 
setSampleDirectionRightpublic void setSampleDirectionRight(boolean sampleDirectionRight) Set the sample direction.- Parameters:
- sampleDirectionRight-
 
 - 
isFirstIndexFastestpublic boolean isFirstIndexFastest() Is the first index fastest?- Returns:
- firstIndexFastest
 
 - 
setFirstIndexFastestpublic void setFirstIndexFastest(boolean firstIndexFastest) Set whether the first index is fastest.- Parameters:
- firstIndexFastest-
 
 - 
getArray2DImagepublic Array2DImage getArray2DImage() Get the Array 2D Image- Returns:
- pdsImage
 
 - 
setArray2DImagepublic void setArray2DImage(Array2DImage img) Set the Array 2D Image- Parameters:
- img-
 
 
- 
 
-