Search in sources :

Example 16 with AnalyticSubVolume

use of cbit.vcell.geometry.AnalyticSubVolume in project vcell by virtualcell.

the class GeometrySubVolumePanel method createAnalyticSubVolume.

public static AnalyticSubVolume createAnalyticSubVolume(Component requester, int dimensions, Coordinate center, String newSubVolName) throws UserCancelException {
    // Geometry g = getGeometry();
    // final int dim = g.getDimension();
    AddShapeJPanel addShapeJPanel = new AddShapeJPanel(dimensions);
    addShapeJPanel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
    addShapeJPanel.setDefaultCenter(center.getX(), center.getY(), center.getZ());
    // (getGeometry().getDimension() > 2?getGeometry().getOrigin().getZ()+getGeometry().getExtent().getZ()/2:null));
    while (true) {
        try {
            final boolean[] acceptFlag = new boolean[] { false };
            LWContainerHandle lwParent = LWNamespace.findLWOwner(requester);
            final JDialog d = new LWTitledDialog(lwParent, "Define New Subdomain Shape");
            // BeanUtils.centerOnComponent(d, GeometrySubVolumePanel.this);
            JPanel main = new JPanel();
            BoxLayout mainBoxLayout = new BoxLayout(main, BoxLayout.Y_AXIS);
            main.setLayout(mainBoxLayout);
            JPanel menuPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
            menuPanel.add(LWNamespace.createRightSideIconMenuBar());
            main.add(menuPanel);
            JPanel addCancelJPanel = new JPanel();
            addCancelJPanel.setBorder(new EmptyBorder(10, 10, 10, 10));
            BoxLayout addCancelBoxLayout = new BoxLayout(addCancelJPanel, BoxLayout.X_AXIS);
            addCancelJPanel.setLayout(addCancelBoxLayout);
            {
                JButton helpButton = new JButton("Help");
                helpButton.addActionListener(ae -> {
                    VcellHelpViewer.showStandaloneViewer();
                });
                addCancelJPanel.add(helpButton);
            }
            JButton addJButton = new JButton("New Subdomain");
            addJButton.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    d.dispose();
                    acceptFlag[0] = true;
                }
            });
            addCancelJPanel.add(addJButton);
            JButton cancelJButton = new JButton("Cancel");
            cancelJButton.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    d.dispose();
                }
            });
            addCancelJPanel.add(cancelJButton);
            main.add(addShapeJPanel);
            main.add(Box.createVerticalStrut(10));
            main.add(addCancelJPanel);
            main.add(Box.createVerticalStrut(10));
            addShapeJPanel.addPropertyChangeListener(new PropertyChangeListener() {

                public void propertyChange(PropertyChangeEvent evt) {
                    if (evt.getPropertyName().equals(AddShapeJPanel.PROPCHANGE_VALID_ANALYTIC)) {
                        addJButton.setEnabled(((Boolean) evt.getNewValue()));
                    }
                }
            });
            d.setModalityType(ModalityType.DOCUMENT_MODAL);
            // d.setModal(true);
            d.getContentPane().add(main);
            d.pack();
            d.setSize(new Dimension(400, 400));
            d.setVisible(true);
            if (acceptFlag[0]) {
                // new Expression(addShapeJPanel.getCurrentAnalyticExpression()), -1));
                return new AnalyticSubVolume(null, newSubVolName, new Expression(addShapeJPanel.getCurrentAnalyticExpression()), -1);
            } else {
                throw UserCancelException.CANCEL_GENERIC;
            }
        } catch (UserCancelException uce) {
            throw uce;
        } catch (Exception e1) {
            e1.printStackTrace();
            DialogUtils.showErrorDialog(requester, "Error adding shape:\n" + e1.getMessage(), e1);
        }
    }
}
Also used : SubVolume(cbit.vcell.geometry.SubVolume) ActionListener(java.awt.event.ActionListener) JDialog(javax.swing.JDialog) JTextField(javax.swing.JTextField) DownArrowIcon(org.vcell.util.gui.DownArrowIcon) ModalityType(java.awt.Dialog.ModalityType) CSGObject(cbit.vcell.geometry.CSGObject) Geometry(cbit.vcell.geometry.Geometry) GeometrySpec(cbit.vcell.geometry.GeometrySpec) ImageSubVolume(cbit.vcell.geometry.ImageSubVolume) JMenuItem(javax.swing.JMenuItem) AnalyticSubVolume(cbit.vcell.geometry.AnalyticSubVolume) LWContainerHandle(org.vcell.client.logicalwindow.LWContainerHandle) ScrollTable(org.vcell.util.gui.ScrollTable) DocumentEditorSubPanel(cbit.vcell.client.desktop.biomodel.DocumentEditorSubPanel) AsynchClientTask(cbit.vcell.client.task.AsynchClientTask) PropertyChangeEvent(java.beans.PropertyChangeEvent) Hashtable(java.util.Hashtable) LWNamespace(org.vcell.client.logicalwindow.LWNamespace) BoxLayout(javax.swing.BoxLayout) VcellHelpViewer(org.vcell.documentation.VcellHelpViewer) FlowLayout(java.awt.FlowLayout) JButton(javax.swing.JButton) JPopupMenu(javax.swing.JPopupMenu) LWTitledDialog(org.vcell.client.logicalwindow.LWTitledDialog) UtilCancelException(org.vcell.util.UtilCancelException) BorderFactory(javax.swing.BorderFactory) GridBagConstraints(java.awt.GridBagConstraints) Component(java.awt.Component) ActionEvent(java.awt.event.ActionEvent) DefaultCellEditor(javax.swing.DefaultCellEditor) Box(javax.swing.Box) TokenMangler(org.vcell.util.TokenMangler) Coordinate(org.vcell.util.Coordinate) Dimension(java.awt.Dimension) PropertyChangeListener(java.beans.PropertyChangeListener) DialogUtils(org.vcell.util.gui.DialogUtils) ClientTaskDispatcher(cbit.vcell.client.task.ClientTaskDispatcher) GeometryThumbnailImageFactoryAWT(cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT) IssueManager(cbit.vcell.client.desktop.biomodel.IssueManager) JTable(javax.swing.JTable) EmptyBorder(javax.swing.border.EmptyBorder) Expression(cbit.vcell.parser.Expression) EtchedBorder(javax.swing.border.EtchedBorder) JPanel(javax.swing.JPanel) UserCancelException(org.vcell.util.UserCancelException) JPanel(javax.swing.JPanel) PropertyChangeEvent(java.beans.PropertyChangeEvent) FlowLayout(java.awt.FlowLayout) PropertyChangeListener(java.beans.PropertyChangeListener) ActionEvent(java.awt.event.ActionEvent) BoxLayout(javax.swing.BoxLayout) LWContainerHandle(org.vcell.client.logicalwindow.LWContainerHandle) JButton(javax.swing.JButton) UserCancelException(org.vcell.util.UserCancelException) Dimension(java.awt.Dimension) UtilCancelException(org.vcell.util.UtilCancelException) UserCancelException(org.vcell.util.UserCancelException) ActionListener(java.awt.event.ActionListener) Expression(cbit.vcell.parser.Expression) EmptyBorder(javax.swing.border.EmptyBorder) AnalyticSubVolume(cbit.vcell.geometry.AnalyticSubVolume) JDialog(javax.swing.JDialog) LWTitledDialog(org.vcell.client.logicalwindow.LWTitledDialog)

