Search in sources :

Example 6 with Display3D

use of ini.trakem2.display.Display3D in project TrakEM2 by trakem2.

the class Display3D method getProfileContent.

/**
 * Checks if the given Displayable is a Profile, and tries to find a possible Content object in the Image3DUniverse of its LayerSet according to the title as created from its profile_list ProjectThing.
 */
public static Content getProfileContent(final Displayable d) {
    if (null == d)
        return null;
    if (d.getClass() != Profile.class)
        return null;
    final Display3D d3d = get(d.getLayer().getParent());
    if (null == d3d)
        return null;
    ProjectThing pt = d.getProject().findProjectThing(d);
    if (null == pt)
        return null;
    pt = (ProjectThing) pt.getParent();
    return d3d.universe.getContent(new StringBuilder(pt.toString()).append(" #").append(pt.getId()).toString());
}
Also used : ProjectThing(ini.trakem2.tree.ProjectThing)

Aggregations

Content (ij3d.Content)4 ImagePlus (ij.ImagePlus)3 ProjectThing (ini.trakem2.tree.ProjectThing)3 PatchStack (ini.trakem2.imaging.PatchStack)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 Map (java.util.Map)2 Plot (ij.gui.Plot)1 DirectoryChooser (ij.io.DirectoryChooser)1 FileSaver (ij.io.FileSaver)1 ByteProcessor (ij.process.ByteProcessor)1 Project (ini.trakem2.Project)1 CATAParameters (ini.trakem2.analysis.Compare.CATAParameters)1 Display3D (ini.trakem2.display.Display3D)1 LayerSet (ini.trakem2.display.LayerSet)1 Worker (ini.trakem2.utils.Worker)1 VectorString3D (ini.trakem2.vector.VectorString3D)1 Color (java.awt.Color)1 AffineTransform (java.awt.geom.AffineTransform)1 IndexColorModel (java.awt.image.IndexColorModel)1