Search in sources :

Example 1 with DisplayDependentROIsOp

use of org.vcell.vmicro.op.display.DisplayDependentROIsOp in project vcell by virtualcell.

the class VFrapProcess method main.

public static void main(String[] args) {
    try {
        File baseDir = new File(".");
        // File baseDir = new File("/Users/schaff/Documents/workspace/VCell_5.4");
        // initialize computing environment
        // 
        File workingDirectory = new File(baseDir, "workingDir");
        LocalWorkspace localWorkspace = new LocalWorkspace(workingDirectory);
        // 
        // import raw image time series data from VFRAP file format (can have noise, background, etc ... can be actual microscopy data)
        // 
        ClientTaskStatusSupport progressListener = new ClientTaskStatusSupport() {

            String message = "";

            int progress = 0;

            @Override
            public void setProgress(int progress) {
                this.progress = progress;
            }

            @Override
            public void setMessage(String message) {
                this.message = message;
            }

            @Override
            public boolean isInterrupted() {
                return false;
            }

            @Override
            public int getProgress() {
                return progress;
            }

            @Override
            public void addProgressDialogListener(ProgressDialogListener progressDialogListener) {
            }
        };
        // 
        // generate fake data (and save?)
        // 
        // ImageTimeSeries<UShortImage> simulatedFluorescence = generateFakeData(localWorkspace, progressListener);
        // new ExportRawTimeSeriesToVFrapOp().exportToVFRAP(vfrapFile, simulatedFluorescence, null);
        // 
        // analyze raw data (from file?) using Keyworthy method.
        // 
        File vfrapFile = new File(baseDir, "vfrapPaper/rawData/sim3/workflow.txt.save");
        ImageTimeSeries<UShortImage> fluorTimeSeriesImages = new ImportRawTimeSeriesFromVFrapOp().importRawTimeSeriesFromVFrap(vfrapFile);
        VFrapProcessResults results = compute(fluorTimeSeriesImages, 0.85, 0.4, localWorkspace, progressListener);
        new DisplayTimeSeriesOp().displayImageTimeSeries(fluorTimeSeriesImages, "raw data", null);
        new DisplayImageOp().displayImage(results.cellROI_2D.getRoiImages()[0], "cell ROI", null);
        new DisplayImageOp().displayImage(results.bleachROI_2D.getRoiImages()[0], "bleach ROI", null);
        new DisplayDependentROIsOp().displayDependentROIs(results.imageDataROIs, results.cellROI_2D, "data rois", null);
        new DisplayTimeSeriesOp().displayImageTimeSeries(results.normalizedTimeSeries, "normalized data", null);
        new DisplayProfileLikelihoodPlotsOp().displayProfileLikelihoodPlots(results.profileDataOne, "one fluorescent pool", null);
        new DisplayProfileLikelihoodPlotsOp().displayProfileLikelihoodPlots(results.profileDataTwoWithPenalty, "too pools", null);
    } catch (Exception e) {
        e.printStackTrace(System.out);
    }
}
Also used : DisplayProfileLikelihoodPlotsOp(org.vcell.vmicro.op.display.DisplayProfileLikelihoodPlotsOp) LocalWorkspace(org.vcell.vmicro.workflow.data.LocalWorkspace) UShortImage(cbit.vcell.VirtualMicroscopy.UShortImage) DisplayImageOp(org.vcell.vmicro.op.display.DisplayImageOp) ProgressDialogListener(org.vcell.util.ProgressDialogListener) DisplayTimeSeriesOp(org.vcell.vmicro.op.display.DisplayTimeSeriesOp) ClientTaskStatusSupport(org.vcell.util.ClientTaskStatusSupport) ImportRawTimeSeriesFromVFrapOp(org.vcell.vmicro.op.ImportRawTimeSeriesFromVFrapOp) DisplayDependentROIsOp(org.vcell.vmicro.op.display.DisplayDependentROIsOp) File(java.io.File)

Example 2 with DisplayDependentROIsOp

use of org.vcell.vmicro.op.display.DisplayDependentROIsOp in project vcell by virtualcell.

the class DisplayDependentROIs method compute0.

@Override
protected void compute0(TaskContext context, final ClientTaskStatusSupport clientTaskStatusSupport) throws Exception {
    // get inputs
    ROI[] imagerois = context.getData(imageROIs);
    ROI cellroi = context.getData(cellROI);
    String titleString = context.getDataWithDefault(title, "no title");
    // do op
    DisplayDependentROIsOp op = new DisplayDependentROIsOp();
    op.displayDependentROIs(imagerois, cellroi, titleString, null);
    // set output
    context.setData(displayed, true);
}
Also used : DisplayDependentROIsOp(org.vcell.vmicro.op.display.DisplayDependentROIsOp) ROI(cbit.vcell.VirtualMicroscopy.ROI)

Aggregations

DisplayDependentROIsOp (org.vcell.vmicro.op.display.DisplayDependentROIsOp)2 ROI (cbit.vcell.VirtualMicroscopy.ROI)1 UShortImage (cbit.vcell.VirtualMicroscopy.UShortImage)1 File (java.io.File)1 ClientTaskStatusSupport (org.vcell.util.ClientTaskStatusSupport)1 ProgressDialogListener (org.vcell.util.ProgressDialogListener)1 ImportRawTimeSeriesFromVFrapOp (org.vcell.vmicro.op.ImportRawTimeSeriesFromVFrapOp)1 DisplayImageOp (org.vcell.vmicro.op.display.DisplayImageOp)1 DisplayProfileLikelihoodPlotsOp (org.vcell.vmicro.op.display.DisplayProfileLikelihoodPlotsOp)1 DisplayTimeSeriesOp (org.vcell.vmicro.op.display.DisplayTimeSeriesOp)1 LocalWorkspace (org.vcell.vmicro.workflow.data.LocalWorkspace)1