Example 17 with AnalyticSubVolume

use of cbit.vcell.geometry.AnalyticSubVolume in project vcell by virtualcell.

the class GeometrySubVolumePanel method deleteSubvolume.

/**
 * connEtoM1:  (DeleteButton.action.actionPerformed(java.awt.event.ActionEvent) --> Geometry.removeAnalyticSubVolume(Lcbit.vcell.geometry.AnalyticSubVolume;)V)
 * @param arg1 java.awt.event.ActionEvent
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void deleteSubvolume() {
    try {
        if ((getSelectedSubVolume() != null)) {
            AsynchClientTask task1 = new AsynchClientTask("removing subdomain", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

                @Override
                public void run(Hashtable<String, Object> hashTable) throws Exception {
                    if (getSelectedSubVolume() instanceof AnalyticSubVolume) {
                        getGeometrySpec().removeAnalyticSubVolume((AnalyticSubVolume) getSelectedSubVolume());
                    } else if (getSelectedSubVolume() instanceof CSGObject) {
                        getGeometrySpec().removeCSGObject((CSGObject) getSelectedSubVolume());
                    }
                    getGeometry().precomputeAll(new GeometryThumbnailImageFactoryAWT());
                }
            };
            ClientTaskDispatcher.dispatch(GeometrySubVolumePanel.this, new Hashtable<String, Object>(), new AsynchClientTask[] { task1 }, false);
        }
    } catch (java.lang.Throwable ivjExc) {
        handleException(ivjExc);
    }
}
Also used : GeometryThumbnailImageFactoryAWT(cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT) AsynchClientTask(cbit.vcell.client.task.AsynchClientTask) Hashtable(java.util.Hashtable) CSGObject(cbit.vcell.geometry.CSGObject) CSGObject(cbit.vcell.geometry.CSGObject) AnalyticSubVolume(cbit.vcell.geometry.AnalyticSubVolume)

Example 18 with AnalyticSubVolume

use of cbit.vcell.geometry.AnalyticSubVolume in project vcell by virtualcell.

the class GeometrySubVolumePanel method moveBack.

/**
 * connEtoM9:  (BackButton.action.actionPerformed(java.awt.event.ActionEvent) --> Geometry.sendBackward(Lcbit.vcell.geometry.AnalyticSubVolume;)V)
 * @param arg1 java.awt.event.ActionEvent
 */
private void moveBack() {
    try {
        if ((getSelectedSubVolume() != null)) {
            AsynchClientTask task1 = new AsynchClientTask("moving to back", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

                @Override
                public void run(Hashtable<String, Object> hashTable) throws Exception {
                    SubVolume selectedSubVolume = getSelectedSubVolume();
                    if (selectedSubVolume instanceof CSGObject) {
                        getGeometrySpec().sendBackward((CSGObject) selectedSubVolume);
                    } else if (selectedSubVolume instanceof AnalyticSubVolume) {
                        getGeometrySpec().sendBackward((AnalyticSubVolume) selectedSubVolume);
                    }
                    getGeometry().precomputeAll(new GeometryThumbnailImageFactoryAWT());
                }
            };
            ClientTaskDispatcher.dispatch(GeometrySubVolumePanel.this, new Hashtable<String, Object>(), new AsynchClientTask[] { task1 }, false);
        }
    } catch (java.lang.Throwable ivjExc) {
        handleException(ivjExc);
    }
}
Also used : GeometryThumbnailImageFactoryAWT(cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT) AsynchClientTask(cbit.vcell.client.task.AsynchClientTask) Hashtable(java.util.Hashtable) SubVolume(cbit.vcell.geometry.SubVolume) ImageSubVolume(cbit.vcell.geometry.ImageSubVolume) AnalyticSubVolume(cbit.vcell.geometry.AnalyticSubVolume) CSGObject(cbit.vcell.geometry.CSGObject) CSGObject(cbit.vcell.geometry.CSGObject) AnalyticSubVolume(cbit.vcell.geometry.AnalyticSubVolume)

Example 19 with AnalyticSubVolume

use of cbit.vcell.geometry.AnalyticSubVolume in project vcell by virtualcell.

the class ClientRequestManager method createNewDocument.

/**
 * Insert the method's description here.
 * Creation date: (5/10/2004 3:48:16 PM)
 */
