public final class LayerSet extends Displayable implements Bucketable
Modifier and Type | Class and Description |
---|---|
protected static class |
LayerSet.DoChangeTrees
Records the state of the LayerSet.al_layers, each Layer.al_displayables and all the trees and unique types of Project.
|
protected static class |
LayerSet.DoMoveZDisplayable |
protected class |
LayerSet.LayerBucket
A Bucket for the ZDisplayable parts that show in every Layer.
|
Displayable.DataPackage, Displayable.DoEdit, Displayable.DoEdits, Displayable.DoTransforms, Displayable.SliderListener
Modifier and Type | Field and Description |
---|---|
static String[] |
ANCHORS |
protected boolean |
area_color_cues |
static int |
BOTTOM |
static int |
CENTER |
protected boolean |
color_cues |
static int |
DOWN |
static int |
EAST |
static int |
FLIP_HORIZONTAL |
static int |
FLIP_VERTICAL |
protected HashMap<Layer,LayerSet.LayerBucket> |
lbucks
For fast search.
|
protected int |
n_layers_color_cue |
static int |
NORTH |
static int |
NORTHEAST |
static int |
NORTHWEST |
protected boolean |
paint_arrows |
protected boolean |
paint_edge_confidence_boxes |
protected boolean |
paint_tags |
protected int |
preload_ahead |
protected boolean |
prepaint |
static int |
R270 |
static int |
R90 |
static String[] |
ROTATIONS |
static String[] |
snapshot_modes |
static int |
SOUTH |
static int |
SOUTHEAST |
static int |
SOUTHWEST |
protected Map<Integer,HashMap<String,Tag>> |
tags
A set of unique tags, retrievable by their own identity.
|
static int |
TOP |
static int |
UP |
protected boolean |
use_color_cue_colors |
static int |
WEST |
alpha, annotation, at, color, COMPOSITE_ADD, COMPOSITE_COLOR_YCBCR, COMPOSITE_DIFFERENCE, COMPOSITE_MULTIPLY, COMPOSITE_NORMAL, COMPOSITE_SUBTRACT, compositeModes, height, hs_linked, last_color, layer, linked_props, linked_props_origins, locked, props, TAG_ATTR1, TAG_ATTR2, title, visible, width
Modifier | Constructor and Description |
---|---|
protected |
LayerSet(Project project,
long id)
Dummy.
|
|
LayerSet(Project project,
long id,
HashMap<String,String> ht_attributes,
HashMap<Displayable,String> ht_links)
Reconstruct from an XML entry.
|
|
LayerSet(Project project,
long id,
String title,
float width,
float height,
double rot_x,
double rot_y,
double rot_z,
float layer_width,
float layer_height,
boolean locked,
int snapshots_mode,
AffineTransform at)
Reconstruct from the database.
|
|
LayerSet(Project project,
String title,
double x,
double y,
Layer parent,
float layer_width,
float layer_height)
Create a new LayerSet with a 0,0,0 rotation vector and default 20,20 px Displayable width,height.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Layer layer)
Add a new Layer, inserted according to its Z.
|
void |
add(ZDisplayable zdispl)
Add a Displayable to be painted in all Layers, such as a Pipe.
|
void |
addAll(Collection<? extends ZDisplayable> coll) |
LayerSet.DoChangeTrees |
addChangeTreesStep()
Add a step to undo the addition or deletion of one or more objects in this project and LayerSet.
|
LayerSet.DoChangeTrees |
addChangeTreesStep(Set<DoStep> dependents)
Add a step to undo the addition or deletion of one or more objects in this project and LayerSet,
along with an arbitrary set of steps that may alter, for example the data.
|
boolean |
addDataEditStep(Set<? extends Displayable> ds)
A new undo step for the "data" field of all Displayable in the set.
|
void |
addLayerContentStep(Layer la)
For the Displayable contained in a Layer: their number, and their stack order.
|
void |
addLayerEditedStep(Layer layer)
For the Z and thickness of a layer.
|
void |
addLayerEditedStep(List<Layer> al)
For the Z and thickness of a list of layers.
|
void |
addSilently(Layer layer)
Add a new Layer silently, ordering by z as well.
|
void |
addSilently(ZDisplayable zdispl)
Used for reconstruction purposes, avoids repainting or updating.
|
void |
addTransformStep()
Add an undo step for the transformations of all Displayable in all layers.
|
void |
addTransformStep(Collection<? extends Displayable> col)
Add an undo step for the transformations of all Displayable in hs.
|
void |
addTransformStep(Layer layer)
Add an undo step for the transformations of all Displayable in the layer.
|
void |
addTransformStep(List<Layer> layers) |
Displayable.DoEdits |
addTransformStepWithData(Collection<? extends Displayable> col)
Add an undo step for the transformations of all Displayable in col, with data as well (for Patch, data includes the CoordinateTransform).
|
Collection<Displayable> |
addTransformStepWithDataForAll(Collection<Layer> layers)
Includes all ZDisplayable that paint at any of the given layers.
|
void |
addUndoMoveStep(Displayable d)
To undo moving up/down/top/bottom.
|
void |
addUndoStep(DoStep step) |
void |
addZDisplayable(ZDisplayable zdispl)
Useful for typeless scripts so that a ZDisplayable can be added; the
overloaded method add(Layer) and add(ZDisplayable) is not distinguishable otherwise.
|
static void |
applyTransforms(Map<Displayable,AffineTransform> m) |
protected Tag |
askForNewTag(int keyCode) |
protected boolean |
askToRemoveTag(int keyCode)
Returns false if the dialog was canceled or there wasn't any tag to remove.
|
boolean |
canRedo() |
boolean |
canUndo() |
void |
checkBuckets()
Checks only buckets for ZDisplayable, not any related to any layer.
|
Displayable |
clone(Project pr,
boolean copy_id)
Performs a deep copy of this object, obtaining its unique id either from the given project or the exact same as this object's id.
|
Displayable |
clone(Project pr,
Layer first,
Layer last,
Rectangle roi,
boolean add_to_tree,
boolean copy_id,
boolean ignore_hidden_patches)
Clone the contents of this LayerSet, from first to last given layers, and cropping for the given rectangle;
does NOT copy the ZDisplayable, which may be copied using the LayerSet.cloneInto method.
|
static void |
cloneInto(LayerSet src,
Layer src_first,
Layer src_last,
Project pr,
LayerSet copy,
Rectangle roi,
boolean copy_id) |
boolean |
contains(Class<?> c)
Returns true if any of the ZDisplayable objects are of the given class.
|
boolean |
contains(Displayable zdispl) |
boolean |
contains(Layer layer) |
boolean |
containsDisplayable(Class<?> c)
Check in all layers.
|
LayerSet |
create(Layer parent_layer)
Create a new LayerSet in the middle of the parent Layer.
|
LayerStack |
createLayerStack(Class<?> clazz,
int type,
int c_alphas)
Create a virtual layer stack that acts as a virtual ij.ImageStack, in RGB and set to a scale of max_dimension / Math.max(layer_width, layer_height).
|
DoStep |
createUndoMoveStep(Displayable d)
To undo moving up/down/top/bottom.
|
void |
destroy()
Release resources.
|
void |
enlargeToFit(Collection<? extends Displayable> ds)
Enlarge the 2D universe so that all Displayable in the collection fit in it;
that is, that no Displayable has a negative x,y position or lays beyond bounds.
|
boolean |
enlargeToFit(Displayable d,
int anchor)
Enlarges the display in the given direction; the anchor is the point to keep still, and can be any of LayerSet.NORTHWEST (top-left), etc.
|
static void |
exportDTD(StringBuilder sb_header,
HashSet<String> hs,
String indent)
Includes the !ELEMENT
|
String |
exportTags() |
void |
exportXML(Writer writer,
String indent,
XMLOptions options) |
ArrayList<Displayable> |
find(Class<?> c,
Layer layer,
Area aroi,
boolean visible_only)
Find any Displayable or ZDisplayable objects of class C which intersect with the Area @param aroi.
|
ArrayList<Displayable> |
find(Class<?> c,
Layer layer,
Area aroi,
boolean visible_only,
boolean instance_of)
Find any Displayable or ZDisplayable objects of class C which intersect with the Area @param aroi.
|
ArrayList<Displayable> |
find(Class<?> c,
Layer layer,
int x,
int y,
boolean visible_only) |
ArrayList<ZDisplayable> |
find(Layer first,
Layer last,
Area area)
Find the ZDisplayable objects that intersect with the 3D roi defined by the first and last layers, and the area -all in world coordinates.
|
protected Map<Displayable,List<Area>> |
findAreas(Layer layer,
Rectangle box,
boolean visible)
Find all java.awt.geom.Area in layer that intersect with box, if visible.
|
DBObject |
findById(long id)
Searches in all ZDisplayables and in all layers, recursively into nested LayerSets.
|
Displayable |
findDisplayable(long id)
Searches in all layers.
|
Collection<Displayable> |
findZDisplayables(Class<?> c,
Layer layer,
Area aroi,
boolean visible_only,
boolean instance_of)
Find ZDisplayable objects of the given class that intersect the given area in the given layer.
|
Collection<Displayable> |
findZDisplayables(Class<?> c,
Layer layer,
int x,
int y,
boolean visible_only)
Find ZDisplayable objects of Class c that contain the point x,y in the given layer.
|
Collection<Displayable> |
findZDisplayables(Class<?> c,
Layer layer,
int x,
int y,
boolean visible_only,
boolean instance_of)
Find ZDisplayable objects of Class c that contain the point x,y in the given layer.
|
Collection<Displayable> |
findZDisplayables(Class<?> c,
Layer layer,
Rectangle r,
boolean visible_only) |
Collection<Displayable> |
findZDisplayables(Class<?> c,
Layer layer,
Rectangle r,
boolean visible_only,
boolean instance_of)
Find ZDisplayable objects of the given class that intersect the given rectangle in the given layer.
|
Collection<Displayable> |
findZDisplayables(Layer layer,
int x,
int y,
boolean visible_only)
Find ZDisplayable objects that contain the point x,y in the given layer.
|
Collection<Displayable> |
findZDisplayables(Layer layer,
Rectangle r,
boolean visible_only)
Find ZDisplayable objects that intersect the given rectangle in the given layer.
|
ArrayList<Displayable> |
get(ArrayList<Displayable> all,
Class<?> c)
Find, in this LayerSet and contained layers and their nested LayerSets if any, all Displayable instances of Class c, which are stored in the given ArrayList; returns the same ArrayList, or a new one if its null.
|
ArrayList<Displayable> |
get(Class<?> c)
Find, in this LayerSet and contained layers and their nested LayerSets if any, all Displayable instances of Class c.
|
Rectangle |
get2DBounds()
Returns a new Rectangle of 0, 0, layer_width, layer_height.
|
<T extends Displayable> |
getAll(Class<T> c)
Get all Displayable or ZDisplayable of the given class.
|
HashMap<Displayable,HashSet<Bucket>> |
getBucketMap(Layer la) |
ij.measure.Calibration |
getCalibration() |
ij.measure.Calibration |
getCalibrationCopy() |
List<Layer> |
getColorCueLayerRange(Layer active_layer)
Returns the list of layers to paint by considering the range of n_layers_color_cue around the active layer index.
|
double |
getDepth()
Returns the distance from the first layer's Z to the last layer's Z.
|
ArrayList<ZDisplayable> |
getDisplayableList()
Returns the real list of displayables, not a copy.
|
ArrayList<Displayable> |
getDisplayables()
Return all the Displayable objects from all the layers of this LayerSet.
|
ArrayList<Displayable> |
getDisplayables(Class<?> c)
Return all the Displayable objects from all the layers of this LayerSet of the given class.
|
ArrayList<Displayable> |
getDisplayables(Class<?> c,
Area aroi,
boolean visible_only)
Return all the Displayable objects from all the layers of this LayerSet of the given class that intersect the given area.
|
Layer |
getLayer(double z)
Returns the first layer found with the given Z coordinate, rounded to seventh decimal precision, or null if none found.
|
Layer |
getLayer(double z,
double thickness,
boolean create)
Returns null if none has the given z and thickness.
|
Layer |
getLayer(int i)
Find a layer by index, or null if none.
|
Layer |
getLayer(long id)
Find a layer with the given id, or null if none.
|
Layer |
getLayer(Long id)
Same as getLayer(long) but without box/unbox.
|
float |
getLayerHeight() |
int |
getLayerIndex(long id) |
ArrayList<Layer> |
getLayers()
Returns a copy of the layer list.
|
List<Layer> |
getLayers(int first,
int last)
Returns a sublist of layers from first to last, both inclusive.
|
List<Layer> |
getLayers(Layer first,
Layer last)
Returns the layer range from first to last, both included.
|
float |
getLayerWidth() |
Rectangle |
getMinimalBoundingBox(Class<?> c)
Returns the minimal 2D bounding box for Displayables of class @param c in all layers.
|
Layer |
getNearestLayer(double z) |
ArrayList<Layer> |
getNeighborLayers(Layer layer,
int n)
Get up to 'n' layers before and after the given layers.
|
Overlay |
getOverlay()
Return the current Overlay or a new one if none yet.
|
Layer |
getParent() |
int |
getPixelsMaxDimension() |
double |
getRotX() |
double |
getRotY() |
double |
getRotZ() |
int |
getSnapshotsMode() |
TreeSet<Tag> |
getTags(int keyCode)
If there aren't any tags for keyCode, returns an empty TreeSet.
|
double |
getVirtualizationScale()
From 0.000...
|
ArrayList<ZDisplayable> |
getZDisplayables()
Returns a copy of the list of ZDisplayable objects.
|
ArrayList<ZDisplayable> |
getZDisplayables(Class<?> c) |
ArrayList<ZDisplayable> |
getZDisplayables(Class<?> c,
boolean instance_of)
Returns a list of ZDisplayable of class c only.
|
ArrayList<ZDisplayable> |
getZDisplayables(Class<?> c,
Layer layer,
Area aroi,
boolean visible_only)
Deprecated.
|
ArrayList<ZDisplayable> |
getZDisplayables(Class<?> c,
Layer layer,
Area aroi,
boolean visible_only,
boolean instance_of)
Deprecated.
|
Object |
grab(int first,
int last,
Rectangle r,
double scale,
Class<?> c,
int c_alphas,
int format,
int type)
Returns the region defined by the rectangle as an image in the type and format specified.
|
HashSet<Displayable> |
hideExcept(ArrayList<Class<?>> type,
boolean repaint)
Hide all except those whose type is in 'type' list, whose visibility flag is left unchanged.
|
void |
importTags(String path,
boolean replace) |
int |
indexOf(Layer layer)
From zero to size-1.
|
int |
indexOf(ZDisplayable zd)
Returns the reverse index of ZDisplayable zd, which is the actual index as seen in the screen.
|
protected boolean |
isBottom(Displayable d)
Hub method: ZDisplayable or into the Displayable's Layer.
|
boolean |
isBottom(ZDisplayable zd) |
boolean |
isCalibrated() |
boolean |
isDeletable() |
boolean |
isEmptyAt(Layer layer) |
boolean |
isPixelsVirtualizationEnabled() |
protected boolean |
isTop(Displayable d)
Hub method: ZDisplayable or into the Displayable's Layer.
|
boolean |
isTop(ZDisplayable zd) |
void |
keyPressed(KeyEvent ke) |
void |
mouseDragged(MouseEvent me,
int x_p,
int y_p,
int x_d,
int y_d,
int x_d_old,
int y_d_old,
Rectangle srcRect,
double mag) |
void |
mousePressed(MouseEvent me,
int x_p,
int y_p,
Rectangle srcRect,
double mag) |
void |
mouseReleased(MouseEvent me,
int x_p,
int y_p,
int x_d,
int y_d,
int x_r,
int y_r,
Rectangle srcRect,
double mag) |
protected void |
move(int place,
Displayable d)
Change z position in the layered stack, which defines the painting order.
|
void |
move(Set<Displayable> hs_d,
Layer source,
Layer target)
Move all Displayable objects in the HashSet to the given target layer.
|
void |
moveDown(Layer layer,
Displayable d)
Move the given Displayable to the next layer if possible.
|
void |
moveUp(Layer layer,
Displayable d)
Move the given Displayable to the previous layer if possible.
|
Layer |
next(Layer layer) |
Layer |
nextNonEmpty(Layer layer) |
void |
paint(Graphics2D g,
Rectangle srcRect,
double magnification,
boolean active,
int channels,
Layer active_layer) |
Layer |
previous(Layer layer) |
Layer |
previousNonEmpty(Layer layer) |
void |
printDebugInfo() |
Tag |
putTag(String tag,
int keyCode)
Returns an existing immutable Tag instance if already there, or stores a new one and returns it.
|
void |
recreateBuckets(boolean layer_buckets)
Recreate the ZDisplayable buckets, and also the Layer Displayable buckets if desired.
|
void |
recreateBuckets(Collection<Layer> layers,
boolean layer_buckets)
Regenerate the quad-tree bucket system for the ZDisplayable instances that have data at each of the given layers,
and optionally regenerate the buckets as well for the 2D Displayable instances of that layer as well.
|
void |
recreateBuckets(Layer layer,
boolean layer_buckets)
|
boolean |
redoOneStep()
Redoes one step of the ongoing transformation history, otherwise of the overall LayerSet history.
|
boolean |
remove(boolean check)
Remove from both the database and any Display that shows the Layer in which this Displayable is shown.
|
void |
remove(Layer layer)
Remove a child.
|
boolean |
remove(ZDisplayable zdispl)
Remove a child.
|
protected boolean |
remove2(boolean check)
Remove also from the trees if present; does nothing more than remove(boolean) unless overriden.
|
boolean |
removeAll(Set<ZDisplayable> zds)
Remove a child.
|
void |
removeAllTags() |
void |
removeFromOffscreens(Layer la) |
protected boolean |
removeLastUndoStep() |
void |
removeTag(String tag,
int keyCode)
Removes the tag from the list of possible tags, and then from wherever it has been assigned.
|
void |
removeTag(Tag t) |
protected void |
reposition(Layer layer)
Used by the Layer.setZ method.
|
void |
restoreCalibration(HashMap<String,String> ht_attributes)
Restore calibration from the given XML attributes table.
|
Collection<Displayable> |
roughlyFindZDisplayables(Layer layer,
Rectangle r,
boolean visible_only)
Find ZDisplayable objects that intersect the given rectangle in the given layer.
|
Collection<Displayable> |
setAllVisible(boolean repaint)
Returns the collection of Displayable whose visibility state has changed.
|
void |
setAlpha(float alpha)
Overiding.
|
void |
setCalibration(ij.measure.Calibration cal)
Set the calibration to a clone of the given calibration.
|
void |
setDimensions(float x,
float y,
float layer_width,
float layer_height)
May leave objects beyond the visible window.
|
boolean |
setDimensions(float layer_width,
float layer_height,
int anchor)
Returns false if any Displayables are being partially or totally cropped away.
|
void |
setLayer(Layer layer,
boolean update)
'update' in database or not.
|
boolean |
setMinimumDimensions()
Used by the Loader after loading blindly a lot of Patches.
|
Overlay |
setOverlay(Overlay o)
Set to null to remove the Overlay.
|
void |
setParent(Layer layer) |
void |
setPixelsMaxDimension(int d) |
void |
setPixelsVirtualizationEnabled(boolean b) |
void |
setRotVector(double rot_x,
double rot_y,
double rot_z) |
void |
setSnapshotsMode(int mode) |
void |
setSnapshotsQuality(boolean b) |
void |
setup()
For reconstruction purposes: set the active layer to the ZDisplayable objects.
|
HashSet<Displayable> |
setVisible(String type,
boolean visible,
boolean repaint)
Returns the hash set of objects whose visibility has changed.
|
int |
size()
The number of Layers in this LayerSet.
|
boolean |
snapshotsQuality()
For creating snapshots, using a very slow but much better scaling algorithm (the Image.SCALE_AREA_AVERAGING method).
|
String |
toString()
Minimal info that identifies this object as unique, for display on a JTree node.
|
boolean |
undoOneStep()
Undoes one step of the ongoing transformation history, otherwise of the overall LayerSet history.
|
void |
updateBucket(Displayable d,
Layer layer) |
void |
updateLayerTree()
Recursive into nested LayerSet objects.
|
adjustProperties, areThereLayerCrossLinks, canSendTo, clone, clone, commonDTDChildren, contains, contains, deselect, displacePoints, exportDTD, exportSVG, exportXML, findNearestPoint, findNearestPoint, getAffineTransform, getAffineTransformCopy, getAlpha, getAnnotation, getArea, getAreaAt, getAreaForBucket, getBoundingBox, getBoundingBox, getBoundingBox, getBounds, getBounds, getBucketable, getColor, getComposite, getComposite, getCompositeMode, getHeight, getIntersection, getLayer, getLayerIds, getLayerSet, getLayersWithData, getLinked, getLinked, getLinkedBox, getLinkedGroup, getLinkedProperties, getLinkedProperties, getLinkedProperty, getLinkedProperty, getMinimalBoundingBox, getNameId, getPerimeter, getPerimeter, getProperties, getProperty, getProperty, getShortTitle, getTitle, getWidth, getX, getXMLSafeValue, getXMLSafeValue, getY, hasLinkedGroupWithinLayer, hasProperties, intersects, intersects, intersects, intersects, inverseTransformPoint, isLinked, isLinked, isLinked, isLocked, isLocked2, isOnlyLinkedTo, isOnlyLinkedTo, isOutOfRepaintingClip, isOutOfRepaintingClip, isRoughlyInside, isVisible, link, link, linkPatches, makeAdjustPropertiesDialog, measure, mouseDragged, mousePressed, mouseReleased, mouseWheelMoved, paint, paintAsBox, paintOffscreen, paintSnapshot, preConcatenate, prePaint, preTransform, processAdjustPropertiesDialog, removeLinkedProperties, removeLinkedPropertiesFromOrigins, repaint, restXML, rotate, rotate, rotatePoints, scale, scale, scalePoints, setAffineTransform, setAlpha, setAnnotation, setColor, setCompositeMode, setDimensions, setDimensions, setLayer, setLinkedProperties, setLinkedProperty, setLocation, setLocked, setProperty, setTitle, setVisible, setVisible, snapTo, softRemove, transform, transformPoint, transformPoint, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformRectangle, translate, translate, unlink, unlink, unlinkAll, updateBucket, updateInDatabase, xmlError, xmlError
addToDatabase, getId, getInfo, getProject, getUniqueIdentifier, removeFromDatabase, updateInDatabase
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getProject
public static final int NORTH
public static final int NORTHEAST
public static final int EAST
public static final int SOUTHEAST
public static final int SOUTH
public static final int SOUTHWEST
public static final int WEST
public static final int NORTHWEST
public static final int CENTER
public static final int R90
public static final int R270
public static final int FLIP_HORIZONTAL
public static final int FLIP_VERTICAL
public static final int TOP
public static final int UP
public static final int DOWN
public static final int BOTTOM
public static final String[] snapshot_modes
public static final String[] ANCHORS
public static final String[] ROTATIONS
protected boolean color_cues
protected boolean area_color_cues
protected boolean use_color_cue_colors
protected boolean paint_arrows
protected boolean paint_tags
protected boolean paint_edge_confidence_boxes
protected int n_layers_color_cue
protected boolean prepaint
protected int preload_ahead
protected HashMap<Layer,LayerSet.LayerBucket> lbucks
protected LayerSet(Project project, long id)
public LayerSet(Project project, String title, double x, double y, Layer parent, float layer_width, float layer_height)
public LayerSet(Project project, long id, String title, float width, float height, double rot_x, double rot_y, double rot_z, float layer_width, float layer_height, boolean locked, int snapshots_mode, AffineTransform at)
public void setup()
public LayerSet create(Layer parent_layer)
public void addSilently(Layer layer)
public void add(Layer layer)
public void printDebugInfo()
public Layer getParent()
public void setLayer(Layer layer, boolean update)
setLayer
in class Displayable
public void setParent(Layer layer)
public void mousePressed(MouseEvent me, int x_p, int y_p, Rectangle srcRect, double mag)
public void mouseDragged(MouseEvent me, int x_p, int y_p, int x_d, int y_d, int x_d_old, int y_d_old, Rectangle srcRect, double mag)
public void mouseReleased(MouseEvent me, int x_p, int y_p, int x_d, int y_d, int x_r, int y_r, Rectangle srcRect, double mag)
public void keyPressed(KeyEvent ke)
keyPressed
in class Displayable
public String toString()
Displayable
toString
in class Displayable
public void paint(Graphics2D g, Rectangle srcRect, double magnification, boolean active, int channels, Layer active_layer)
public float getLayerWidth()
getLayerWidth
in interface Bucketable
public float getLayerHeight()
getLayerHeight
in interface Bucketable
public double getRotX()
public double getRotY()
public double getRotZ()
public int size()
public void setRotVector(double rot_x, double rot_y, double rot_z)
public boolean setMinimumDimensions()
public void enlargeToFit(Collection<? extends Displayable> ds)
public boolean enlargeToFit(Displayable d, int anchor)
public void setDimensions(float x, float y, float layer_width, float layer_height)
public boolean setDimensions(float layer_width, float layer_height, int anchor)
protected boolean remove2(boolean check)
Displayable
remove2
in class Displayable
public boolean remove(boolean check)
Displayable
remove
in class Displayable
public void remove(Layer layer)
public int getLayerIndex(long id)
public Layer getLayer(int i)
public Layer getLayer(long id)
public Layer getLayer(double z)
public Layer getNearestLayer(double z)
public Layer getLayer(double z, double thickness, boolean create)
public void addZDisplayable(ZDisplayable zdispl)
public void add(ZDisplayable zdispl)
public void addAll(Collection<? extends ZDisplayable> coll)
public void addSilently(ZDisplayable zdispl)
public boolean remove(ZDisplayable zdispl)
public boolean removeAll(Set<ZDisplayable> zds)
public boolean contains(Layer layer)
public boolean contains(Displayable zdispl)
public List<Layer> getLayers(int first, int last)
public List<Layer> getLayers(Layer first, Layer last)
public List<Layer> getColorCueLayerRange(Layer active_layer)
public boolean isDeletable()
isDeletable
in class Displayable
public void setAlpha(float alpha)
setAlpha
in class Displayable
public void moveDown(Layer layer, Displayable d)
public void moveUp(Layer layer, Displayable d)
public void move(Set<Displayable> hs_d, Layer source, Layer target)
public HashSet<Displayable> setVisible(String type, boolean visible, boolean repaint)
public HashSet<Displayable> hideExcept(ArrayList<Class<?>> type, boolean repaint)
public Collection<Displayable> setAllVisible(boolean repaint)
public boolean contains(Class<?> c)
public boolean containsDisplayable(Class<?> c)
public double getDepth()
public ArrayList<Displayable> getDisplayables()
public ArrayList<Displayable> getDisplayables(Class<?> c)
public ArrayList<Displayable> getDisplayables(Class<?> c, Area aroi, boolean visible_only)
public int indexOf(Layer layer)
public void exportXML(Writer writer, String indent, XMLOptions options) throws Exception
Exception
public static void exportDTD(StringBuilder sb_header, HashSet<String> hs, String indent)
public void setSnapshotsMode(int mode)
public int getSnapshotsMode()
public void destroy()
Displayable
destroy
in class Displayable
protected void reposition(Layer layer)
public ArrayList<Layer> getNeighborLayers(Layer layer, int n)
public boolean isTop(ZDisplayable zd)
public boolean isBottom(ZDisplayable zd)
protected boolean isTop(Displayable d)
protected boolean isBottom(Displayable d)
protected void move(int place, Displayable d)
public int indexOf(ZDisplayable zd)
public boolean isEmptyAt(Layer layer)
public Displayable clone(Project pr, boolean copy_id)
Displayable
clone
in class Displayable
public Displayable clone(Project pr, Layer first, Layer last, Rectangle roi, boolean add_to_tree, boolean copy_id, boolean ignore_hidden_patches)
public static void cloneInto(LayerSet src, Layer src_first, Layer src_last, Project pr, LayerSet copy, Rectangle roi, boolean copy_id) throws Exception
Exception
public LayerStack createLayerStack(Class<?> clazz, int type, int c_alphas)
public int getPixelsMaxDimension()
public double getVirtualizationScale()
public void setPixelsMaxDimension(int d)
public void setPixelsVirtualizationEnabled(boolean b)
public boolean isPixelsVirtualizationEnabled()
public Rectangle get2DBounds()
public void setCalibration(ij.measure.Calibration cal)
public ij.measure.Calibration getCalibration()
public ij.measure.Calibration getCalibrationCopy()
public boolean isCalibrated()
public void restoreCalibration(HashMap<String,String> ht_attributes)
public boolean snapshotsQuality()
public void setSnapshotsQuality(boolean b)
public ArrayList<Displayable> get(Class<?> c)
public ArrayList<Displayable> get(ArrayList<Displayable> all, Class<?> c)
public Object grab(int first, int last, Rectangle r, double scale, Class<?> c, int c_alphas, int format, int type)
public Displayable findDisplayable(long id)
public DBObject findById(long id)
findById
in class Displayable
public void updateLayerTree()
public ArrayList<ZDisplayable> find(Layer first, Layer last, Area area)
public ArrayList<ZDisplayable> getZDisplayables()
public ArrayList<ZDisplayable> getDisplayableList()
getDisplayableList
in interface Bucketable
public HashMap<Displayable,HashSet<Bucket>> getBucketMap(Layer la)
getBucketMap
in interface Bucketable
public void updateBucket(Displayable d, Layer layer)
updateBucket
in interface Bucketable
public void recreateBuckets(boolean layer_buckets)
public void recreateBuckets(Layer layer, boolean layer_buckets)
layer
- The Layer
to recreate ZDisplayable
buckets for.layer_buckets
- Whether to also recreate the Layer
-specific buckets for images and text labels.public void recreateBuckets(Collection<Layer> layers, boolean layer_buckets)
public void checkBuckets()
public Rectangle getMinimalBoundingBox(Class<?> c)
public boolean addDataEditStep(Set<? extends Displayable> ds)
public void addTransformStep(Layer layer)
public void addTransformStep(Collection<? extends Displayable> col)
public Displayable.DoEdits addTransformStepWithData(Collection<? extends Displayable> col)
public Collection<Displayable> addTransformStepWithDataForAll(Collection<Layer> layers)
public void addTransformStep()
public LayerSet.DoChangeTrees addChangeTreesStep()
public LayerSet.DoChangeTrees addChangeTreesStep(Set<DoStep> dependents)
public void addLayerContentStep(Layer la)
public void addLayerEditedStep(Layer layer)
public void addLayerEditedStep(List<Layer> al)
public void addUndoStep(DoStep step)
public boolean canUndo()
public boolean canRedo()
public boolean undoOneStep()
protected boolean removeLastUndoStep()
public boolean redoOneStep()
public static void applyTransforms(Map<Displayable,AffineTransform> m)
public DoStep createUndoMoveStep(Displayable d)
public void addUndoMoveStep(Displayable d)
public Overlay getOverlay()
public Overlay setOverlay(Overlay o)
public final void removeFromOffscreens(Layer la)
protected Map<Displayable,List<Area>> findAreas(Layer layer, Rectangle box, boolean visible)
public Tag putTag(String tag, int keyCode)
public TreeSet<Tag> getTags(int keyCode)
protected Tag askForNewTag(int keyCode)
protected boolean askToRemoveTag(int keyCode)
public void removeTag(String tag, int keyCode)
public void removeTag(Tag t)
public void removeAllTags()
public String exportTags()
public void importTags(String path, boolean replace)
public ArrayList<ZDisplayable> getZDisplayables(Class<?> c)
public ArrayList<ZDisplayable> getZDisplayables(Class<?> c, boolean instance_of)
@Deprecated public ArrayList<ZDisplayable> getZDisplayables(Class<?> c, Layer layer, Area aroi, boolean visible_only)
@Deprecated public ArrayList<ZDisplayable> getZDisplayables(Class<?> c, Layer layer, Area aroi, boolean visible_only, boolean instance_of)
public ArrayList<Displayable> find(Class<?> c, Layer layer, Area aroi, boolean visible_only)
public ArrayList<Displayable> find(Class<?> c, Layer layer, Area aroi, boolean visible_only, boolean instance_of)
public ArrayList<Displayable> find(Class<?> c, Layer layer, int x, int y, boolean visible_only)
public Collection<Displayable> findZDisplayables(Layer layer, int x, int y, boolean visible_only)
public Collection<Displayable> findZDisplayables(Class<?> c, Layer layer, int x, int y, boolean visible_only)
public Collection<Displayable> findZDisplayables(Class<?> c, Layer layer, int x, int y, boolean visible_only, boolean instance_of)
public Collection<Displayable> findZDisplayables(Class<?> c, Layer layer, Rectangle r, boolean visible_only)
public Collection<Displayable> findZDisplayables(Class<?> c, Layer layer, Rectangle r, boolean visible_only, boolean instance_of)
public Collection<Displayable> findZDisplayables(Class<?> c, Layer layer, Area aroi, boolean visible_only, boolean instance_of)
public Collection<Displayable> findZDisplayables(Layer layer, Rectangle r, boolean visible_only)
public Collection<Displayable> roughlyFindZDisplayables(Layer layer, Rectangle r, boolean visible_only)
public <T extends Displayable> List<T> getAll(Class<T> c)
Copyright © 2015–2021 Fiji. All rights reserved.