Class ROIStreamTokenizer

java.lang.Object
java.io.StreamTokenizer
com.xinapse.multisliceimage.roi.ROIStreamTokenizer

public class ROIStreamTokenizer extends StreamTokenizer
An ROIStreamTokenizer used to parse ROIs from an input stream. The ROIs can either be Xinapse-type ROIs, or dispim-type ROIs. Xinapse-style ROIs can be read using this Tokenizer in two modes:
  • Normal mode.
  • Clinical trials mode.
Clinical trials mode is enabled by setting the System Property "Platform.GCP". In clinical trials mode, the ROIStreamTokenizer expects to encounter a checksum at the end of the input stream. If a checksum is not found before the end of the file is reached, or if the checksum is invalid, then an IOException is thrown. A checksum looks like:
   Begin Checksum
   NNNNNNNN
   End Checksum
   
where NNNNNNNN is the value of the checksum.

In normal mode, the checksum, if found, is ignored.

  • Field Details

    • SLICETOKEN

      public static final String SLICETOKEN
      The token written to show the image slice.
      See Also:
    • ANNOTATIONTOKEN

      public static final String ANNOTATIONTOKEN
      The token written to show the ROI annotation.
      See Also:
    • COLOURTOKEN

      public static final String COLOURTOKEN
      The token written to show the ROI colour.
      See Also:
    • AREATOKEN

      public static final String AREATOKEN
      The token written to show the ROI area.
      See Also:
    • MEANTOKEN

      public static final String MEANTOKEN
      The token written to show the ROI mean intensity.
      See Also:
    • STDTOKEN

      public static final String STDTOKEN
      The token written to show the ROI intensity "standard" in "standard deviation".
      See Also:
    • DEVTOKEN

      public static final String DEVTOKEN
      The token written to show the ROI intensity "deviation" in "standard deviation".
      See Also:
    • MEDIANTOKEN

      public static final String MEDIANTOKEN
      The token written to show the ROI intensity median.
      See Also:
    • MINTOKEN

      public static final String MINTOKEN
      The token written to show the ROI minimum intensity.
      See Also:
    • MAXTOKEN

      public static final String MAXTOKEN
      The token written to show the ROI maximum intensity.
      See Also:
    • LENGTHTOKEN

      public static final String LENGTHTOKEN
      The token written to show the ROI length (for linear ROIs).
      See Also:
  • Method Details

    • main

      public static void main(String[] args)
      Runs the self-test for the ROIStreamTokenizer class.
      Parameters:
      args - are ignored.