public AsynchClientTask[] createNewDocument(final TopLevelWindowManager requester, final VCDocument.DocumentCreationInfo documentCreationInfo) {
    // throws UserCancelException, Exception {
    /* asynchronous and not blocking any window */
    AsynchClientTask[] taskArray = null;
    final int createOption = documentCreationInfo.getOption();
    switch(documentCreationInfo.getDocumentType()) {
        case BIOMODEL_DOC:
            {
                AsynchClientTask task1 = new AsynchClientTask("creating biomodel", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

                    @Override
                    public void run(Hashtable<String, Object> hashTable) throws Exception {
                        BioModel bioModel = createDefaultBioModelDocument(null);
                        hashTable.put("doc", bioModel);
                    }
                };
                taskArray = new AsynchClientTask[] { task1 };
                break;
            }
        case MATHMODEL_DOC:
            {
                if ((createOption == VCDocument.MATH_OPTION_NONSPATIAL) || (createOption == VCDocument.MATH_OPTION_SPATIAL_EXISTS)) {
                    AsynchClientTask task2 = new AsynchClientTask("creating mathmodel", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

                        @Override
                        public void run(Hashtable<String, Object> hashTable) throws Exception {
                            Geometry geometry = null;
                            if (createOption == VCDocument.MATH_OPTION_NONSPATIAL) {
                                geometry = new Geometry("Untitled", 0);
                            } else {
                                geometry = (Geometry) hashTable.get(GEOMETRY_KEY);
                            }
                            MathModel mathModel = createMathModel("Untitled", geometry);
                            mathModel.setName("MathModel" + (getMdiManager().getNumCreatedDocumentWindows() + 1));
                            hashTable.put("doc", mathModel);
                        }
                    };
                    if (createOption == VCDocument.MATH_OPTION_SPATIAL_EXISTS) {
                        AsynchClientTask task1 = createSelectDocTask(requester);
                        AsynchClientTask task1b = createSelectLoadGeomTask(requester);
                        taskArray = new AsynchClientTask[] { task1, task1b, task2 };
                    } else {
                        taskArray = new AsynchClientTask[] { task2 };
                    }
                    break;
                } else if (createOption == VCDocument.MATH_OPTION_FROMBIOMODELAPP) {
                    AsynchClientTask task1 = new AsynchClientTask("select biomodel application", AsynchClientTask.TASKTYPE_SWING_BLOCKING) {

                        @Override
                        public void run(Hashtable<String, Object> hashTable) throws Exception {
                            // spatial or non-spatial
                            BioModelInfo bioModelInfo = (BioModelInfo) DialogUtils.getDBTreePanelSelection(requester.getComponent(), getMdiManager().getDatabaseWindowManager().getBioModelDbTreePanel(), "Open", "Select BioModel");
                            if (bioModelInfo != null) {
                                // may throw UserCancelException
                                hashTable.put("bioModelInfo", bioModelInfo);
                            }
                        }
                    };
                    AsynchClientTask task2 = new AsynchClientTask("find sim contexts in biomodel application", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

                        @Override
                        public void run(Hashtable<String, Object> hashTable) throws Exception {
                            // spatial or non-spatial
                            // Get the simContexts in the corresponding BioModel
                            BioModelInfo bioModelInfo = (BioModelInfo) hashTable.get("bioModelInfo");
                            SimulationContext[] simContexts = getDocumentManager().getBioModel(bioModelInfo).getSimulationContexts();
                            if (simContexts != null) {
                                // may throw UserCancelException
                                hashTable.put("simContexts", simContexts);
                            }
                        }
                    };
                    AsynchClientTask task3 = new AsynchClientTask("create math model from biomodel application", AsynchClientTask.TASKTYPE_SWING_BLOCKING) {

                        @Override
                        public void run(Hashtable<String, Object> hashTable) throws Exception {
                            SimulationContext[] simContexts = (SimulationContext[]) hashTable.get("simContexts");
                            String[] simContextNames = new String[simContexts.length];
                            if (simContextNames.length == 0) {
                                throw new RuntimeException("no application is available");
                            } else {
                                for (int i = 0; i < simContexts.length; i++) {
                                    simContextNames[i] = simContexts[i].getName();
                                }
                                Component component = requester.getComponent();
                                // Get the simContext names, so that user can choose which simContext math to import
                                String simContextChoice = (String) PopupGenerator.showListDialog(component, simContextNames, "Please select Application");
                                if (simContextChoice == null) {
                                    throw UserCancelException.CANCEL_DB_SELECTION;
                                }
                                SimulationContext chosenSimContext = null;
                                for (int i = 0; i < simContexts.length; i++) {
                                    if (simContexts[i].getName().equals(simContextChoice)) {
                                        chosenSimContext = simContexts[i];
                                        break;
                                    }
                                }
                                Objects.requireNonNull(chosenSimContext);
                                BioModelInfo bioModelInfo = (BioModelInfo) hashTable.get("bioModelInfo");
                                // Get corresponding mathDesc to create new mathModel and return.
                                String newName = bioModelInfo.getVersion().getName() + "_" + chosenSimContext.getName();
                                MathDescription bioMathDesc = chosenSimContext.getMathDescription();
                                MathDescription newMathDesc = null;
                                newMathDesc = new MathDescription(newName + "_" + (new Random()).nextInt());
                                newMathDesc.setGeometry(bioMathDesc.getGeometry());
                                newMathDesc.read_database(new CommentStringTokenizer(bioMathDesc.getVCML_database()));
                                newMathDesc.isValid();
                                MathModel newMathModel = new MathModel(null);
                                newMathModel.setName(newName);
                                newMathModel.setMathDescription(newMathDesc);
                                hashTable.put("doc", newMathModel);
                            }
                        }
                    };
                    taskArray = new AsynchClientTask[] { task1, task2, task3 };
                    break;
                } else {
                    throw new RuntimeException("Unknown MathModel Document creation option value=" + documentCreationInfo.getOption());
                }
            }
        case GEOMETRY_DOC:
            {
                if (createOption == VCDocument.GEOM_OPTION_1D || createOption == VCDocument.GEOM_OPTION_2D || createOption == VCDocument.GEOM_OPTION_3D) {
                    // analytic
                    AsynchClientTask task1 = new AsynchClientTask("creating analytic geometry", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

                        @Override
                        public void run(Hashtable<String, Object> hashTable) throws Exception {
                            Geometry geometry = new Geometry("Geometry" + (getMdiManager().getNumCreatedDocumentWindows() + 1), documentCreationInfo.getOption());
                            geometry.getGeometrySpec().addSubVolume(new AnalyticSubVolume("subdomain0", new Expression(1.0)));
                            geometry.precomputeAll(new GeometryThumbnailImageFactoryAWT());
                            hashTable.put("doc", geometry);
                        }
                    };
                    taskArray = new AsynchClientTask[] { task1 };
                    break;
                }
                if (createOption == VCDocument.GEOM_OPTION_CSGEOMETRY_3D) {
                    // constructed solid geometry
                    AsynchClientTask task1 = new AsynchClientTask("creating constructed solid geometry", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

                        @Override
                        public void run(Hashtable<String, Object> hashTable) throws Exception {
                            Geometry geometry = new Geometry("Geometry" + (getMdiManager().getNumCreatedDocumentWindows() + 1), 3);
                            Extent extent = geometry.getExtent();
                            if (extent != null) {
                                // create a CSGPrimitive of type cube and scale it to the 'extent' components. Use this as the default or background CSGObject (subdomain).
                                // This can be considered as the equivalent of subdomain (with expression) 1.0 for analyticSubvolume.
                                // basic cube
                                CSGPrimitive cube = new CSGPrimitive("cube", CSGPrimitive.PrimitiveType.CUBE);
                                // scaled cube
                                double x = extent.getX();
                                double y = extent.getY();
                                double z = extent.getZ();
                                CSGScale scaledCube = new CSGScale("scale", new Vect3d(x / 2.0, y / 2.0, z / 2.0));
                                scaledCube.setChild(cube);
                                // translated scaled cube
                                CSGTranslation translatedScaledCube = new CSGTranslation("translation", new Vect3d(x / 2, y / 2, z / 2));
                                translatedScaledCube.setChild(scaledCube);
                                CSGObject csgObject = new CSGObject(null, "subdomain0", 0);
                                csgObject.setRoot(translatedScaledCube);
                                geometry.getGeometrySpec().addSubVolume(csgObject, false);
                                geometry.precomputeAll(new GeometryThumbnailImageFactoryAWT());
                                hashTable.put("doc", geometry);
                            }
                        }
                    };
                    taskArray = new AsynchClientTask[] { task1 };
                    break;
                } else {
                    throw new RuntimeException("Unknown Geometry Document creation option value=" + documentCreationInfo.getOption());
                }
            }
        default:
            {
                throw new RuntimeException("Unknown default document type: " + documentCreationInfo.getDocumentType());
            }
    }
    return taskArray;
}
Also used : AsynchClientTask(cbit.vcell.client.task.AsynchClientTask) MathModel(cbit.vcell.mathmodel.MathModel) SetMathDescription(cbit.vcell.client.task.SetMathDescription) MathDescription(cbit.vcell.math.MathDescription) Extent(org.vcell.util.Extent) CSGPrimitive(cbit.vcell.geometry.CSGPrimitive) CSGScale(cbit.vcell.geometry.CSGScale) GeometryThumbnailImageFactoryAWT(cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT) Random(java.util.Random) Component(java.awt.Component) CSGObject(cbit.vcell.geometry.CSGObject) CSGTranslation(cbit.vcell.geometry.CSGTranslation) Hashtable(java.util.Hashtable) BioModelInfo(org.vcell.util.document.BioModelInfo) SimulationContext(cbit.vcell.mapping.SimulationContext) ProgrammingException(org.vcell.util.ProgrammingException) GeometryException(cbit.vcell.geometry.GeometryException) IOException(java.io.IOException) DataAccessException(org.vcell.util.DataAccessException) PropertyVetoException(java.beans.PropertyVetoException) ImageException(cbit.image.ImageException) UtilCancelException(org.vcell.util.UtilCancelException) DataFormatException(java.util.zip.DataFormatException) UserCancelException(org.vcell.util.UserCancelException) Vect3d(cbit.vcell.render.Vect3d) Geometry(cbit.vcell.geometry.Geometry) Expression(cbit.vcell.parser.Expression) BioModel(cbit.vcell.biomodel.BioModel) CommentStringTokenizer(org.vcell.util.CommentStringTokenizer) CSGObject(cbit.vcell.geometry.CSGObject) AnalyticSubVolume(cbit.vcell.geometry.AnalyticSubVolume)

