Search in sources :

Example 1 with ItemGroup

use of uk.ac.sussex.gdsc.smlm.ij.ij3d.ItemGroup in project GDSC-SMLM by aherbert.

the class ImageJ3DResultsViewer method getTotalTransparentObjects.

private static long getTotalTransparentObjects(Image3DUniverse univ, String ignoreName) {
    long size = 0;
    for (final Iterator<Content> it = univ.contents(); it.hasNext(); ) {
        final Content c = it.next();
        if (ignoreName.equals(c.getName())) {
            continue;
        }
        if (!(c.getUserData() instanceof ResultsMetaData)) {
            return 0;
        }
        final ContentInstant content = c.getCurrent();
        if (content.getContent() instanceof ItemGroupNode) {
            final ItemGroupNode node = (ItemGroupNode) content.getContent();
            final ItemGroup g = node.getItemGroup();
            if (g instanceof ItemGeometryGroup) {
                size += g.size();
            }
        }
    }
    return size;
}
Also used : ItemGeometryGroup(uk.ac.sussex.gdsc.smlm.ij.ij3d.ItemGeometryGroup) OrderedItemGeometryGroup(uk.ac.sussex.gdsc.smlm.ij.ij3d.OrderedItemGeometryGroup) ItemGroup(uk.ac.sussex.gdsc.smlm.ij.ij3d.ItemGroup) Content(ij3d.Content) CustomContent(uk.ac.sussex.gdsc.smlm.ij.ij3d.CustomContent) ItemGroupNode(uk.ac.sussex.gdsc.smlm.ij.ij3d.ItemGroupNode) ContentInstant(ij3d.ContentInstant) CustomContentInstant(uk.ac.sussex.gdsc.smlm.ij.ij3d.CustomContentInstant)

Aggregations

Content (ij3d.Content)1 ContentInstant (ij3d.ContentInstant)1 CustomContent (uk.ac.sussex.gdsc.smlm.ij.ij3d.CustomContent)1 CustomContentInstant (uk.ac.sussex.gdsc.smlm.ij.ij3d.CustomContentInstant)1 ItemGeometryGroup (uk.ac.sussex.gdsc.smlm.ij.ij3d.ItemGeometryGroup)1 ItemGroup (uk.ac.sussex.gdsc.smlm.ij.ij3d.ItemGroup)1 ItemGroupNode (uk.ac.sussex.gdsc.smlm.ij.ij3d.ItemGroupNode)1 OrderedItemGeometryGroup (uk.ac.sussex.gdsc.smlm.ij.ij3d.OrderedItemGeometryGroup)1