edu.stanford.rsl.konrad.pipeline
Class ParallelImageFilterPipeliner

java.lang.Object
  extended by edu.stanford.rsl.konrad.pipeline.ParallelImageFilterPipeliner

public class ParallelImageFilterPipeliner
extends java.lang.Object

Class for running multiple ImageFilteringTools in parallel. Creates a thread for each ImageFilteringTool and executes them using a ParallelThreadExecutor. It will start one thread on each processor of the machine at the same time.

Author:
Andreas Maier

Constructor Summary
ParallelImageFilterPipeliner(FileProjectionSource image, ImageFilteringTool[] tools, BufferedProjectionSink sink)
          Constructor requires an ImagePlus.
 
Method Summary
static ImageFilteringTool[] getPipelineClone(ImageFilteringTool[] tools)
           
static IndividualImageFilteringTool[] getSubPipeline(ImageFilteringTool[] tools, int start, int end)
           
 void project()
           
 void project(boolean showStatus)
          This method starts the actual filtering.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParallelImageFilterPipeliner

public ParallelImageFilterPipeliner(FileProjectionSource image,
                                    ImageFilteringTool[] tools,
                                    BufferedProjectionSink sink)
Constructor requires an ImagePlus. If it has multiple slices the processing is performed in parallel.

Parameters:
image - the ImagePlus to be filtered
tools - the ImageFilteringTool to be applied.
sink - the image sink
Method Detail

project

public void project(boolean showStatus)
             throws java.lang.Exception
This method starts the actual filtering.

Parameters:
showStatus - displays the current status if true
Throws:
java.lang.Exception - may occur.

getSubPipeline

public static IndividualImageFilteringTool[] getSubPipeline(ImageFilteringTool[] tools,
                                                            int start,
                                                            int end)

getPipelineClone

public static ImageFilteringTool[] getPipelineClone(ImageFilteringTool[] tools)

project

public void project()
             throws java.lang.Exception
Throws:
java.lang.Exception