Example 20 with AnalyticSubVolume

use of cbit.vcell.geometry.AnalyticSubVolume in project vcell by virtualcell.

the class SBMLExporter method addGeometry.

private void addGeometry() throws SbmlException {
    SpatialModelPlugin mplugin = (SpatialModelPlugin) sbmlModel.getPlugin(SBMLUtils.SBML_SPATIAL_NS_PREFIX);
    // Creates a geometry object via SpatialModelPlugin object.
    org.sbml.jsbml.ext.spatial.Geometry sbmlGeometry = mplugin.createGeometry();
    sbmlGeometry.setCoordinateSystem(GeometryKind.cartesian);
    sbmlGeometry.setSpatialId("vcell");
    Geometry vcGeometry = getSelectedSimContext().getGeometry();
    Model vcModel = getSelectedSimContext().getModel();
    // 
    // list of CoordinateComponents : 1 if geometry is 1-d, 2 if geometry is 2-d, 3 if geometry is 3-d
    // 
    int dimension = vcGeometry.getDimension();
    Extent vcExtent = vcGeometry.getExtent();
    Origin vcOrigin = vcGeometry.getOrigin();
    // add x coordinate component
    CoordinateComponent xComp = sbmlGeometry.createCoordinateComponent();
    xComp.setSpatialId(vcModel.getX().getName());
    xComp.setType(CoordinateKind.cartesianX);
    final UnitDefinition sbmlUnitDef_length = getOrCreateSBMLUnit(vcModel.getUnitSystem().getLengthUnit());
    xComp.setUnits(sbmlUnitDef_length);
    Boundary minX = new Boundary();
    xComp.setBoundaryMinimum(minX);
    minX.setSpatialId("Xmin");
    minX.setValue(vcOrigin.getX());
    Boundary maxX = new Boundary();
    xComp.setBoundaryMaximum(maxX);
    maxX.setSpatialId("Xmax");
    maxX.setValue(vcOrigin.getX() + (vcExtent.getX()));
    org.sbml.jsbml.Parameter pX = sbmlModel.createParameter();
    pX.setId(vcModel.getX().getName());
    pX.setValue(0.0);
    pX.setConstant(false);
    pX.setUnits(sbmlUnitDef_length);
    SpatialParameterPlugin spPluginPx = (SpatialParameterPlugin) pX.getPlugin(SBMLUtils.SBML_SPATIAL_NS_PREFIX);
    SpatialSymbolReference spSymRefPx = new SpatialSymbolReference();
    spPluginPx.setParamType(spSymRefPx);
    spSymRefPx.setSpatialRef(xComp.getSpatialId());
    // add y coordinate component
    if (dimension == 2 || dimension == 3) {
        CoordinateComponent yComp = sbmlGeometry.createCoordinateComponent();
        yComp.setSpatialId(vcModel.getY().getName());
        yComp.setType(CoordinateKind.cartesianY);
        yComp.setUnits(sbmlUnitDef_length);
        Boundary minY = new Boundary();
        yComp.setBoundaryMinimum(minY);
        minY.setSpatialId("Ymin");
        minY.setValue(vcOrigin.getY());
        Boundary maxY = new Boundary();
        yComp.setBoundaryMaximum(maxY);
        maxY.setSpatialId("Ymax");
        maxY.setValue(vcOrigin.getY() + (vcExtent.getY()));
        org.sbml.jsbml.Parameter pY = sbmlModel.createParameter();
        pY.setId(vcModel.getY().getName());
        pY.setValue(0.0);
        pY.setConstant(false);
        pY.setUnits(sbmlUnitDef_length);
        SpatialParameterPlugin spPluginPy = (SpatialParameterPlugin) pY.getPlugin(SBMLUtils.SBML_SPATIAL_NS_PREFIX);
        SpatialSymbolReference spSymRefPy = new SpatialSymbolReference();
        spPluginPy.setParamType(spSymRefPy);
        spSymRefPy.setSpatialRef(yComp.getSpatialId());
    }
    // add z coordinate component
    if (dimension == 3) {
        CoordinateComponent zComp = sbmlGeometry.createCoordinateComponent();
        zComp.setSpatialId(vcModel.getZ().getName());
        zComp.setType(CoordinateKind.cartesianZ);
        zComp.setUnits(sbmlUnitDef_length);
        Boundary minZ = new Boundary();
        zComp.setBoundaryMinimum(minZ);
        minZ.setSpatialId("Zmin");
        minZ.setValue(vcOrigin.getZ());
        Boundary maxZ = new Boundary();
        zComp.setBoundaryMaximum(maxZ);
        maxZ.setSpatialId("Zmax");
        maxZ.setValue(vcOrigin.getZ() + (vcExtent.getZ()));
        org.sbml.jsbml.Parameter pZ = sbmlModel.createParameter();
        pZ.setId(vcModel.getZ().getName());
        pZ.setValue(0.0);
        pZ.setConstant(false);
        pZ.setUnits(sbmlUnitDef_length);
        SpatialParameterPlugin spPluginPz = (SpatialParameterPlugin) pZ.getPlugin(SBMLUtils.SBML_SPATIAL_NS_PREFIX);
        SpatialSymbolReference spSymRefPz = new SpatialSymbolReference();
        spPluginPz.setParamType(spSymRefPz);
        spSymRefPz.setSpatialRef(zComp.getSpatialId());
    }
    // 
    // list of compartmentMappings : VC structureMappings
    // 
    GeometryContext vcGeoContext = getSelectedSimContext().getGeometryContext();
    StructureMapping[] vcStrucMappings = vcGeoContext.getStructureMappings();
    for (int i = 0; i < vcStrucMappings.length; i++) {
        StructureMapping vcStructMapping = vcStrucMappings[i];
        String structName = vcStructMapping.getStructure().getName();
        Compartment comp = sbmlModel.getCompartment(TokenMangler.mangleToSName(structName));
        SpatialCompartmentPlugin cplugin = (SpatialCompartmentPlugin) comp.getPlugin(SBMLUtils.SBML_SPATIAL_NS_PREFIX);
        GeometryClass gc = vcStructMapping.getGeometryClass();
        if (!goodPointer(gc, GeometryClass.class, structName)) {
            continue;
        }
        CompartmentMapping compMapping = new CompartmentMapping();
        cplugin.setCompartmentMapping(compMapping);
        String geomClassName = gc.getName();
        String id = TokenMangler.mangleToSName(geomClassName + structName);
        compMapping.setSpatialId(id);
        compMapping.setDomainType(TokenMangler.mangleToSName(DOMAIN_TYPE_PREFIX + geomClassName));
        try {
            StructureMappingParameter usp = vcStructMapping.getUnitSizeParameter();
            Expression e = usp.getExpression();
            if (goodPointer(e, Expression.class, id)) {
                compMapping.setUnitSize(e.evaluateConstant());
            }
        } catch (ExpressionException e) {
            e.printStackTrace(System.out);
            throw new RuntimeException("Unable to create compartment mapping for structureMapping '" + compMapping.getId() + "' : " + e.getMessage());
        }
    }
    // 
    // list of domain types : subvolumes and surface classes from VC
    // 
    boolean bAnyAnalyticSubvolumes = false;
    boolean bAnyImageSubvolumes = false;
    boolean bAnyCSGSubvolumes = false;
    GeometryClass[] vcGeomClasses = vcGeometry.getGeometryClasses();
    int numSubVols = 0;
    for (int i = 0; i < vcGeomClasses.length; i++) {
        DomainType domainType = sbmlGeometry.createDomainType();
        domainType.setSpatialId(DOMAIN_TYPE_PREFIX + vcGeomClasses[i].getName());
        if (vcGeomClasses[i] instanceof SubVolume) {
            if (((SubVolume) vcGeomClasses[i]) instanceof AnalyticSubVolume) {
                bAnyAnalyticSubvolumes = true;
            } else if (((SubVolume) vcGeomClasses[i]) instanceof ImageSubVolume) {
                bAnyImageSubvolumes = true;
            } else if (((SubVolume) vcGeomClasses[i]) instanceof CSGObject) {
                bAnyCSGSubvolumes = true;
            }
            domainType.setSpatialDimensions(3);
            numSubVols++;
        } else if (vcGeomClasses[i] instanceof SurfaceClass) {
            domainType.setSpatialDimensions(2);
        }
    }
    // 
    // list of domains, adjacent domains : from VC geometricRegions
    // 
    GeometrySurfaceDescription vcGSD = vcGeometry.getGeometrySurfaceDescription();
    if (vcGSD.getRegionImage() == null) {
        try {
            vcGSD.updateAll();
        } catch (Exception e) {
            e.printStackTrace(System.out);
            throw new RuntimeException("Unable to generate region images for geometry");
        }
    }
    GeometricRegion[] vcGeometricRegions = vcGSD.getGeometricRegions();
    ISize sampleSize = vcGSD.getVolumeSampleSize();
    int numX = sampleSize.getX();
    int numY = sampleSize.getY();
    int numZ = sampleSize.getZ();
    double ox = vcOrigin.getX();
    double oy = vcOrigin.getY();
    double oz = vcOrigin.getZ();
    RegionInfo[] regionInfos = vcGSD.getRegionImage().getRegionInfos();
    for (int i = 0; i < vcGeometricRegions.length; i++) {
        // domains
        Domain domain = sbmlGeometry.createDomain();
        domain.setSpatialId(vcGeometricRegions[i].getName());
        if (vcGeometricRegions[i] instanceof VolumeGeometricRegion) {
            domain.setDomainType(DOMAIN_TYPE_PREFIX + ((VolumeGeometricRegion) vcGeometricRegions[i]).getSubVolume().getName());
            // 
            // get a list of interior points ... should probably use the distance map to find a point
            // furthest inside (or several points associated with the morphological skeleton).
            // 
            InteriorPoint interiorPt = domain.createInteriorPoint();
            int regionID = ((VolumeGeometricRegion) vcGeometricRegions[i]).getRegionID();
            boolean bFound = false;
            int regInfoIndx = 0;
            for (int j = 0; j < regionInfos.length; j++) {
                regInfoIndx = j;
                if (regionInfos[j].getRegionIndex() == regionID) {
                    int volIndx = 0;
                    for (int z = 0; z < numZ && !bFound; z++) {
                        for (int y = 0; y < numY && !bFound; y++) {
                            for (int x = 0; x < numX && !bFound; x++) {
                                if (regionInfos[j].isIndexInRegion(volIndx)) {
                                    bFound = true;
                                    double unit_z = (numZ > 1) ? ((double) z) / (numZ - 1) : 0.5;
                                    double coordZ = oz + vcExtent.getZ() * unit_z;
                                    double unit_y = (numY > 1) ? ((double) y) / (numY - 1) : 0.5;
                                    double coordY = oy + vcExtent.getY() * unit_y;
                                    double unit_x = (numX > 1) ? ((double) x) / (numX - 1) : 0.5;
                                    double coordX = ox + vcExtent.getX() * unit_x;
                                    interiorPt.setCoord1(coordX);
                                    interiorPt.setCoord2(coordY);
                                    interiorPt.setCoord3(coordZ);
                                }
                                volIndx++;
                            }
                        // end - for x
                        }
                    // end - for y
                    }
                // end - for z
                }
            // end if
            }
            // end for regionInfos
            if (!bFound) {
                throw new RuntimeException("Unable to find interior point for region '" + regionInfos[regInfoIndx].toString());
            }
        } else if (vcGeometricRegions[i] instanceof SurfaceGeometricRegion) {
            SurfaceGeometricRegion vcSurfaceGeomReg = (SurfaceGeometricRegion) vcGeometricRegions[i];
            GeometricRegion geomRegion0 = vcSurfaceGeomReg.getAdjacentGeometricRegions()[0];
            GeometricRegion geomRegion1 = vcSurfaceGeomReg.getAdjacentGeometricRegions()[1];
            SurfaceClass surfaceClass = vcGSD.getSurfaceClass(((VolumeGeometricRegion) geomRegion0).getSubVolume(), ((VolumeGeometricRegion) geomRegion1).getSubVolume());
            domain.setDomainType(DOMAIN_TYPE_PREFIX + surfaceClass.getName());
            // adjacent domains : 2 adjacent domain objects for each surfaceClass in VC.
            // adjacent domain 1
            GeometricRegion adjGeomRegion0 = vcSurfaceGeomReg.getAdjacentGeometricRegions()[0];
            GeometricRegion adjGeomRegion1 = vcSurfaceGeomReg.getAdjacentGeometricRegions()[1];
            AdjacentDomains adjDomain = new AdjacentDomains();
            adjDomain.setSpatialId(TokenMangler.mangleToSName(vcSurfaceGeomReg.getName() + "_" + adjGeomRegion0.getName()));
            adjDomain.setDomain1(vcSurfaceGeomReg.getName());
            adjDomain.setDomain2(adjGeomRegion0.getName());
            sbmlGeometry.addAdjacentDomain(adjDomain);
            // adj domain 2
            adjDomain = new AdjacentDomains();
            adjDomain.setSpatialId(TokenMangler.mangleToSName(vcSurfaceGeomReg.getName() + "_" + adjGeomRegion1.getName()));
            adjDomain.setDomain1(vcSurfaceGeomReg.getName());
            adjDomain.setDomain2(adjGeomRegion1.getName());
            sbmlGeometry.addAdjacentDomain(adjDomain);
        }
    }
    // 
    if (bAnyAnalyticSubvolumes && !bAnyImageSubvolumes && !bAnyCSGSubvolumes) {
        AnalyticGeometry sbmlAnalyticGeomDefinition = sbmlGeometry.createAnalyticGeometry();
        sbmlAnalyticGeomDefinition.setSpatialId(TokenMangler.mangleToSName("Analytic_" + vcGeometry.getName()));
        sbmlAnalyticGeomDefinition.setIsActive(true);
        for (int i = 0; i < vcGeomClasses.length; i++) {
            if (vcGeomClasses[i] instanceof AnalyticSubVolume) {
                AnalyticVolume analyticVol = sbmlAnalyticGeomDefinition.createAnalyticVolume();
                analyticVol.setSpatialId(vcGeomClasses[i].getName());
                analyticVol.setDomainType(DOMAIN_TYPE_PREFIX + vcGeomClasses[i].getName());
                analyticVol.setFunctionType(FunctionKind.layered);
                analyticVol.setOrdinal(numSubVols - (i + 1));
                Expression expr = ((AnalyticSubVolume) vcGeomClasses[i]).getExpression();
                try {
                    String mathMLStr = ExpressionMathMLPrinter.getMathML(expr, true, MathType.BOOLEAN);
                    ASTNode mathMLNode = ASTNode.readMathMLFromString(mathMLStr);
                    analyticVol.setMath(mathMLNode);
                } catch (Exception e) {
                    e.printStackTrace(System.out);
                    throw new RuntimeException("Error converting VC subvolume expression to mathML" + e.getMessage());
                }
            }
        }
    }
    // 
    if (!bAnyAnalyticSubvolumes && !bAnyImageSubvolumes && bAnyCSGSubvolumes) {
        CSGeometry sbmlCSGeomDefinition = new CSGeometry();
        sbmlGeometry.addGeometryDefinition(sbmlCSGeomDefinition);
        sbmlCSGeomDefinition.setSpatialId(TokenMangler.mangleToSName("CSG_" + vcGeometry.getName()));
        for (int i = 0; i < vcGeomClasses.length; i++) {
            if (vcGeomClasses[i] instanceof CSGObject) {
                CSGObject vcellCSGObject = (CSGObject) vcGeomClasses[i];
                org.sbml.jsbml.ext.spatial.CSGObject sbmlCSGObject = new org.sbml.jsbml.ext.spatial.CSGObject();
                sbmlCSGeomDefinition.addCSGObject(sbmlCSGObject);
                sbmlCSGObject.setSpatialId(vcellCSGObject.getName());
                sbmlCSGObject.setDomainType(DOMAIN_TYPE_PREFIX + vcellCSGObject.getName());
                // the ordinal should the the least for the default/background subVolume
                sbmlCSGObject.setOrdinal(numSubVols - (i + 1));
                org.sbml.jsbml.ext.spatial.CSGNode sbmlcsgNode = getSBMLCSGNode(vcellCSGObject.getRoot());
                sbmlCSGObject.setCSGNode(sbmlcsgNode);
            }
        }
    }
    // 
    // add "Segmented" and "DistanceMap" SampledField Geometries
    // 
    final boolean bVCGeometryIsImage = bAnyImageSubvolumes && !bAnyAnalyticSubvolumes && !bAnyCSGSubvolumes;
    // 55if (bAnyAnalyticSubvolumes || bAnyImageSubvolumes || bAnyCSGSubvolumes){
    if (bVCGeometryIsImage) {
        // 
        // add "Segmented" SampledFieldGeometry
        // 
        SampledFieldGeometry segmentedImageSampledFieldGeometry = sbmlGeometry.createSampledFieldGeometry();
        segmentedImageSampledFieldGeometry.setSpatialId(TokenMangler.mangleToSName("SegmentedImage_" + vcGeometry.getName()));
        segmentedImageSampledFieldGeometry.setIsActive(true);
        // 55boolean bVCGeometryIsImage = bAnyImageSubvolumes && !bAnyAnalyticSubvolumes && !bAnyCSGSubvolumes;
        Geometry vcImageGeometry = null;
        {
            if (bVCGeometryIsImage) {
                // make a resampled image;
                if (dimension == 3) {
                    try {
                        ISize imageSize = vcGeometry.getGeometrySpec().getDefaultSampledImageSize();
                        vcGeometry.precomputeAll(new GeometryThumbnailImageFactoryAWT());
                        vcImageGeometry = RayCaster.resampleGeometry(new GeometryThumbnailImageFactoryAWT(), vcGeometry, imageSize);
                    } catch (Throwable e) {
                        e.printStackTrace(System.out);
                        throw new RuntimeException("Unable to convert the original analytic or constructed solid geometry to image-based geometry : " + e.getMessage());
                    }
                } else {
                    try {
                        vcGeometry.precomputeAll(new GeometryThumbnailImageFactoryAWT(), true, false);
                        GeometrySpec origGeometrySpec = vcGeometry.getGeometrySpec();
                        VCImage newVCImage = origGeometrySpec.getSampledImage().getCurrentValue();
                        // 
                        // construct the new geometry with the sampled VCImage.
                        // 
                        vcImageGeometry = new Geometry(vcGeometry.getName() + "_asImage", newVCImage);
                        vcImageGeometry.getGeometrySpec().setExtent(vcGeometry.getExtent());
                        vcImageGeometry.getGeometrySpec().setOrigin(vcGeometry.getOrigin());
                        vcImageGeometry.setDescription(vcGeometry.getDescription());
                        vcImageGeometry.getGeometrySurfaceDescription().setFilterCutoffFrequency(vcGeometry.getGeometrySurfaceDescription().getFilterCutoffFrequency());
                        vcImageGeometry.precomputeAll(new GeometryThumbnailImageFactoryAWT(), true, true);
                    } catch (Exception e) {
                        e.printStackTrace(System.out);
                        throw new RuntimeException("Unable to convert the original analytic or constructed solid geometry to image-based geometry : " + e.getMessage());
                    }
                }
                GeometryClass[] vcImageGeomClasses = vcImageGeometry.getGeometryClasses();
                for (int j = 0; j < vcImageGeomClasses.length; j++) {
                    if (vcImageGeomClasses[j] instanceof ImageSubVolume) {
                        SampledVolume sampledVol = segmentedImageSampledFieldGeometry.createSampledVolume();
                        sampledVol.setSpatialId(vcGeomClasses[j].getName());
                        sampledVol.setDomainType(DOMAIN_TYPE_PREFIX + vcGeomClasses[j].getName());
                        sampledVol.setSampledValue(((ImageSubVolume) vcImageGeomClasses[j]).getPixelValue());
                    }
                }
                // add sampledField to sampledFieldGeometry
                SampledField segmentedImageSampledField = sbmlGeometry.createSampledField();
                VCImage vcImage = vcImageGeometry.getGeometrySpec().getImage();
                segmentedImageSampledField.setSpatialId("SegmentedImageSampledField");
                segmentedImageSampledField.setNumSamples1(vcImage.getNumX());
                segmentedImageSampledField.setNumSamples2(vcImage.getNumY());
                segmentedImageSampledField.setNumSamples3(vcImage.getNumZ());
                segmentedImageSampledField.setInterpolationType(InterpolationKind.nearestneighbor);
                segmentedImageSampledField.setCompression(CompressionKind.uncompressed);
                segmentedImageSampledField.setDataType(DataKind.UINT8);
                segmentedImageSampledFieldGeometry.setSampledField(segmentedImageSampledField.getId());
                try {
                    byte[] vcImagePixelsBytes = vcImage.getPixels();
                    // imageData.setCompression("");
                    StringBuffer sb = new StringBuffer();
                    for (int i = 0; i < vcImagePixelsBytes.length; i++) {
                        int uint8_sample = ((int) vcImagePixelsBytes[i]) & 0xff;
                        sb.append(uint8_sample + " ");
                    }
                    segmentedImageSampledField.setSamplesLength(vcImage.getNumXYZ());
                    segmentedImageSampledField.setSamples(sb.toString().trim());
                } catch (ImageException e) {
                    e.printStackTrace(System.out);
                    throw new RuntimeException("Unable to export image from VCell to SBML : " + e.getMessage());
                }
            }
        }
    /*		
		//
		// add "DistanceMap" SampledFieldGeometry if there are exactly two subvolumes (else need more fields) and geometry is 3d.
		//
		if (numSubVols==2 && dimension == 3){
			SignedDistanceMap[] distanceMaps = null;
			try {
				distanceMaps = DistanceMapGenerator.computeDistanceMaps(vcImageGeometry, vcImageGeometry.getGeometrySpec().getImage(), false, false);
			} catch (ImageException e) {
				e.printStackTrace(System.out);
				System.err.println("Unable to export distance map sampled field from VCell to SBML : " + e.getMessage());
				// throw new RuntimeException("Unable to export distance map sampled field from VCell to SBML : " + e.getMessage());
				
				// don't want to throw an exception and stop export because distance map geometry couldn't be exported. 
				// just 'return' from method (since this is the last thing that is being done in this method).
				return;
			}
			//
			// the two distanceMaps should be redundant (one is negation of the other) ... so choose first one for field.
			//
			double[] signedDistances = distanceMaps[0].getSignedDistances();
			SampledFieldGeometry distanceMapSampledFieldGeometry = sbmlGeometry.createSampledFieldGeometry();
			distanceMapSampledFieldGeometry.setSpatialId(TokenMangler.mangleToSName("DistanceMap_"+vcGeometry.getName()));
			SampledField distanceMapSampledField = distanceMapSampledFieldGeometry.createSampledField();
			distanceMapSampledField.setSpatialId("DistanceMapSampledField");
			distanceMapSampledField.setNumSamples1(distanceMaps[0].getSamplesX().length);
			distanceMapSampledField.setNumSamples2(distanceMaps[0].getSamplesY().length);
			distanceMapSampledField.setNumSamples3(distanceMaps[0].getSamplesZ().length);
			distanceMapSampledField.setDataType("real");
System.err.println("do we need distanceMapSampleField.setDataType()?");
			distanceMapSampledField.setInterpolationType("linear");
			ImageData distanceMapImageData = distanceMapSampledField.createImageData();
			distanceMapImageData.setDataType("int16");
System.err.println("should be:\n  distanceMapImageData.setDataType(\"float32\")");
//					distanceMapImageData.setCompression("");

			double maxAbsValue = 0;
			for (int i = 0; i < signedDistances.length; i++) {
				maxAbsValue = Math.max(maxAbsValue,Math.abs(signedDistances[i]));
			}
			if (maxAbsValue==0.0){
				throw new RuntimeException("computed distance map all zeros");
			}
			double scale = (Short.MAX_VALUE-1)/maxAbsValue;
			int[] scaledIntegerDistanceMap = new int[signedDistances.length];
			for (int i = 0; i < signedDistances.length; i++) {
				scaledIntegerDistanceMap[i] = (int)(scale * signedDistances[i]);
			}
			distanceMapImageData.setSamples(scaledIntegerDistanceMap, signedDistances.length);
System.err.println("should be:\n  distanceMapImageData.setSamples((float[])signedDistances,signedDistances.length)");
			SampledVolume sampledVol = distanceMapSampledFieldGeometry.createSampledVolume();
			sampledVol.setSpatialId(distanceMaps[0].getInsideSubvolumeName());
			sampledVol.setDomainType(DOMAIN_TYPE_PREFIX+distanceMaps[0].getInsideSubvolumeName());
			sampledVol.setSampledValue(255);
			sampledVol = distanceMapSampledFieldGeometry.createSampledVolume();
			sampledVol.setSpatialId(distanceMaps[1].getInsideSubvolumeName());
			sampledVol.setDomainType(DOMAIN_TYPE_PREFIX+distanceMaps[1].getInsideSubvolumeName());
			sampledVol.setSampledValue(1);
		}
*/
    }
// 
// add "SurfaceMesh" ParametricGeometry
// 
// if (bAnyAnalyticSubvolumes || bAnyImageSubvolumes || bAnyCSGSubvolumes){
// ParametricGeometry sbmlParametricGeomDefinition = sbmlGeometry.createParametricGeometry();
// sbmlParametricGeomDefinition.setSpatialId(TokenMangler.mangleToSName("SurfaceMesh_"+vcGeometry.getName()));
// xxxx
// }
}
Also used : Origin(org.vcell.util.Origin) CompartmentMapping(org.sbml.jsbml.ext.spatial.CompartmentMapping) Compartment(org.sbml.jsbml.Compartment) SpatialParameterPlugin(org.sbml.jsbml.ext.spatial.SpatialParameterPlugin) StructureMappingParameter(cbit.vcell.mapping.StructureMapping.StructureMappingParameter) AnalyticGeometry(org.sbml.jsbml.ext.spatial.AnalyticGeometry) ExpressionException(cbit.vcell.parser.ExpressionException) Boundary(org.sbml.jsbml.ext.spatial.Boundary) GeometrySpec(cbit.vcell.geometry.GeometrySpec) DomainType(org.sbml.jsbml.ext.spatial.DomainType) SampledVolume(org.sbml.jsbml.ext.spatial.SampledVolume) SubVolume(cbit.vcell.geometry.SubVolume) ImageSubVolume(cbit.vcell.geometry.ImageSubVolume) AnalyticSubVolume(cbit.vcell.geometry.AnalyticSubVolume) GeometryContext(cbit.vcell.mapping.GeometryContext) SpatialCompartmentPlugin(org.sbml.jsbml.ext.spatial.SpatialCompartmentPlugin) CoordinateComponent(org.sbml.jsbml.ext.spatial.CoordinateComponent) SimulationContext(cbit.vcell.mapping.SimulationContext) SpeciesContext(cbit.vcell.model.SpeciesContext) GeometryContext(cbit.vcell.mapping.GeometryContext) VolumeGeometricRegion(cbit.vcell.geometry.surface.VolumeGeometricRegion) SurfaceGeometricRegion(cbit.vcell.geometry.surface.SurfaceGeometricRegion) VolumeGeometricRegion(cbit.vcell.geometry.surface.VolumeGeometricRegion) GeometricRegion(cbit.vcell.geometry.surface.GeometricRegion) SpatialSymbolReference(org.sbml.jsbml.ext.spatial.SpatialSymbolReference) AnalyticVolume(org.sbml.jsbml.ext.spatial.AnalyticVolume) InteriorPoint(org.sbml.jsbml.ext.spatial.InteriorPoint) SampledField(org.sbml.jsbml.ext.spatial.SampledField) Domain(org.sbml.jsbml.ext.spatial.Domain) AnalyticSubVolume(cbit.vcell.geometry.AnalyticSubVolume) GeometryClass(cbit.vcell.geometry.GeometryClass) ImageException(cbit.image.ImageException) GeometrySurfaceDescription(cbit.vcell.geometry.surface.GeometrySurfaceDescription) Extent(org.vcell.util.Extent) SurfaceClass(cbit.vcell.geometry.SurfaceClass) ISize(org.vcell.util.ISize) CSGeometry(org.sbml.jsbml.ext.spatial.CSGeometry) RegionInfo(cbit.vcell.geometry.RegionImage.RegionInfo) VCImage(cbit.image.VCImage) StructureMapping(cbit.vcell.mapping.StructureMapping) GeometryThumbnailImageFactoryAWT(cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT) ASTNode(org.sbml.jsbml.ASTNode) CSGObject(cbit.vcell.geometry.CSGObject) VCUnitDefinition(cbit.vcell.units.VCUnitDefinition) UnitDefinition(org.sbml.jsbml.UnitDefinition) ImageSubVolume(cbit.vcell.geometry.ImageSubVolume) SurfaceGeometricRegion(cbit.vcell.geometry.surface.SurfaceGeometricRegion) SampledFieldGeometry(org.sbml.jsbml.ext.spatial.SampledFieldGeometry) SpatialModelPlugin(org.sbml.jsbml.ext.spatial.SpatialModelPlugin) InteriorPoint(org.sbml.jsbml.ext.spatial.InteriorPoint) XMLStreamException(javax.xml.stream.XMLStreamException) SbmlException(org.vcell.sbml.SbmlException) ImageException(cbit.image.ImageException) SBMLException(org.sbml.jsbml.SBMLException) ExpressionException(cbit.vcell.parser.ExpressionException) AdjacentDomains(org.sbml.jsbml.ext.spatial.AdjacentDomains) Geometry(cbit.vcell.geometry.Geometry) SampledFieldGeometry(org.sbml.jsbml.ext.spatial.SampledFieldGeometry) AnalyticGeometry(org.sbml.jsbml.ext.spatial.AnalyticGeometry) CSGeometry(org.sbml.jsbml.ext.spatial.CSGeometry) Expression(cbit.vcell.parser.Expression) Model(cbit.vcell.model.Model) BioModel(cbit.vcell.biomodel.BioModel)

