pysnt package#
PySNT: Python interface for SNT
This package provides convenient Python access to SNTâs Java classes, including core classes.
- get_available_classes() List[str][source]#
Get list of all available classes.
This includes both curated classes (always loaded) and extended classes (loaded on-demand). Extended classes are discovered if not already loaded.
- Returns:
List of available class names.
- Return type:
List[str]
- get_class(class_name: str) Any[source]#
Get a specific class by name.
This method provides access to both curated and extended classes. Extended classes are discovered and loaded on first access.
Supports inner class access using dot notation (e.g., âCircularModels.VonMisesFitâ).
- Parameters:
class_name (str) â Name of the class to retrieve. Can include inner class notation using dots (e.g., âCircularModels.VonMisesFitâ).
- Returns:
The requested SNT class or inner class.
- Return type:
Java class
- Raises:
KeyError â If the class is not available.
RuntimeError â If the JVM has not been started.
Examples
>>> # Get a regular class >>> CircModels = pysnt.analysis.get_class("CircularModels")
>>> # Get an inner class >>> VonMisesFit = pysnt.analysis.get_class("CircularModels.VonMisesFit")
- get_curated_classes() List[str][source]#
Get list of curated classes that are always available for direct import.
- Returns:
List of curated class names.
- Return type:
List[str]
- get_extended_classes() List[str][source]#
Get list of extended classes available via get_class().
This will trigger discovery if not already done.
- Returns:
List of extended class names.
- Return type:
List[str]
- class SNTService(*args, **kwargs)#
Bases:
objectService for accessing and scripting the active instance of SNT.
All Methods and Attributes: See SNTService detailed documentation.
- class SNTUtils(*args, **kwargs)#
Bases:
objectStatic utilities for SNT
All Methods and Attributes: See SNTUtils detailed documentation.
- class Tree(*args, **kwargs)#
Bases:
objectUtility class to access a Collection of Paths (typically a complete reconstruction). A Tree is the preferred way to group, access and manipulate Paths that share something in common, specially when scripting SNT. Note that a âTreeâ here is literally a collection of Paths. Very few restrictions are imposed on its topology, although it is generally assumed that the Collection of paths describes a single-rooted structure with no loops.
All Methods and Attributes: See Tree detailed documentation.
- class Path(*args, **kwargs)#
Bases:
objectThis class represents a traced segment (i.e., a Path) in a reconstruction. It has methods to manipulate its points (nodes) with sup-pixel accuracy, including drawing them onto threePane-style canvases, etc.
Paths are non-branching sequences of adjacent points (including diagonals) in the image. Branches and joins are supported by attributes of paths that specify that they begin on (or end on) other paths.
In SNT, a Path can exist in two versions or flavors: itself and a fitted version generated by PathFitter. Because fitting may fail around certain nodes, the fitted version may have a different number of nodes relatively to its non-fitted version
All Methods and Attributes: See Path detailed documentation.
Subpackages#
- pysnt.analysis package
get_available_classes()get_class()list_classes()get_curated_classes()get_extended_classes()ConvexHull2DConvexHull3DConvexHullAnalyzerGroupedTreeStatisticsMultiTreeColorMapperMultiTreeStatisticsNodeColorMapperNodeProfilerNodeStatisticsPathProfilerPathStatisticsPathStraightenerPCAnalyzerPersistenceAnalyzerRootAngleAnalyzerShollAnalyzerSkeletonConverterSNTChartSNTTableStrahlerAnalyzerTreeColorMapperTreeStatistics- Subpackages
- pysnt.annotation package
- pysnt.converters package
display()register_snt_converters()list_converters()enhance_java_object()auto_enhance_java_objects()register_display_handler()SNTObjecttree_to_points()- Submodules
- pysnt.display package
- pysnt.filter package
- pysnt.gui package
- pysnt.io package
- pysnt.tracing package
- pysnt.util package
- pysnt.viewer package
Submodules#
- pysnt.common_module module
- pysnt.config module
- pysnt.core module
- pysnt.gui_utils module
- pysnt.java_utils module
- pysnt.setup_utils module
get_config_dir()load_config()save_config()set_fiji_path()get_fiji_path()clear_fiji_path()reset_fiji_path()get_config_info()is_fiji_valid()get_fiji_status()show_config_status()auto_detect_and_configure()setup_fiji_environment()find_fiji_installations()check_fiji_installation()print_fiji_status()interactive_fiji_setup()