gov.nih.mipav.model.file
Class FileUtility

java.lang.Object
  extended by gov.nih.mipav.model.file.FileUtility

public class FileUtility
extends Object

Constants and static methods which relate to file input, output or processing.


Field Summary
static int AFNI
          AFNI file type. extension: .head, .brik
static int ANALYZE
          Analyze format (Mayo). extension: .img, .hdr
static int ANALYZE_MULTIFILE
          Multiple files of type analyze.
static int AVI
          AVI file type.
static int BFLOAT
          Extension: .hdr for header, .bfloat for data
static int BIORAD
          Used by the Bio-Rad Pic format. extension: .pic && fileID(54L)==12345
static int BMP
          extension: .bmp.
static int BRUKER
          Bruker file format.
static int CHESHIRE
          Cheshire file type (a kind of Analyze). extension: .imc Can also have .img extension
static int CHESHIRE_OVERLAY
          Cheshire overlay file type.
static int COR
          Used by FreeSurfer software. extension: -.info or -.info~ for header file -.nnn for slice data file where nnn is the slice number
static int CUR
          extension: .cur.
static int DIB
          extension: .dib.
static int DICOM
          Digital Imaging and COmmunications in Medicine file type.
static int DM3
          Gatan's Digital Micrograph version 3 file format. extension: .dm3
static int ERROR
          Ill defined file type.
static int FITS
          FITS file type. extension: .fits
static int GE_GENESIS
          GE Genesis 5X and LX. extension: .sig
static int GE_GENESIS_MULTIFILE
          Multiple files of type GE_GENESIS
static int GE_SIGNA4X
          GE Signa 4.x.
static int GE_SIGNA4X_MULTIFILE
          Multiple files of type GE_SIGNA4X
static int GIF
          extension: .gif.
static int ICO
          extension: .ico.
static int ICS
          Image Cytometry Standard. extension: .ics, .ids
static int INTERFILE
          Interfile file format used in Nuclear Medicine. extension: .hdr
static int JIMI
          Java Image Manangement Interface file type.
static int JP2
           
static int JPEG
          extension: .jpeg, .jpg.
static int LIFF
          Do not confuse with Leica image file format .lif
static int LSM
          Used by the Zeiss LSM 510 Dataserver. extension: .lsm
static int LSM_MULTIFILE
          Used by the Zeiss LSM 510 Dataserver.
static int MAGNETOM_VISION
          Siemens MAGNETOM VISION. extension: .ima
static int MAGNETOM_VISION_MULTIFILE
          Multiple files of type MAGNETOM_VISION
static int MAP
          Benes Trus special file type. extension: .map
static int MEDIVISION
          extension: .bin.
static int MGH
          MGH/MGZ volume format.
static int MICRO_CAT
          Micro CT format for small animal imaging. extension: .log, .ct
static int MINC
          MINC file type.
static int MINC_HDF
          MINC 2.0 (HDF5)
static int MIPAV
          Not presently implemented.
static int MRC
          extension: .mrc.
static int NIFTI
          NIFTI format. extension: .img, .hdr, .nii
static int NIFTI_MULTIFILE
          NIFTI multi-file format.
static int NRRD
          Nearly raw raster data.
static int OSM
          Washington University OSM dataset structure. extension: .wu
static int PARREC
          extension: "par","parv2","rec","frec".
static int PCX
          extension: .pcx.
static int PIC
          extension: .pic.
static int PICT
          extension: .pict.
static int PNG
          extension: .png.
static int PROJECT
          MIPAV project format. project file format (.xml)
static int PSD
          extension: .psd.
static int QT
          Quicktime file type. extension: .mov, .qt
static int RAW
          RAW image data, no header. extension: .raw
static int RAW_MULTIFILE
          RAW MULTIFLE image data, no header.
static int SPM
          SPM file format.
static int STK
          MetaMorph Stack (STK) file type. extension: .stk
static int SURFACE_XML
          MIPAV Surface XML file format. extension: .xml
static int SURFACEREF_XML
          MIPAV Surface XML file format. extension: .xml
static int TGA
          extension: .tga.
static int TIFF
          TIFF file; tagged header. extension: .tif, .tiff
static int TIFF_MULTIFILE
          Multiple files of TIFF images.
