Package gov.nih.mipav.model.scripting
Class VOITable
- java.lang.Object
-
- gov.nih.mipav.model.scripting.VOITable
-
public class VOITable extends java.lang.Object
A table which manages paths to VOIs which should be used for specific images used within a script.- Author:
- mccreedy
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Hashtable
voiPathRequestCountTable
A table containing counts of the number of VOIs which have been retrieved and registered for each image, keyed by the image placeholder variables used in the script.private java.util.Hashtable
voiPathTable
The table containing vectors of VOI path strings, keyed by the image placeholder variables used in the script.
-
Constructor Summary
Constructors Constructor Description VOITable(java.lang.String scriptFile, java.util.Vector voiPathList)
Create a new VOI path table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
getNextVOIPath(java.lang.String imageVar)
Returns the path to the next VOI which should be opened for a given image.private void
incrementVOIRequestCount(java.lang.String imageVar)
Increments the count of VOI-file-open requests for a given image in the script.void
openAndRegisterNextVOI(java.lang.String imageVar)
Opens the next VOI for a given image from disk, then registers that VOI in the appropriate image.
-
-
-
Field Detail
-
voiPathTable
private java.util.Hashtable voiPathTable
The table containing vectors of VOI path strings, keyed by the image placeholder variables used in the script.
-
voiPathRequestCountTable
private java.util.Hashtable voiPathRequestCountTable
A table containing counts of the number of VOIs which have been retrieved and registered for each image, keyed by the image placeholder variables used in the script.
-
-
Constructor Detail
-
VOITable
public VOITable(java.lang.String scriptFile, java.util.Vector voiPathList) throws ParserException
Create a new VOI path table.- Parameters:
scriptFile
- The script file being processed.voiPathList
- A list of VOI paths, in the order returned by Parser.getImageVarsUsedInScript().- Throws:
ParserException
- If an error is encountered while retrieving the image vars used in the script.
-
-
Method Detail
-
openAndRegisterNextVOI
public void openAndRegisterNextVOI(java.lang.String imageVar) throws java.io.IOException
Opens the next VOI for a given image from disk, then registers that VOI in the appropriate image.- Parameters:
imageVar
- The image variable placeholder for whom to find the next VOI.- Throws:
java.io.IOException
- If there is a problem reading in the VOI file from disk.
-
getNextVOIPath
private java.lang.String getNextVOIPath(java.lang.String imageVar)
Returns the path to the next VOI which should be opened for a given image.- Parameters:
imageVar
- The image variable placeholder for whom to find the next VOI path.- Returns:
- A path to a VOI file on disk.
-
incrementVOIRequestCount
private void incrementVOIRequestCount(java.lang.String imageVar)
Increments the count of VOI-file-open requests for a given image in the script.- Parameters:
imageVar
- The image variable placeholder for which we have just processed a VOI-file-open request.
-
-