public class Filaments3DData extends org.jgrapht.graph.SimpleGraph<FilamentVertex,FilamentEdge> implements JIPipeData
Constructor and Description |
---|
Filaments3DData() |
Filaments3DData(Filaments3DData other) |
Modifier and Type | Method and Description |
---|---|
void |
addEdgeIgnoreLoops(FilamentVertex source,
FilamentVertex target) |
void |
addEdgeIgnoreLoops(FilamentVertex source,
FilamentVertex target,
FilamentEdge edge) |
ij.ImagePlus |
createBlankCanvas(String title,
BitDepth bitDepth) |
ij.ImagePlus |
createBlankCanvas(String title,
int bitDepth) |
JIPipeThumbnailData |
createThumbnail(int width,
int height,
JIPipeProgressInfo progressInfo)
This function generates a thumbnail for this data
Can return null
|
void |
display(String displayName,
JIPipeWorkbench workbench,
JIPipeDataSource source)
This function should display the data in the GUI.
|
JIPipeData |
duplicate(JIPipeProgressInfo progressInfo)
Duplicates the data
|
Line |
edgeToRoiLine(FilamentEdge edge,
int z,
int c,
int t,
int forcedLineThickness) |
void |
exportData(JIPipeWriteDataStorage storage,
String name,
boolean forceName,
JIPipeProgressInfo progressInfo)
Saves the data to a folder
|
Filaments3DData |
extractDeepCopy(Set<FilamentVertex> vertices)
Extracts a deep copy of the nodes end edges that only contains the selected vertices
|
Filaments3DData |
extractShallowCopy(Set<FilamentVertex> vertices)
Extracts a shallow copy of the nodes end edges that only contains the selected vertices
|
Map<FilamentVertex,Integer> |
findComponentIds() |
Color |
getAverageEdgeColor() |
Color |
getAverageVertexColor() |
Rectangle |
getBoundsXY() |
org.jgrapht.alg.connectivity.ConnectivityInspector<FilamentVertex,FilamentEdge> |
getConnectivityInspector() |
String |
getConsensusPhysicalSizeUnit()
Finds the common unit within the whole vertex set.
|
double |
getEdgeLength(FilamentEdge edge,
boolean usePhysicalSizes,
String unit)
Gets the length of an edge in the specified unit
|
com.google.common.collect.Multimap<Point3d,FilamentVertex> |
groupVerticesByLocation() |
static Filaments3DData |
importData(JIPipeReadDataStorage storage,
JIPipeProgressInfo progressInfo) |
boolean |
isEmpty() |
void |
measureComponent(ResultsTableData measurements,
String consensusPhysicalSizeUnit,
Set<FilamentVertex> vertices) |
ResultsTableData |
measureComponents() |
void |
measureEdge(FilamentEdge edge,
Map<String,Object> target,
String prefix,
String unit)
Measures an edge
|
ResultsTableData |
measureEdges() |
void |
measureVertex(FilamentVertex vertex,
Map<String,Object> target,
String prefix) |
ResultsTableData |
measureVertices() |
void |
mergeVertices(Collection<FilamentVertex> vertices) |
void |
mergeWith(Filaments3DData other) |
void |
mergeWithCopy(Filaments3DData other) |
Component |
preview(int width,
int height)
This function generates a preview component for usage within the GUI
Can return null
|
void |
removeComponentsAtBorder(ij.ImagePlus reference,
boolean removeInX,
boolean removeInY,
boolean removeInZ,
boolean useThickness,
double borderDistance) |
void |
removeDuplicateVertices(boolean onlySameComponent) |
void |
removeSelfEdges() |
void |
removeVertexIf(Predicate<FilamentVertex> predicate) |
Filaments3DData |
shallowCopy()
Returns a shallow copy (the vertices and edges are not copied)
|
void |
simplify()
Simplifies the graph by only keeping (degree 0 or 1) and branching points (degree more than 2).
|
void |
smooth(double factorX,
double factorY,
double factorZ,
boolean enforceSameComponent,
JIPipeExpressionParameter locationMergingFunction) |
ij.ImagePlus |
toLabels(ij.ImagePlus referenceImage,
boolean withEdges,
boolean withVertices,
int forcedLineThickness,
int forcedVertexRadius,
JIPipeProgressInfo progressInfo) |
ij.ImagePlus |
toMask(ij.ImagePlus referenceImage,
boolean withEdges,
boolean withVertices,
int forcedLineThickness,
int forcedVertexRadius,
JIPipeProgressInfo progressInfo) |
ROIListData |
toRoi(boolean ignoreNon2DEdges,
boolean withEdges,
boolean withVertices,
int forcedLineThickness,
int forcedVertexRadius) |
ROI3DListData |
toRoi3D(boolean withEdges,
boolean withVertices,
int forcedLineThickness,
int forcedVertexRadius,
JIPipeProgressInfo progressInfo) |
Scene3DGroupNode |
toScene3D(boolean withVertices,
boolean withEdges,
boolean physicalSizes,
Quantity.LengthUnit meshLengthUnit,
boolean forceMeshLengthUnit,
float overrideVertexRadius,
float overrideEdgeRadius,
Color overrideVertexColor,
Color overrideEdgeColor,
String name) |
String |
toString() |
addEdge, addEdge, addVertex, addVertex, clone, containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeSource, getEdgeSupplier, getEdgeTarget, getEdgeWeight, getType, getVertexSupplier, incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf, removeEdge, removeEdge, removeVertex, setEdgeSupplier, setEdgeWeight, setVertexSupplier, vertexSet
assertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toStringFromSets
finalize, getClass, notify, notifyAll, wait, wait, wait
close, exportThumbnails, getDescriptionOf, getMenuPathOf, getNameOf, getSortedList, getStorageDocumentation, getStorageSchema, groupByMenuPath, isCommon, isHeavy, isHidden, toDetailedString
public Filaments3DData()
public Filaments3DData(Filaments3DData other)
public static Filaments3DData importData(JIPipeReadDataStorage storage, JIPipeProgressInfo progressInfo)
public void mergeWithCopy(Filaments3DData other)
public void mergeWith(Filaments3DData other)
public void exportData(JIPipeWriteDataStorage storage, String name, boolean forceName, JIPipeProgressInfo progressInfo)
JIPipeData
exportData
in interface JIPipeData
storage
- The storage where the data should be writtenname
- A name reference that can be used to generate filename(s)forceName
- If enabled, the data is saved potentially destructively. Generated files must always contain the name parameter. This is used to collect results for humans or other algorithms.progressInfo
- the progresspublic JIPipeData duplicate(JIPipeProgressInfo progressInfo)
JIPipeData
duplicate
in interface JIPipeData
progressInfo
- the progress of duplicating the datapublic void display(String displayName, JIPipeWorkbench workbench, JIPipeDataSource source)
JIPipeData
JIPipeDataDisplayOperation
that can be registered separately.
This item will always be shown as "Default" in the list of operations.display
in interface JIPipeData
displayName
- a name that can be usedworkbench
- the workbenchsource
- optional source of the data. Can be null or any kind of data type (e.g. JIPipeDataSlot
)public Component preview(int width, int height)
JIPipeData
preview
in interface JIPipeData
width
- the target widthheight
- the target heightpublic JIPipeThumbnailData createThumbnail(int width, int height, JIPipeProgressInfo progressInfo)
JIPipeData
createThumbnail
in interface JIPipeData
width
- the widthheight
- the heightprogressInfo
- the progress infopublic String toString()
toString
in class org.jgrapht.graph.AbstractGraph<FilamentVertex,FilamentEdge>
public ROIListData toRoi(boolean ignoreNon2DEdges, boolean withEdges, boolean withVertices, int forcedLineThickness, int forcedVertexRadius)
public Line edgeToRoiLine(FilamentEdge edge, int z, int c, int t, int forcedLineThickness)
public void removeDuplicateVertices(boolean onlySameComponent)
public void mergeVertices(Collection<FilamentVertex> vertices)
public void addEdgeIgnoreLoops(FilamentVertex source, FilamentVertex target)
public void addEdgeIgnoreLoops(FilamentVertex source, FilamentVertex target, FilamentEdge edge)
public void removeSelfEdges()
public ResultsTableData measureVertices()
public void measureVertex(FilamentVertex vertex, Map<String,Object> target, String prefix)
public ResultsTableData measureEdges()
public void measureEdge(FilamentEdge edge, Map<String,Object> target, String prefix, String unit)
edge
- the edgetarget
- the map where results will be storedprefix
- the prefix for the map keysunit
- the unit for physical sizespublic double getEdgeLength(FilamentEdge edge, boolean usePhysicalSizes, String unit)
edge
- the edgeusePhysicalSizes
- if the length should be returned in pixels or in the physical sizeunit
- the unit (any supported by Quantity
)public String getConsensusPhysicalSizeUnit()
public com.google.common.collect.Multimap<Point3d,FilamentVertex> groupVerticesByLocation()
public void smooth(double factorX, double factorY, double factorZ, boolean enforceSameComponent, JIPipeExpressionParameter locationMergingFunction)
public boolean isEmpty()
public Rectangle getBoundsXY()
public void removeVertexIf(Predicate<FilamentVertex> predicate)
public Map<FilamentVertex,Integer> findComponentIds()
public void removeComponentsAtBorder(ij.ImagePlus reference, boolean removeInX, boolean removeInY, boolean removeInZ, boolean useThickness, double borderDistance)
public void simplify()
public Filaments3DData shallowCopy()
public Filaments3DData extractShallowCopy(Set<FilamentVertex> vertices)
vertices
- the verticespublic Filaments3DData extractDeepCopy(Set<FilamentVertex> vertices)
vertices
- the verticespublic org.jgrapht.alg.connectivity.ConnectivityInspector<FilamentVertex,FilamentEdge> getConnectivityInspector()
public ResultsTableData measureComponents()
public void measureComponent(ResultsTableData measurements, String consensusPhysicalSizeUnit, Set<FilamentVertex> vertices)
public ij.ImagePlus createBlankCanvas(String title, int bitDepth)
public ij.ImagePlus toLabels(ij.ImagePlus referenceImage, boolean withEdges, boolean withVertices, int forcedLineThickness, int forcedVertexRadius, JIPipeProgressInfo progressInfo)
public ij.ImagePlus toMask(ij.ImagePlus referenceImage, boolean withEdges, boolean withVertices, int forcedLineThickness, int forcedVertexRadius, JIPipeProgressInfo progressInfo)
public ROI3DListData toRoi3D(boolean withEdges, boolean withVertices, int forcedLineThickness, int forcedVertexRadius, JIPipeProgressInfo progressInfo)
public Color getAverageVertexColor()
public Color getAverageEdgeColor()
public Scene3DGroupNode toScene3D(boolean withVertices, boolean withEdges, boolean physicalSizes, Quantity.LengthUnit meshLengthUnit, boolean forceMeshLengthUnit, float overrideVertexRadius, float overrideEdgeRadius, Color overrideVertexColor, Color overrideEdgeColor, String name)
Copyright © 2020–2024 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.