static int TMG
          Optical coherence tomography. extension: .tmg
static int UNDEFINED
          Undefined file type.
static int VOI_FILE
          VOI file, used to read VOIs. extension: .voi
static int XBM
          extension: .xbm.
static int XML
          MIPAV XML file format. mipav xml image format. extension: .xml
static int XML_MULTIFILE
          MIPAV XML file format.
static int XPM
          extension: .xpm.
 
Constructor Summary
FileUtility()
           
 
Method Summary
static String[] getCORFileList(String fileDir, String fileName, boolean quiet)
          Only for FreeSurfer COR volume files Looks in the image directory and returns all images with the same root up to the hyphen, sorted in lexicographical order.
static String getCORSuffixFrom(String fn)
          Only used for COR volume files with hyphen in name Breaks the filename into basename and suffix, then returns the suffix.
static String getExtension(String absolutePath)
          Returns the extension of the file name, if file name does not have extension, then return empty string.
static String getFileDirectory(String fileName)
          Returns the path information from the file name with the path information.
static int getFileIndex(String fName)
          Trims off the file extension and file name, but leaves the file index.
static String[] getFileList(String fileDir, String fileName, boolean quiet)
          Looks in the image directory and returns all images with the same suffix as fileName, sorted in lexicographical order.
static String getFileName(String absolutePath)
          Returns the file name without path information from file name with the path information.
static List<String> getFileNameList(ModelImage image)
          Gets the file name list from which this ModelImage is opened.
static int getFileType(String fileName, String fileDir, boolean quiet)
          Sets the FileBase.
static int getFileType(String fileName, String fileDir, boolean doWrite, boolean quiet)
          Sets the FileBase.
static int getFileTypeFromStr(String s)
          Returns the file type associated with a string.
static String getFileTypeStr(int m)
          Return the string associated with a file type.
static int isAnalyzeOrSPM(String fileName, String fileDir, boolean quiet)
          Tests if the unknown file is of type Analyze.
static int isDicom_ver2(String fileName, String fileDir, boolean quiet)
          tests if unknown file is of type 2.0 dicom
static int isDicom(String fileName, String fileDir, boolean quiet)
          Tests if the unknown file is of type Dicom.
static int isGESigna4X(String fileName, String fileDir, boolean quiet)
          Tests if the unknown file is of type GE Signa 4X type.
static int isGESigna5X(String fileName, String fileDir, boolean quiet)
          Tests if the unknown file is of type GE Signa 5X type.
static int isInterfile(String fileName, String fileDir, boolean quiet)
          Tests if the unknown file is of type Interfile.
static int isMagnetomVision(String fileName, String fileDir, boolean quiet)
          Tests if the unknown file is of type Siemens Magnetom Vision.
static int isMinc(String fileName, String fileDir, boolean quiet)
          Tests if the unknown file is of type Minc.
static int isMincHDF(String fileName, String fileDir, boolean quiet)
          Determines whether the file on disk is of type MINC 2.0
static int isNIFTI(String fileName, String fileDir, boolean quiet)
          Tests if the unknown file is of type Nifti.
static int isSPM(String fileName, String fileDir, boolean quiet)
          Tests if the unknown file is of type SPM.
static String stripExtension(String fileName)
          Helper method to strip the image name of the extension, so when we save we don't have double extensions (like genormcor.img.tif).
static String trimCOR(String fName)
          Trims the numbers or file extension from COR file names.
static String trimNumbersAndSpecial(String fName)
          Trims the numbers and special character from the file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR

public static final int ERROR
Ill defined file type.

See Also:
Constant Field Values

UNDEFINED

public static final int UNDEFINED
Undefined file type.

See Also:
Constant Field Values

AFNI

public static final int AFNI
AFNI file type. extension: .head, .brik

See Also:
Constant Field Values

ANALYZE

public static final int ANALYZE
Analyze format (Mayo). extension: .img, .hdr

See Also:
Constant Field Values

ANALYZE_MULTIFILE

public static final int ANALYZE_MULTIFILE
Multiple files of type analyze.

See Also:
Constant Field Values

AVI

public static final int AVI
AVI file type. Windows Media. extension: .avi

See Also:
Constant Field Values

BIORAD

public static final int BIORAD
Used by the Bio-Rad Pic format. extension: .pic && fileID(54L)==12345

