Search in sources :

Example 81 with UShortImage

use of cbit.vcell.VirtualMicroscopy.UShortImage in project vcell by virtualcell.

the class ComputeMeasurementError method compute0.

@Override
protected void compute0(TaskContext context, final ClientTaskStatusSupport clientTaskStatusSupport) throws Exception {
    ROI[] rois = context.getData(imageDataROIs);
    int indexPostbleach = context.getData(indexFirstPostbleach);
    ImageTimeSeries<UShortImage> rawImageDataset = context.getData(rawImageTimeSeries);
    FloatImage prebleachAvgImage = context.getData(prebleachAverage);
    ArrayList<NormalizedSampleFunction> roiSampleFunctions = new ArrayList<NormalizedSampleFunction>();
    for (int i = 0; i < rois.length; i++) {
        roiSampleFunctions.add(NormalizedSampleFunction.fromROI(rois[i]));
    }
    // do op
    ComputeMeasurementErrorOp op = new ComputeMeasurementErrorOp();
    NormalizedSampleFunction[] roiSampleFunctionArray = roiSampleFunctions.toArray(new NormalizedSampleFunction[0]);
    RowColumnResultSet rowColumnResultSet = op.computeNormalizedMeasurementError(roiSampleFunctionArray, indexPostbleach, rawImageDataset, prebleachAvgImage, clientTaskStatusSupport);
    // set output
    context.setData(normalizedMeasurementError, rowColumnResultSet);
}
Also used : FloatImage(cbit.vcell.VirtualMicroscopy.FloatImage) NormalizedSampleFunction(org.vcell.vmicro.workflow.data.NormalizedSampleFunction) ArrayList(java.util.ArrayList) UShortImage(cbit.vcell.VirtualMicroscopy.UShortImage) ROI(cbit.vcell.VirtualMicroscopy.ROI) ComputeMeasurementErrorOp(org.vcell.vmicro.op.ComputeMeasurementErrorOp) RowColumnResultSet(cbit.vcell.math.RowColumnResultSet)

Example 82 with UShortImage

use of cbit.vcell.VirtualMicroscopy.UShortImage in project vcell by virtualcell.

the class ImportRawTimeSeriesFromExperimentImage method compute0.

@Override
protected void compute0(TaskContext context, ClientTaskStatusSupport clientTaskStatusSupport) throws Exception {
    // get input
    File expTimeSeriesFile = context.getData(this.expTimeSeriesFile);
    // do op
    ImportRawTimeSeriesFromExperimentImageOp op = new ImportRawTimeSeriesFromExperimentImageOp();
    ImageTimeSeries<UShortImage> imageTimeSeries = op.importRawTimeSeries(expTimeSeriesFile);
    // set output
    context.setData(rawTimeSeriesImages, imageTimeSeries);
}
Also used : ImportRawTimeSeriesFromExperimentImageOp(org.vcell.vmicro.op.ImportRawTimeSeriesFromExperimentImageOp) UShortImage(cbit.vcell.VirtualMicroscopy.UShortImage) File(java.io.File)

Example 83 with UShortImage

use of cbit.vcell.VirtualMicroscopy.UShortImage in project vcell by virtualcell.

the class ImportRawTimeSeriesFromHdf5Fluor method compute0.

@Override
protected void compute0(TaskContext context, ClientTaskStatusSupport clientTaskStatusSupport) throws Exception {
    // get input
    int zSlice = context.getDataWithDefault(zSliceIndex, 0);
    File hdf5File = new File(context.getData(this.vcellHdf5File));
    String fluorName = context.getData(this.fluorDataName);
    Double maxFluor = context.getData(this.maxIntensity);
    Boolean isNoise = context.getData(this.bNoise);
    // do op
    ImportRawTimeSeriesFromHdf5FluorOp op = new ImportRawTimeSeriesFromHdf5FluorOp();
    ImageTimeSeries<UShortImage> timeRawData = op.importTimeSeriesFromHDF5Data(hdf5File, fluorName, maxFluor, isNoise, zSlice);
    // set output
    context.setData(rawTimeSeriesImages, timeRawData);
}
Also used : ImportRawTimeSeriesFromHdf5FluorOp(org.vcell.vmicro.op.ImportRawTimeSeriesFromHdf5FluorOp) UShortImage(cbit.vcell.VirtualMicroscopy.UShortImage) File(java.io.File)

Example 84 with UShortImage

use of cbit.vcell.VirtualMicroscopy.UShortImage in project vcell by virtualcell.

the class GenerateTrivial2DPsf method compute0.

@Override
protected void compute0(TaskContext context, final ClientTaskStatusSupport clientTaskStatusSupport) throws Exception {
    // do op
    GenerateTrivial2DPsfOp op = new GenerateTrivial2DPsfOp();
    UShortImage psf = op.generateTrivial2D_Psf();
    // set output
    context.setData(psf_2D, psf);
}
Also used : UShortImage(cbit.vcell.VirtualMicroscopy.UShortImage) GenerateTrivial2DPsfOp(org.vcell.vmicro.op.GenerateTrivial2DPsfOp)

Example 85 with UShortImage

use of cbit.vcell.VirtualMicroscopy.UShortImage in project vcell by virtualcell.

the class ImportRawTimeSeriesFromExperimentImages method compute0.

@Override
protected void compute0(TaskContext context, ClientTaskStatusSupport clientTaskStatusSupport) throws Exception {
    // get input
    File[] files = context.getData(expTimeSeriesFiles);
    Double tInterval = context.getData(timeInterval);
    // do op
    ImportRawTimeSeriesFromExperimentImagesOp op = new ImportRawTimeSeriesFromExperimentImagesOp();
    ImageTimeSeries<UShortImage> imageTimeSeries = op.importRawTimeSeries(files, tInterval);
    // set output
    context.setData(rawTimeSeriesImages, imageTimeSeries);
}
Also used : UShortImage(cbit.vcell.VirtualMicroscopy.UShortImage) File(java.io.File) ImportRawTimeSeriesFromExperimentImagesOp(org.vcell.vmicro.op.ImportRawTimeSeriesFromExperimentImagesOp)

Aggregations

UShortImage (cbit.vcell.VirtualMicroscopy.UShortImage)98 ROI (cbit.vcell.VirtualMicroscopy.ROI)26 ImageDataset (cbit.vcell.VirtualMicroscopy.ImageDataset)20 Point (java.awt.Point)16 File (java.io.File)14 Extent (org.vcell.util.Extent)13 ImageTimeSeries (org.vcell.vmicro.workflow.data.ImageTimeSeries)12 Origin (org.vcell.util.Origin)10 ImageException (cbit.image.ImageException)9 Element (org.jdom.Element)9 DataBufferByte (java.awt.image.DataBufferByte)8 RowColumnResultSet (cbit.vcell.math.RowColumnResultSet)7 ArrayList (java.util.ArrayList)7 ISize (org.vcell.util.ISize)7 FloatImage (cbit.vcell.VirtualMicroscopy.FloatImage)6 ClientTaskStatusSupport (org.vcell.util.ClientTaskStatusSupport)6 UserCancelException (org.vcell.util.UserCancelException)6 ProfileDataElement (org.vcell.optimization.ProfileDataElement)5 ImportRawTimeSeriesFromVFrapOp (org.vcell.vmicro.op.ImportRawTimeSeriesFromVFrapOp)5 OptContext (org.vcell.vmicro.workflow.data.OptContext)5