Search in sources :

Example 1 with VFrapProcess

use of org.vcell.vmicro.workflow.task.VFrapProcess in project vcell by virtualcell.

the class WorkflowTest method getVFrapSimpleExample.

public static Workflow getVFrapSimpleExample(File workingDirectory, File vfrapFile) {
    // 
    // construct the dataflow graph
    // 
    LocalWorkspace localWorkspace = new LocalWorkspace(workingDirectory);
    Workflow workflow = new Workflow("main");
    Repository repository = new MemoryRepository();
    TaskContext context = new TaskContext(workflow, repository, localWorkspace);
    // 
    // workflow parameters
    // 
    WorkflowParameter<File> vfrapFileParam = workflow.addParameter(File.class, "vfrapFile");
    context.setParameterValue(vfrapFileParam, vfrapFile);
    WorkflowParameter<Double> bleachThreshold = workflow.addParameter(Double.class, "bleachThreshold");
    context.setParameterValue(bleachThreshold, 0.80);
    WorkflowParameter<Double> cellThreshold = workflow.addParameter(Double.class, "cellThreshold");
    context.setParameterValue(cellThreshold, 0.5);
    WorkflowParameter<String> displayROITitle = workflow.addParameter(String.class, "displayROITitle");
    context.setParameterValue(displayROITitle, "rois");
    WorkflowParameter<String> displayProfileOneTitle = workflow.addParameter(String.class, "displayProfileOneTitle");
    context.setParameterValue(displayProfileOneTitle, "1 Diffusing");
    WorkflowParameter<String> displayProfileTwoWithoutPenaltyTitle = workflow.addParameter(String.class, "displayProfileTwoTitle");
    context.setParameterValue(displayProfileTwoWithoutPenaltyTitle, "2 Diffusing - no penalty");
    WorkflowParameter<String> displayProfileTwoWithPenaltyTitle = workflow.addParameter(String.class, "displayProfileTwoTitle");
    context.setParameterValue(displayProfileTwoWithPenaltyTitle, "2 Diffusing - with penalty");
    WorkflowParameter<String> displayRawImagesTitle = workflow.addParameter(String.class, "displayRawImagesTitle");
    context.setParameterValue(displayRawImagesTitle, "raw Images from " + ImportRawTimeSeriesFromVFrap.class.getName());
    ImportRawTimeSeriesFromVFrap importFromVFrap = new ImportRawTimeSeriesFromVFrap("importFromVFrap");
    workflow.connectParameter(vfrapFileParam, importFromVFrap.vfrapFile);
    workflow.addTask(importFromVFrap);
    DisplayTimeSeries displayRawImages = new DisplayTimeSeries("displayRawImages");
    workflow.connect2(importFromVFrap.rawTimeSeriesImages, displayRawImages.imageTimeSeries);
    workflow.connectParameter(displayRawImagesTitle, displayRawImages.title);
    workflow.addTask(displayRawImages);
    VFrapProcess vfrapProcess = new VFrapProcess("vfrapProcess");
    workflow.connectParameter(bleachThreshold, vfrapProcess.bleachThreshold);
    workflow.connectParameter(cellThreshold, vfrapProcess.cellThreshold);
    workflow.connect2(importFromVFrap.rawTimeSeriesImages, vfrapProcess.rawTimeSeriesImages);
    workflow.addTask(vfrapProcess);
    DisplayDependentROIs displayROIs = new DisplayDependentROIs("displayROis");
    workflow.connect2(vfrapProcess.cellROI_2D, displayROIs.cellROI);
    workflow.connect2(vfrapProcess.imageDataROIs, displayROIs.imageROIs);
    workflow.connectParameter(displayROITitle, displayROIs.title);
    workflow.addTask(displayROIs);
    DisplayProfileLikelihoodPlots displayProfilesOne = new DisplayProfileLikelihoodPlots("displayProfilesOne");
    workflow.connect2(vfrapProcess.profileDataOne, displayProfilesOne.profileData);
    workflow.connectParameter(displayProfileOneTitle, displayProfilesOne.title);
    workflow.addTask(displayProfilesOne);
    DisplayProfileLikelihoodPlots displayProfilesTwoWithPenalty = new DisplayProfileLikelihoodPlots("displayProfilesTwoWithPenalty");
    workflow.connect2(vfrapProcess.profileDataTwoWithPenalty, displayProfilesTwoWithPenalty.profileData);
    workflow.connectParameter(displayProfileTwoWithPenaltyTitle, displayProfilesTwoWithPenalty.title);
    workflow.addTask(displayProfilesTwoWithPenalty);
    return workflow;
}
Also used : LocalWorkspace(org.vcell.vmicro.workflow.data.LocalWorkspace) TaskContext(org.vcell.workflow.TaskContext) DisplayTimeSeries(org.vcell.vmicro.workflow.task.DisplayTimeSeries) Workflow(org.vcell.workflow.Workflow) DisplayProfileLikelihoodPlots(org.vcell.vmicro.workflow.task.DisplayProfileLikelihoodPlots) MemoryRepository(org.vcell.workflow.MemoryRepository) Repository(org.vcell.workflow.Repository) DisplayDependentROIs(org.vcell.vmicro.workflow.task.DisplayDependentROIs) ImportRawTimeSeriesFromVFrap(org.vcell.vmicro.workflow.task.ImportRawTimeSeriesFromVFrap) MemoryRepository(org.vcell.workflow.MemoryRepository) VFrapProcess(org.vcell.vmicro.workflow.task.VFrapProcess) File(java.io.File)

Aggregations

File (java.io.File)1 LocalWorkspace (org.vcell.vmicro.workflow.data.LocalWorkspace)1 DisplayDependentROIs (org.vcell.vmicro.workflow.task.DisplayDependentROIs)1 DisplayProfileLikelihoodPlots (org.vcell.vmicro.workflow.task.DisplayProfileLikelihoodPlots)1 DisplayTimeSeries (org.vcell.vmicro.workflow.task.DisplayTimeSeries)1 ImportRawTimeSeriesFromVFrap (org.vcell.vmicro.workflow.task.ImportRawTimeSeriesFromVFrap)1 VFrapProcess (org.vcell.vmicro.workflow.task.VFrapProcess)1 MemoryRepository (org.vcell.workflow.MemoryRepository)1 Repository (org.vcell.workflow.Repository)1 TaskContext (org.vcell.workflow.TaskContext)1 Workflow (org.vcell.workflow.Workflow)1