See Also:
Constant Field Values

BMP

public static final int BMP
extension: .bmp.

See Also:
Constant Field Values

BRUKER

public static final int BRUKER
Bruker file format. Reads a BRUKER file by first reading in the d3proc header file, second the reco header file, third the acqp file int the same directory or up one or two two parent directories, and finally the 2dseq binary file.

See Also:
Constant Field Values

CHESHIRE

public static final int CHESHIRE
Cheshire file type (a kind of Analyze). extension: .imc Can also have .img extension

See Also:
Constant Field Values

CHESHIRE_OVERLAY

public static final int CHESHIRE_OVERLAY
Cheshire overlay file type. Contains VOIs. extension: .oly

See Also:
Constant Field Values

COR

public static final int COR
Used by FreeSurfer software. extension: -.info or -.info~ for header file -.nnn for slice data file where nnn is the slice number

See Also:
Constant Field Values

CUR

public static final int CUR
extension: .cur.

See Also:
Constant Field Values

DIB

public static final int DIB
extension: .dib.

See Also:
Constant Field Values

DICOM

public static final int DICOM
Digital Imaging and COmmunications in Medicine file type. Fully implemented versions 2 & 3. extension: .dcm

See Also:
Constant Field Values

DM3

public static final int DM3
Gatan's Digital Micrograph version 3 file format. extension: .dm3

See Also:
Constant Field Values

FITS

public static final int FITS
FITS file type. extension: .fits

See Also:
Constant Field Values

GE_GENESIS

public static final int GE_GENESIS
GE Genesis 5X and LX. extension: .sig

See Also:
Constant Field Values

GE_GENESIS_MULTIFILE

public static final int GE_GENESIS_MULTIFILE
Multiple files of type GE_GENESIS

See Also:
Constant Field Values

GE_SIGNA4X

public static final int GE_SIGNA4X
GE Signa 4.x.

See Also:
Constant Field Values

GE_SIGNA4X_MULTIFILE

public static final int GE_SIGNA4X_MULTIFILE
Multiple files of type GE_SIGNA4X

See Also:
Constant Field Values

GIF

public static final int GIF
extension: .gif.

See Also:
Constant Field Values

ICO

public static final int ICO
extension: .ico.

See Also:
Constant Field Values

ICS

public static final int ICS
Image Cytometry Standard. extension: .ics, .ids

See Also:
Constant Field Values

INTERFILE

public static final int INTERFILE
Interfile file format used in Nuclear Medicine. extension: .hdr

See Also:
Constant Field Values

JIMI

public static final int JIMI
Java Image Manangement Interface file type.

See Also:
Constant Field Values

JPEG

public static final int JPEG
extension: .jpeg, .jpg.

See Also:
Constant Field Values

LSM

public static final int LSM
Used by the Zeiss LSM 510 Dataserver. extension: .lsm

See Also:
Constant Field Values

LSM_MULTIFILE

public static final int LSM_MULTIFILE
Used by the Zeiss LSM 510 Dataserver.

See Also:
Constant Field Values

MAGNETOM_VISION

public static final int MAGNETOM_VISION
Siemens MAGNETOM VISION. extension: .ima

See Also:
Constant Field Values

MAGNETOM_VISION_MULTIFILE

public static final int MAGNETOM_VISION_MULTIFILE
Multiple files of type MAGNETOM_VISION

See Also:
Constant Field Values

MAP

public static final int MAP
Benes Trus special file type. extension: .map

See Also:
Constant Field Values

MEDIVISION

public static final int MEDIVISION
extension: .bin.

See Also:
Constant Field Values

MGH

public static final int MGH
MGH/MGZ volume format.

See Also:
Constant Field Values

MICRO_CAT

public static final int MICRO_CAT
Micro CT format for small animal imaging. extension: .log, .ct

See Also:
Constant Field Values

MINC

public static final int MINC
MINC file type. MINC is a medical imaging oriented extension of the NetCDF file format. NetCDF stands for 'Network Common Data Form'. extension: .mnc

See Also:
Constant Field Values

MIPAV

public static final int MIPAV
Not presently implemented.

See Also:
Constant Field Values

MRC

public static final int MRC
extension: .mrc.

See Also:
Constant Field Values

NIFTI