Aggregations

AnalyticSubVolume (cbit.vcell.geometry.AnalyticSubVolume)20 Expression (cbit.vcell.parser.Expression)14 CSGObject (cbit.vcell.geometry.CSGObject)13 SubVolume (cbit.vcell.geometry.SubVolume)11 GeometryThumbnailImageFactoryAWT (cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT)10 Geometry (cbit.vcell.geometry.Geometry)8 ImageSubVolume (cbit.vcell.geometry.ImageSubVolume)7 Extent (org.vcell.util.Extent)7 AsynchClientTask (cbit.vcell.client.task.AsynchClientTask)6 Hashtable (java.util.Hashtable)6 Origin (org.vcell.util.Origin)6 GeometrySpec (cbit.vcell.geometry.GeometrySpec)5 ExpressionException (cbit.vcell.parser.ExpressionException)5 ISize (org.vcell.util.ISize)5 ImageException (cbit.image.ImageException)4 VCImage (cbit.image.VCImage)4 BioModel (cbit.vcell.biomodel.BioModel)4 GeometrySurfaceDescription (cbit.vcell.geometry.surface.GeometrySurfaceDescription)4 SimulationContext (cbit.vcell.mapping.SimulationContext)4 GeometryClass (cbit.vcell.geometry.GeometryClass)3