gov.nasa.pds.objectAccess
Class TwoDImageExporter

java.lang.Object
  extended by gov.nasa.pds.objectAccess.ObjectExporter
      extended by gov.nasa.pds.objectAccess.TwoDImageExporter
Type Parameters:
T -
All Implemented Interfaces:
Exporter<Array2DImage>

public class TwoDImageExporter
extends ObjectExporter
implements Exporter<Array2DImage>

Class for converting 2D PDS images.

Author:
dcberrio

Method Summary
 void convert(Array2DImage array2DImage, OutputStream outputStream)
          Converts a 2D array file to a viewable image file.
 void convert(OutputStream outputStream, int objectIndex)
          Converts the object at index objectIndex into the desired export type.
 Array2DImage getArray2DImage()
          Get the Array 2D Image
 String getExportType()
          Get the export image format
 int getTargetPixelDepth()
          Return the target image pixel depth in bits
 boolean 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 depth
 void maximizeDynamicRange(boolean dynamicRangeScaling)
          Set whether or not input data elements are scaled up to the maximum pixel bit depth
 void setArray2DImage(Array2DImage img)
          Set the Array 2D Image
 void setExportType(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.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(OutputStream outputStream,
                    int objectIndex)
             throws IOException
Description copied from interface: Exporter
Converts the object at index objectIndex into the desired export type.

Specified by:
convert in 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:
IOException

convert

public void convert(Array2DImage array2DImage,
                    OutputStream outputStream)
             throws IOException
Converts a 2D array file to a viewable image file.

Specified by:
convert in interface Exporter<Array2DImage>
Parameters:
outputFile - (the output file)
array2DImage - the array2DImage object to convert
Throws:
IOException

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 String getExportType()
Get the export image format

Returns:
exportType the export image format

setExportType

public void setExportType(String exportType)
Set the export image format. The format is limited to those supported by Java.

Specified by:
setExportType in interface Exporter<Array2DImage>
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 -

getArray2DImage

public Array2DImage getArray2DImage()
Get the Array 2D Image

Returns:
pdsImage

setArray2DImage

public void setArray2DImage(Array2DImage img)
Set the Array 2D Image

Parameters:
img -


Copyright © 2013. All Rights Reserved.