public static final int NIFTI
NIFTI format. extension: .img, .hdr, .nii

See Also:
Constant Field Values

NIFTI_MULTIFILE

public static final int NIFTI_MULTIFILE
NIFTI multi-file format.

See Also:
Constant Field Values

NRRD

public static final int NRRD
Nearly raw raster data.

See Also:
Constant Field Values

OSM

public static final int OSM
Washington University OSM dataset structure. extension: .wu

See Also:
Constant Field Values

PCX

public static final int PCX
extension: .pcx.

See Also:
Constant Field Values

PIC

public static final int PIC
extension: .pic.

See Also:
Constant Field Values

PICT

public static final int PICT
extension: .pict.

See Also:
Constant Field Values

PNG

public static final int PNG
extension: .png.

See Also:
Constant Field Values

PROJECT

public static final int PROJECT
MIPAV project format. project file format (.xml)

See Also:
Constant Field Values

PSD

public static final int PSD
extension: .psd.

See Also:
Constant Field Values

QT

public static final int QT
Quicktime file type. extension: .mov, .qt

See Also:
Constant Field Values

RAW

public static final int RAW
RAW image data, no header. extension: .raw

See Also:
Constant Field Values

RAW_MULTIFILE

public static final int RAW_MULTIFILE
RAW MULTIFLE image data, no header.

See Also:
Constant Field Values

SPM

public static final int SPM
SPM file format. SPM99 and SPM2 are slight variants of analyze with the same .img, .hdr file extensions. The user could also change the extension .img to .spm to indicate SPM. The header extension would remain .hdr

See Also:
Constant Field Values

STK

public static final int STK
MetaMorph Stack (STK) file type. extension: .stk

See Also:
Constant Field Values

SURFACE_XML

public static final int SURFACE_XML
MIPAV Surface XML file format. extension: .xml

See Also:
Constant Field Values

TGA

public static final int TGA
extension: .tga.

See Also:
Constant Field Values

TIFF

public static final int TIFF
TIFF file; tagged header. extension: .tif, .tiff

See Also:
Constant Field Values

TIFF_MULTIFILE

public static final int TIFF_MULTIFILE
Multiple files of TIFF images.

See Also:
Constant Field Values

TMG

public static final int TMG
Optical coherence tomography. extension: .tmg

See Also:
Constant Field Values

VOI_FILE

public static final int VOI_FILE
VOI file, used to read VOIs. extension: .voi

See Also:
Constant Field Values

XBM

public static final int XBM
extension: .xbm.

See Also:
Constant Field Values

XML

public static final int XML
MIPAV XML file format. mipav xml image format. extension: .xml

See Also:
Constant Field Values

XML_MULTIFILE

public static final int XML_MULTIFILE
MIPAV XML file format.

See Also:
Constant Field Values

XPM

public static final int XPM
extension: .xpm.

See Also:
Constant Field Values

PARREC

public static final int PARREC
extension: "par","parv2","rec","frec".

See Also:
Constant Field Values

SURFACEREF_XML

public static final int SURFACEREF_XML
MIPAV Surface XML file format. extension: .xml

See Also:
Constant Field Values

MINC_HDF

public static final int MINC_HDF
MINC 2.0 (HDF5)

See Also:
Constant Field Values

LIFF

public static final int LIFF
Do not confuse with Leica image file format .lif

See Also:
Constant Field Values

BFLOAT

public static final int BFLOAT
Extension: .hdr for header, .bfloat for data

See Also:
Constant Field Values

JP2

public static final int JP2
See Also:
Constant Field Values
Constructor Detail

FileUtility

public FileUtility()
Method Detail

getFileTypeFromStr

public static int getFileTypeFromStr(String s)
Returns the file type associated with a string.

Parameters:
s - String to test
Returns:
axis orientation

getFileTypeStr

public static String getFileTypeStr(int m)
Return the string associated with a file type.

Parameters:
m - int representing the file type (see the above static definitions)
Returns:
String representing the string associated with the file type.

getCORFileList

public static final String[] getCORFileList(String fileDir,
                                            String fileName,
                                            boolean quiet)
                                     throws OutOfMemoryError
Only for FreeSurfer COR volume files Looks in the image directory and returns all images with the same root up to the hyphen, sorted in lexicographical order. Will set the number of images (nImages) for the calling program.

