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());
}
Aggregations