Class VOITable

java.lang.Object
gov.nih.mipav.model.scripting.VOITable

public class VOITable extends 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 Hashtable
    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 Hashtable
    The table containing vectors of VOI path strings, keyed by the image placeholder variables used in the script.
  • Constructor Summary

    Constructors
    Constructor
    Description
    VOITable(String scriptFile, Vector voiPathList)
    Create a new VOI path table.
  • Method Summary

    Modifier and Type
    Method
    Description
    private String
    Returns the path to the next VOI which should be opened for a given image.
    private void
    Increments the count of VOI-file-open requests for a given image in the script.
    void
    Opens the next VOI for a given image from disk, then registers that VOI in the appropriate image.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • voiPathTable

      private Hashtable voiPathTable
      The table containing vectors of VOI path strings, keyed by the image placeholder variables used in the script.
    • voiPathRequestCountTable

      private 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 Details

    • VOITable

      public VOITable(String scriptFile, 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 Details

    • openAndRegisterNextVOI

      public void openAndRegisterNextVOI(String imageVar) throws 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:
      IOException - If there is a problem reading in the VOI file from disk.
    • getNextVOIPath

      private String getNextVOIPath(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(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.