Parameters:
fileDir - Directory to look for images.
fileName - File name of the image.
quiet - Whether to avoid displaying errors using the GUI.
Returns:
An array of the image names to be read in or saved as.
Throws:
OutOfMemoryError - If there is a problem allocating required memory.

getCORSuffixFrom

public static final String getCORSuffixFrom(String fn)
Only used for COR volume files with hyphen in name Breaks the filename into basename and suffix, then returns the suffix.

Parameters:
fn - The filename.
Returns:
The suffix or file-extension. For example, -info. Note that suffix includes the separator '-'

getExtension

public static final String getExtension(String absolutePath)
Returns the extension of the file name, if file name does not have extension, then return empty string.

Parameters:
absolutePath - the file name.
Returns:
The file's extension.

getFileDirectory

public static final String getFileDirectory(String fileName)
Returns the path information from the file name with the path information.

Parameters:
fileName - the file name wiht the path information.
Returns:
The path information.

getFileIndex

public static final int getFileIndex(String fName)
Trims off the file extension and file name, but leaves the file index. An index might be 0001, or 140, for example.

Parameters:
fName - String file name to get index
Returns:
String (index string)

getFileList

public static final String[] getFileList(String fileDir,
                                         String fileName,
                                         boolean quiet)
                                  throws OutOfMemoryError
Looks in the image directory and returns all images with the same suffix as fileName, sorted in lexicographical order.

Parameters:
fileDir - Directory to look for images.
fileName - File name of the image.
quiet - Whether to avoid displaying errors using the GUI.
Returns:
An array of the image names to be read in or saved as.
Throws:
OutOfMemoryError - If there is a problem allocating required memory.

getFileName

public static final String getFileName(String absolutePath)
Returns the file name without path information from file name with the path information.

Parameters:
absolutePath - the file name with the path information.
Returns:
The file name without path information.

getFileType

public static final int getFileType(String fileName,
                                    String fileDir,
                                    boolean quiet)
Sets the FileBase.(filetype) based on the file extension of the given filename. Also sets file "suffix", if required.

Parameters:
fileName - Filename of the image to read in. Must include the file extension.
fileDir - Directory where fileName exists.
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
Filetype from FileBase.
See Also:
FileBase

getFileType

public static final int getFileType(String fileName,
                                    String fileDir,
                                    boolean doWrite,
                                    boolean quiet)
Sets the FileBase.(filetype) based on the file extension of the given filename. Also sets file "suffix", if required.

Parameters:
fileName - Filename of the image to read in. Must include the file extension.
fileDir - Directory where fileName exists.
doWrite - If true about to write a file
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
Filetype from FileBase.
See Also:
FileBase

isAnalyzeOrSPM

public static final int isAnalyzeOrSPM(String fileName,
                                       String fileDir,
                                       boolean quiet)
                                throws IOException
Tests if the unknown file is of type Analyze.

Parameters:
fileName - Name of the image file to read.
fileDir - Directory of the image file to read.
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
FileUtility.ANALYZE if the file is a ANALYZE type, FileUtility.SPM if the file is a SPM type, and FileUtility.UNDEFINED otherwise
Throws:
IOException - If there is a problem determining the type of the given file.

isDicom

public static final int isDicom(String fileName,
                                String fileDir,
                                boolean quiet)
                         throws IOException
Tests if the unknown file is of type Dicom.

Parameters:
fileName - Name of the image file to read.
fileDir - Directory of the image file to read.
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
FileUtility.DICOM if the file is a DICOM file, and FileUtility.UNDEFINED otherwise
Throws:
IOException - If there is a problem determining the type of the given file.

isDicom_ver2

public static final int isDicom_ver2(String fileName,
                                     String fileDir,
                                     boolean quiet)
                              throws IOException
tests if unknown file is of type 2.0 dicom

Parameters:
fileName -
fileDir -
quiet -
Returns:
Throws:
IOException

isGESigna4X

public static final int isGESigna4X(String fileName,
                                    String fileDir,
                                    boolean quiet)
                             throws IOException
Tests if the unknown file is of type GE Signa 4X type.

Parameters:
fileName - Name of the image file to read.
fileDir - Directory of the image file to read.
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
FileUtility.GE_SIGNA4X if the file is a GE MR Signa 4.x file, and FileUtility.UNDEFINED otherwise
Throws:
IOException - If there is a problem determining the type of the given file.

isGESigna5X

public static final int isGESigna5X(String fileName,
                                    String fileDir,
                                    boolean quiet)
                             throws IOException
Tests if the unknown file is of type GE Signa 5X type.

Parameters:
fileName - Name of the image file to read.
fileDir - Directory of the image file to read.
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
FileUtility.GE_GENESIS if the file is a GE MR Signa 5.x file, and FileUtility.UNDEFINED otherwise
Throws:
IOException - If there is a problem determining the type of the given file.

isInterfile

public static final int isInterfile(String fileName,
                                    String fileDir,
                                    boolean quiet)
                             throws IOException
Tests if the unknown file is of type Interfile.

Parameters:
fileName - Name of the image file to read.
fileDir - Directory of the image file to read.
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
FileUtility.Interfile if the file is a Interfile type, and FileUtility.UNDEFINED otherwise
Throws:
IOException - If there is a problem determining the type of the given file.

isMagnetomVision

public static final int isMagnetomVision(String fileName,
                                         String fileDir,
                                         boolean quiet)
                                  throws IOException
Tests if the unknown file is of type Siemens Magnetom Vision.

Parameters:
fileName - Name of the image file to read.
fileDir - Directory of the image file to read.
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
FileUtility.MAGNETOM_VISION if the file is a Siemens Magnetom Vision type, and FileUtility.UNDEFINED otherwise
Throws:
IOException - If there is a problem determining the type of the given file.

isMinc

public static final int isMinc(String fileName,
                               String fileDir,
                               boolean quiet)
                        throws IOException
Tests if the unknown file is of type Minc.

Parameters:
fileName - Name of the image file to read.
fileDir - Directory of the image file to read.
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
FileUtility.MINC if the file is a MINC type, and FileUtility.UNDEFINED otherwise
Throws:
IOException - If there is a problem determining the type of the given file.

isMincHDF

public static final int isMincHDF(String fileName,
                                  String fileDir,
                                  boolean quiet)
Determines whether the file on disk is of type MINC 2.0

Parameters:
fileName - name of the file
fileDir - directory
quiet -
Returns:
whether the file is HDF5 type

isNIFTI

public static final int isNIFTI(String fileName,
                                String fileDir,
                                boolean quiet)
                         throws IOException
Tests if the unknown file is of type Nifti.

Parameters:
fileName - Name of the image file to read.
fileDir - Directory of the image file to read.
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
FileUtility.NIFTI if the file is a NIFTI type, and FileUtility.UNDEFINED otherwise
Throws:
IOException - If there is a problem determining the type of the given file.

isSPM

public static final int isSPM(String fileName,
                              String fileDir,
                              boolean quiet)
                       throws IOException
Tests if the unknown file is of type SPM.

Parameters:
fileName - Name of the image file to read.
fileDir - Directory of the image file to read.
quiet - Whether to avoid any user interaction (ie, from error popups).
Returns:
FileUtility.SPM if the file is a SPM type, and FileUtility.UNDEFINED otherwise
Throws:
IOException - If there is a problem determining the type of the given file.

stripExtension

public static final String stripExtension(String fileName)
Helper method to strip the image name of the extension, so when we save we don't have double extensions (like genormcor.img.tif).

Parameters:
fileName - Original name.
Returns:
Name without extension, or original name if there was no extension.

trimCOR

public static final String trimCOR(String fName)
Trims the numbers or file extension from COR file names. Any numbers or .info or .info~ will be removed from after a hyphen in the given fname.

Parameters:
fName - File name where the last characters are alpha-numerics indicating the image number or .info or .info~
Returns:
File name without numbers on the end.

trimNumbersAndSpecial

public static final String trimNumbersAndSpecial(String fName)
Trims the numbers and special character from the file name. Numerics and some special characters [ - _ . are removed from the end of the file.

Parameters:
fName - File name where the last characters are alpha-numerics indicating the image number.
Returns:
File name without numbers on the end.

getFileNameList

public static final List<String> getFileNameList(ModelImage image)
Gets the file name list from which this ModelImage is opened.

Parameters:
image - the ModelImage object.
Returns:
the actual file name list.