|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jpl.mipl.mars.viewer.util.AbstractMarsImageFileFinder jpl.mipl.mars.viewer.util.MerImageFileFinder
Purpose: Subclass of MarsImageFileFinder implementing some MER-specific methods and structure.
Copyright 2003, California Institute of Technology. ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledge. 2003.
============================================================================ Modification History : ---------------------- Date Who What ---------------------------------------------------------------------------- 08/23/2003 Nick Initial Release 01/20/2004 Nick Invrs LUT EDR (ILF, ISF, IDN, ITH) added Scaled Rad: RSD, RSL, RST, RSN added 07/14/2004 Nick Added Solar Energy type (SE{PLNT}) 11/11/2004 Nick Added Slope Magnitude type (SM{PLNT}) 11/11/2004 Nick Added Slope Heading type (SH{PLNT}) ============================================================================
Field Summary | |
protected Pattern |
edr_pattern
|
protected Properties |
instrumentLookup
|
protected DecimalFormat |
solFormatter
|
protected static String[] |
sourceTypes
Known EDR source types |
protected static String[] |
thumbnailTypes
Known EDR/RDR thumbnail product types |
Fields inherited from class jpl.mipl.mars.viewer.util.AbstractMarsImageFileFinder |
_solRange, _treeRoot, _treeRootStr |
Fields inherited from interface jpl.mipl.mars.viewer.util.MarsImageFileFinder |
EDR_TYPE, RDR_TYPE |
Constructor Summary | |
MerImageFileFinder(String root)
Constructor. |
Method Summary | |
protected Pattern |
createRdrPattern(String filename)
Given an EDR filename, returns a Pattern object to be used to match RDR products which were produced from the EDR. |
String |
extractEyeType(String imgPath,
short type)
Returns the camera eye type as denoted by the file organization and the imgPath parameter. |
String |
extractImageType(String imgPath,
short type)
Returns the image type as denoted by the file organization and the imgPath parameter. |
Vector |
extractImageTypes(Vector imgPaths,
short type)
Returns the image types as denoted by the file organization and the imgPath parameters. |
String |
extractInstrument(String imgPath,
short type)
Returns the instrument type as denoted by the instrument identifying position in the filename |
Vector |
filterProducts(Vector edrs,
String instrument,
String fileType,
String eyeType,
boolean allowThumbs)
Returns a subset of entries from edrs vector which are of the same instrument as specified by instrumentName, and permitted by the allowThumbs flag. |
String |
formatSol(int sol)
Formats the SOL as a string based on the directory structure |
protected Vector |
getBestRdrs(Vector paths)
Removes previous versions of products, leaving only the greatest. |
String[] |
getCameraEyeTypes()
Returns a String array of camera eye types. |
String |
getEdrThumbnail(String edrPath)
Given a complete path to an EDR, returns the associated thumbnail path, if it exists. |
String[] |
getInstrumentTypes()
Returns a String array of instrument names. |
String[] |
getRdrTypes()
Returns a String array of RDR types. |
protected Vector |
grabMatchingRdr(String directory,
Pattern pattern)
Given a directory and a pattern, returns the best file matching that pattern. |
protected Vector |
grabMatchingRdrs(String directory,
String filename)
Convenience method that calls and returns value from grabMatchingRdr(String,Pattern) , with Pattern
object created from filename parameter. |
boolean |
isThumbnail(String imgFile)
Determines if image represented by imgFile is a thumbnail. |
boolean |
isThumbnailType(String type)
Determines if product type represented by type is a thumbnail. |
boolean |
isTypeNominal(String type)
Returns true if the type parameter is raw, false otherwise (e.g. |
boolean |
isTypeSource(String type)
Returns true if the type parameter is source, false otherwise. |
Methods inherited from class jpl.mipl.mars.viewer.util.AbstractMarsImageFileFinder |
equals, extractFilename, getEdrs, getInitialSol, getRdrs, getRoot, getRootFile, getSolRange, getSourceProductPath, getType, initSolRange, propertyChange, removeThumbnails, setRoot |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Pattern edr_pattern
protected DecimalFormat solFormatter
protected Properties instrumentLookup
protected static String[] thumbnailTypes
protected static String[] sourceTypes
Constructor Detail |
public MerImageFileFinder(String root) throws IOException
FileNotFoundException
- If directory specified by newRoot
parameter does not exist or cannot be read.
IOException
Method Detail |
protected Pattern createRdrPattern(String filename)
filename
- EDR filename or path
protected Vector grabMatchingRdrs(String directory, String filename) throws IOException
grabMatchingRdr(String,Pattern)
, with Pattern
object created from filename parameter.
directory
- Directory to be scanned.filename
- EDR filename
IOException
- if directory does not existprotected Vector grabMatchingRdr(String directory, Pattern pattern) throws IOException
directory
- Directory to be scanned.pattern
- Pattern object created from EDR
IOException
- if directory does not existpublic Vector filterProducts(Vector edrs, String instrument, String fileType, String eyeType, boolean allowThumbs)
filterProducts
in interface MarsImageFileFinder
filterProducts
in class AbstractMarsImageFileFinder
edrs
- Sets of EDR pathnames, specific to organization type.instrument
- Name of instrument, "" and null
for
all instruments.fileType
- EDR file type , "" and null
for
all file types.eyeType
- Camera eye type , "" and null
for
all camera eye types.allowThumbs
- Flag for thumbnails, if true thumbnails are
allowed, else they will be filtered out.
public boolean isThumbnail(String imgFile)
isThumbnail
in interface MarsImageFileFinder
isThumbnail
in class AbstractMarsImageFileFinder
imgFile
- Filename of the image.
public boolean isThumbnailType(String type)
AbstractMarsImageFileFinder
isThumbnailType
in interface MarsImageFileFinder
isThumbnailType
in class AbstractMarsImageFileFinder
type
- Product type.
public String[] getInstrumentTypes()
getInstrumentTypes
in interface MarsImageFileFinder
getInstrumentTypes
in class AbstractMarsImageFileFinder
public String[] getRdrTypes()
getRdrTypes
in interface MarsImageFileFinder
getRdrTypes
in class AbstractMarsImageFileFinder
public String[] getCameraEyeTypes()
getCameraEyeTypes
in interface MarsImageFileFinder
getCameraEyeTypes
in class AbstractMarsImageFileFinder
public String extractInstrument(String imgPath, short type)
extractInstrument
in interface MarsImageFileFinder
extractInstrument
in class AbstractMarsImageFileFinder
imgPath
- Filename or path of the edr/rdr file.type
- Type of file (choose from MarsImageFileFinder.EDR_TYPE,
MarsImageFileFinder.RDR_TYPE)
public String extractImageType(String imgPath, short type)
extractImageType
in interface MarsImageFileFinder
extractImageType
in class AbstractMarsImageFileFinder
imgPath
- Complete path of the edr file.type
- Type of file (choose from MarsImageFileFinder.EDR_TYPE,
MarsImageFileFinder.RDR_TYPE)
public Vector extractImageTypes(Vector imgPaths, short type)
extractImageTypes
in interface MarsImageFileFinder
extractImageTypes
in class AbstractMarsImageFileFinder
type
- Type of file (choose from MarsImageFileFinder.EDR_TYPE,
MarsImageFileFinder.RDR_TYPE)
public String extractEyeType(String imgPath, short type)
extractEyeType
in interface MarsImageFileFinder
extractEyeType
in class AbstractMarsImageFileFinder
imgPath
- Complete path of the edr file.type
- Type of file (choose from MarsImageFileFinder.EDR_TYPE,
MarsImageFileFinder.RDR_TYPE)
public String formatSol(int sol)
formatSol
in interface MarsImageFileFinder
formatSol
in class AbstractMarsImageFileFinder
protected Vector getBestRdrs(Vector paths)
paths
- Vector of product paths
public boolean isTypeNominal(String type)
isTypeNominal
in interface MarsImageFileFinder
isTypeNominal
in class AbstractMarsImageFileFinder
public boolean isTypeSource(String type)
isTypeSource
in interface MarsImageFileFinder
isTypeSource
in class AbstractMarsImageFileFinder
public String getEdrThumbnail(String edrPath)
getEdrThumbnail
in interface MarsImageFileFinder
getEdrThumbnail
in class AbstractMarsImageFileFinder
edrPath
- Absolute path of EDR file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |