Search in sources :

Example 6 with FRAPData

use of cbit.vcell.microscopy.FRAPData in project vcell by virtualcell.

the class FRAPStudyPanel method saveAsMatLabFile.

public void saveAsMatLabFile(String matFileName) throws IOException, Exception {
    FRAPStudy frapStudy = getFrapWorkspace().getWorkingFrapStudy();
    FRAPData frapData = frapStudy.getFrapData();
    FrapDataUtils.saveImageDatasetAsExternalMatlabData(frapData, getLocalWorkspace(), matFileName, frapStudy.getStartingIndexForRecovery(), frapStudy.getCartesianMesh());
}
Also used : FRAPData(cbit.vcell.microscopy.FRAPData) FRAPStudy(cbit.vcell.microscopy.FRAPStudy)

Example 7 with FRAPData

use of cbit.vcell.microscopy.FRAPData in project vcell by virtualcell.

the class DefineROI_Panel method setCurrentROI.

public void setCurrentROI(String roiName, boolean bSave) {
    if (getFrapWorkspace() != null && getFrapWorkspace().getWorkingFrapStudy() != null && getFrapWorkspace().getWorkingFrapStudy().getFrapData() != null) {
        FRAPData fData = getFrapWorkspace().getWorkingFrapStudy().getFrapData();
        fData.setCurrentlyDisplayedROI(fData.getRoi(roiName), bSave);
    }
}
Also used : FRAPData(cbit.vcell.microscopy.FRAPData)

Example 8 with FRAPData

use of cbit.vcell.microscopy.FRAPData in project vcell by virtualcell.

the class DefineROI_Panel method refreshUI.

public void refreshUI() {
    FRAPData fData = getFrapWorkspace().getWorkingFrapStudy().getFrapData();
    centerPanel.getOverlayEditorPanelJAI().setImages((fData == null ? null : fData.getImageDataset()), true);
    centerPanel.getOverlayEditorPanelJAI().setRoiSouceData(fData);
    centerPanel.getOverlayEditorPanelJAI().setROI(getFrapWorkspace().getWorkingFrapStudy().getFrapData().getCurrentlyDisplayedROI());
}
Also used : FRAPData(cbit.vcell.microscopy.FRAPData)

Example 9 with FRAPData

use of cbit.vcell.microscopy.FRAPData in project vcell by virtualcell.

the class DefineROI_RoiForErrorPanel method getAllROIs.

public ROI[] getAllROIs() {
    allROIs = new ROI[NUM_SELECTED_ROIS];
    FRAPData frapData = frapWorkspace.getWorkingFrapStudy().getFrapData();
    allROIs[IDX_ROI_BLEACHED] = frapData.getRoi(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED.name());
    allROIs[IDX_ROI_BLEACHED_RING1] = frapData.getRoi(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING1.name());
    allROIs[IDX_ROI_BLEACHED_RING2] = frapData.getRoi(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING2.name());
    allROIs[IDX_ROI_BLEACHED_RING3] = frapData.getRoi(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING3.name());
    allROIs[IDX_ROI_BLEACHED_RING4] = frapData.getRoi(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING4.name());
    allROIs[IDX_ROI_BLEACHED_RING5] = frapData.getRoi(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING5.name());
    allROIs[IDX_ROI_BLEACHED_RING6] = frapData.getRoi(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING6.name());
    allROIs[IDX_ROI_BLEACHED_RING7] = frapData.getRoi(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING7.name());
    allROIs[IDX_ROI_BLEACHED_RING8] = frapData.getRoi(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING8.name());
    return allROIs;
}
Also used : FRAPData(cbit.vcell.microscopy.FRAPData)

Example 10 with FRAPData

use of cbit.vcell.microscopy.FRAPData in project vcell by virtualcell.

the class DefineROI_RoiForErrorPanel method refreshROIImage.

public void refreshROIImage() {
    FRAPData frapData = frapWorkspace.getWorkingFrapStudy().getFrapData();
    ROI[] allROIs = getAllROIs();
    Color[] allColors = getAllROIColors();
    ArrayList<ROI> plottedROIs = new ArrayList<ROI>();
    ArrayList<Color> plottedColors = new ArrayList<Color>();
    ArrayList<String> tempSelectedROIs = new ArrayList<String>();
    if (roi_bleachedCheckBox.isEnabled() && roi_bleachedCheckBox.isSelected()) {
        plottedROIs.add(allROIs[IDX_ROI_BLEACHED]);
        plottedColors.add(allColors[IDX_ROI_BLEACHED]);
        tempSelectedROIs.add(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED.name());
    }
    if (roi_bleached_ring1CheckBox.isEnabled() && roi_bleached_ring1CheckBox.isSelected()) {
        plottedROIs.add(allROIs[IDX_ROI_BLEACHED_RING1]);
        plottedColors.add(allColors[IDX_ROI_BLEACHED_RING1]);
        tempSelectedROIs.add(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING1.name());
    }
    if (roi_bleached_ring2CheckBox.isEnabled() && roi_bleached_ring2CheckBox.isSelected()) {
        plottedROIs.add(allROIs[IDX_ROI_BLEACHED_RING2]);
        plottedColors.add(allColors[IDX_ROI_BLEACHED_RING2]);
        tempSelectedROIs.add(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING2.name());
    }
    if (roi_bleached_ring3CheckBox.isEnabled() && roi_bleached_ring3CheckBox.isSelected()) {
        plottedROIs.add(allROIs[IDX_ROI_BLEACHED_RING3]);
        plottedColors.add(allColors[IDX_ROI_BLEACHED_RING3]);
        tempSelectedROIs.add(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING3.name());
    }
    if (roi_bleached_ring4CheckBox.isEnabled() && roi_bleached_ring4CheckBox.isSelected()) {
        plottedROIs.add(allROIs[IDX_ROI_BLEACHED_RING4]);
        plottedColors.add(allColors[IDX_ROI_BLEACHED_RING4]);
        tempSelectedROIs.add(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING4.name());
    }
    if (roi_bleached_ring5CheckBox.isEnabled() && roi_bleached_ring5CheckBox.isSelected()) {
        plottedROIs.add(allROIs[IDX_ROI_BLEACHED_RING5]);
        plottedColors.add(allColors[IDX_ROI_BLEACHED_RING5]);
        tempSelectedROIs.add(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING5.name());
    }
    if (roi_bleached_ring6CheckBox.isEnabled() && roi_bleached_ring6CheckBox.isSelected()) {
        plottedROIs.add(allROIs[IDX_ROI_BLEACHED_RING6]);
        plottedColors.add(allColors[IDX_ROI_BLEACHED_RING6]);
        tempSelectedROIs.add(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING6.name());
    }
    if (roi_bleached_ring7CheckBox.isEnabled() && roi_bleached_ring7CheckBox.isSelected()) {
        plottedROIs.add(allROIs[IDX_ROI_BLEACHED_RING7]);
        plottedColors.add(allColors[IDX_ROI_BLEACHED_RING7]);
        tempSelectedROIs.add(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING7.name());
    }
    if (roi_bleached_ring8CheckBox.isEnabled() && roi_bleached_ring8CheckBox.isSelected()) {
        plottedROIs.add(allROIs[IDX_ROI_BLEACHED_RING8]);
        plottedColors.add(allColors[IDX_ROI_BLEACHED_RING8]);
        tempSelectedROIs.add(FRAPData.VFRAP_ROI_ENUM.ROI_BLEACHED_RING8.name());
    }
    // save selected ROI names
    refreshSelectedROIs(tempSelectedROIs);
    // show ROI image
    ROI[] plottedROIArray = new ROI[plottedROIs.size()];
    plottedROIArray = plottedROIs.toArray(plottedROIArray);
    Color[] plottedColorArray = new Color[plottedColors.size()];
    plottedColorArray = plottedColors.toArray(plottedColorArray);
    roiImagePanel.refreshROIImage(plottedROIArray, plottedColorArray, frapData.getRoi(FRAPData.VFRAP_ROI_ENUM.ROI_CELL.name()), Color.white);
}
Also used : FRAPData(cbit.vcell.microscopy.FRAPData) Color(java.awt.Color) ArrayList(java.util.ArrayList) ROI(cbit.vcell.VirtualMicroscopy.ROI)

Aggregations

FRAPData (cbit.vcell.microscopy.FRAPData)20 ROI (cbit.vcell.VirtualMicroscopy.ROI)7 ArrayList (java.util.ArrayList)6 FRAPStudy (cbit.vcell.microscopy.FRAPStudy)4 Color (java.awt.Color)4 ImageDataset (cbit.vcell.VirtualMicroscopy.ImageDataset)3 ImageException (cbit.image.ImageException)2 UShortImage (cbit.vcell.VirtualMicroscopy.UShortImage)2 AsynchClientTask (cbit.vcell.client.task.AsynchClientTask)2 Hashtable (java.util.Hashtable)2 DataJobEvent (cbit.rmi.event.DataJobEvent)1 DataJobListener (cbit.rmi.event.DataJobListener)1 ImageLoadingProgress (cbit.vcell.VirtualMicroscopy.ImageLoadingProgress)1 DataIdentifier (cbit.vcell.simdata.DataIdentifier)1 DataSetControllerImpl (cbit.vcell.simdata.DataSetControllerImpl)1 VCSimulationDataIdentifier (cbit.vcell.solver.VCSimulationDataIdentifier)1 VCSimulationIdentifier (cbit.vcell.solver.VCSimulationIdentifier)1 CartesianMesh (cbit.vcell.solvers.CartesianMesh)1 Rectangle (java.awt.Rectangle)1 BitSet (java.util.BitSet)1