Class ImportProcess

java.lang.Object
loci.plugins.in.ImportProcess
All Implemented Interfaces:
loci.common.StatusReporter

public class ImportProcess extends Object implements loci.common.StatusReporter
Manages the import preparation process. After calling execute(), the process will be ready to feed to an ImagePlusReader to read in the actual ImagePlus objects.
  • Field Details

    • listeners

      private List<loci.common.StatusListener> listeners
    • options

      private ImporterOptions options
      Associated importer options.
    • step

      private ImportStep step
      Current step in the import preparation process.
    • baseReader

      private IFormatReader baseReader
    • imageReader

      private ImageReader imageReader
    • fileStitcher

      private FileStitcher fileStitcher
    • channelFiller

      private ChannelFiller channelFiller
    • channelSeparator

      private ChannelSeparator channelSeparator
    • dimensionSwapper

      private DimensionSwapper dimensionSwapper
    • minMaxCalculator

      private MinMaxCalculator minMaxCalculator
    • tileStitcher

      private TileStitcher tileStitcher
    • virtualReader

      private VirtualReader virtualReader
    • reader

      private ImageProcessorReader reader
    • cancel

      private boolean cancel
      Whether the process has been canceled.
    • idName

      protected String idName
    • idLoc

      protected loci.common.Location idLoc
    • meta

      protected IMetadata meta
    • omeXML

      private String omeXML
    • metadata

      private ImporterMetadata metadata
    • seriesLabels

      private String[] seriesLabels
      A descriptive label for each series.
  • Constructor Details

  • Method Details

    • execute

      public boolean execute() throws FormatException, IOException
      Performs the import preparation process, notifying status listeners at each step.
      Returns:
      true if the preparation process completed successfully.
      Throws:
      FormatException
      IOException
    • cancel

      public void cancel()
      Cancels the import process.
    • wasCanceled

      public boolean wasCanceled()
      Gets whether the import process was canceled.
    • getOptions

      public ImporterOptions getOptions()
    • isWindowless

      public boolean isWindowless()
    • setSeriesList

      public void setSeriesList(String seriesList)
    • getBaseReader

      public IFormatReader getBaseReader()
      Valid only after ImportStep.READER.
    • getImageReader

      public ImageReader getImageReader()
      Valid only after ImportStep.READER.
    • getIdName

      public String getIdName()
      Valid only after ImportStep.READER.
    • getIdLocation

      public loci.common.Location getIdLocation()
      Valid only after ImportStep.READER.
    • getOMEMetadata

      public IMetadata getOMEMetadata()
      Valid only after ImportStep.READER.
    • getOMEXML

      public String getOMEXML()
      Valid only after ImportStep.READER.
    • getFileStitcher

      public FileStitcher getFileStitcher()
      Valid only after ImportStep.STACK.
    • getChannelFiller

      public ChannelFiller getChannelFiller()
      Valid only after ImportStep.STACK.
    • getChannelSeparator

      public ChannelSeparator getChannelSeparator()
      Valid only after ImportStep.STACK.
    • getDimensionSwapper

      public DimensionSwapper getDimensionSwapper()
      Valid only after ImportStep.STACK.
    • getMinMaxCalculator

      public MinMaxCalculator getMinMaxCalculator()
      Valid only after ImportStep.STACK.
    • getVirtualReader

      public VirtualReader getVirtualReader()
      Valid only after ImportStep.STACK.
    • getReader

      public ImageProcessorReader getReader()
      Valid only after ImportStep.STACK.
    • getCurrentFile

      public String getCurrentFile()
      Valid only after ImportStep.STACK.
    • getSeriesCount

      public int getSeriesCount()
      Valid only after ImportStep.STACK.
    • getSeriesLabel

      public String getSeriesLabel(int s)
      Valid only after ImportStep.STACK.
    • getStackOrder

      public String getStackOrder()
      Valid only after ImportStep.STACK.
    • getCBegin

      public int getCBegin(int s)
    • getCEnd

      public int getCEnd(int s)
      Valid only after ImportStep.STACK.
    • getCStep

      public int getCStep(int s)
    • getZBegin

      public int getZBegin(int s)
    • getZEnd

      public int getZEnd(int s)
      Valid only after ImportStep.STACK.
    • getZStep

      public int getZStep(int s)
    • getTBegin

      public int getTBegin(int s)
    • getTEnd

      public int getTEnd(int s)
      Valid only after ImportStep.STACK.
    • getTStep

      public int getTStep(int s)
    • getCropRegion

      public loci.common.Region getCropRegion(int s)
      Valid only after ImportStep.STACK.
    • getCCount

      public int getCCount(int s)
      Valid only after ImportStep.SERIES.
    • getZCount

      public int getZCount(int s)
      Valid only after ImportStep.SERIES.
    • getTCount

      public int getTCount(int s)
      Valid only after ImportStep.SERIES.
    • getMemoryUsage

      public long getMemoryUsage()
      Gets a projection of required memory in bytes. Valid only after ImportStep.SERIES.
    • getOriginalMetadata

      public ImporterMetadata getOriginalMetadata()
      Valid only after ImportStep.METADATA.
    • addStatusListener

      public void addStatusListener(loci.common.StatusListener l)
      Specified by:
      addStatusListener in interface loci.common.StatusReporter
    • removeStatusListener

      public void removeStatusListener(loci.common.StatusListener l)
      Specified by:
      removeStatusListener in interface loci.common.StatusReporter
    • notifyListeners

      public void notifyListeners(loci.common.StatusEvent e)
      Specified by:
      notifyListeners in interface loci.common.StatusReporter
    • initializeReader

      private void initializeReader() throws FormatException, IOException
      Performed following ImportStep.READER notification.
      Throws:
      FormatException
      IOException
    • initializeFile

      private void initializeFile() throws FormatException, IOException
      Performed following ImportStep.FILE notification.
      Throws:
      FormatException
      IOException
    • initializeStack

      private void initializeStack() throws FormatException, IOException
      Performed following ImportStep.STACK notification.
      Throws:
      FormatException
      IOException
    • initializeSeries

      private void initializeSeries()
      Performed following ImportStep.SERIES notification.
    • initializeDimOrder

      private void initializeDimOrder()
      Performed following ImportStep.DIM_ORDER notification.
    • initializeRange

      private void initializeRange()
      Performed following ImportStep.RANGE notification.
    • initializeCrop

      private void initializeCrop()
      Performed following ImportStep.CROP notification.
    • initializeColors

      private void initializeColors()
      Performed following ImportStep.COLORS notification.
    • initializeMetadata

      private void initializeMetadata()
      Performed following ImportStep.METADATA notification.
    • computeNameAndLocation

      private void computeNameAndLocation()
      Initializes the idName and idLoc derived values.
    • createBaseReader

      private void createBaseReader() throws FormatException, IOException
      Initializes an IFormatReader according to the current configuration.
      Throws:
      FormatException
      IOException
    • saveDefaults

      private void saveDefaults()
      Performed following ImportStep.FILE notification.
    • computeSeriesLabels

      private void computeSeriesLabels(IFormatReader r)
    • step

      private void step(ImportStep step)
    • assertStep

      private void assertStep(ImportStep importStep)