ImFusion C++ SDK 4.5.0
ImFusion::AnatomyPlugin Namespace Reference

Namespace of the anatomy plugin. More...

Detailed Description

Namespace of the anatomy plugin.

Namespaces

namespace  StyleProperty
 List of known style "property-names".

Classes

struct  SelectorAnnotation
 A post-selection metadata annotation attached to a SelectorElem. More...
struct  SelectorElem
class  Selector
 Style selector combining with logical OR multiple SelectorElem objects. More...
class  StyleSheet
 Class for managing a logically grouped set of style rules. More...
struct  StylePseudoClass
 Known modifier keys. In analogy to CSS, we refer to modifiers of this type as "pseudo-classes". More...
class  InspectStyleSheetsAlgorithm
 This algorithm exists so that InspectStyleSheetsController can exist. More...
class  InspectStyleSheetsController
class  AnatomyPluginFactory
class  AnatomyControllerFactory
class  ASCDataAnnotationFactory
class  Singleton
 Base class for singletons. More...
class  Registry
class  Factory
 Generic factory class for registering polymorphic types Usage: More...
class  ModelFactory
 Factory for managing different versions of ML model sets globally. More...

Enumerations

enum class  ContentType {
  Meshes = 0 , PointClouds , Keypoints , Splines ,
  Images , Planes , Graphs , Deformations ,
  Final
}
 The different types of contents an AnatomicalStructure can hold.

Functions

std::ostreamoperator<< (std::ostream &os, ContentType ct)
std::optional< ContentTypefromString (std::string_view string)

(arg, arg, ...) (e.g. "@labelValues(42, 55)")

One element of a CSS-inspired object selector.

A SelectorElem consists of two strictly separated layers:

Matching layer - determines whether an object is selected. All fields contribute to match() with logical AND; fields that are std::nullopt are ignored.

  • m_ct : content type (e.g. "Images")
  • m_identifier : #identifier (e.g. "#Brain")
  • m_key : /key (e.g. "/Seg")
  • m_attributesStructure : [attr="val"]
  • m_attributesObject : [[attr="val"]]
  • m_pseudoClasses : :pseudo (runtime state flags, see StylePseudoClass)

Annotation layer - post-selection metadata that does NOT affect match(). Annotations are consumed by application code after a match has been confirmed.

  • m_annotations :

Annotation AND/OR rules — uniform with the rest of the grammar (adjacency = AND, comma = OR):

  • Multiple annotations on the same SelectorElem are AND-combined: @labelValues(42)@labelNames(white matter) – both must be satisfied
  • Repeating the same annotation name is a parse error (e.g. @labelValues(42)@labelValues(55)); use the multi-arg OR form instead: @labelValues(42, 55) – equivalent to @labelValues(42) OR @labelValues(55) This is the same as writing two separate SelectorElems: Images/Seg@labelValues(42), Images/Seg@labelValues(55) Consumers iterate argsAsInts()/args and apply OR across them.

Grammar summary (all parts optional except ct):

ct [#[=]identifier] [/[=]key] [[attr="val"]] [[[attr="val"]]] [:pseudo]* [@name(args)]*
Exact-match symbol '=' after '#' or '/':
#identifier -- hierarchical: also matches any child (e.g. "ImFusion.Brain" matches "ImFusion.Brain.Parcellation")
#=identifier -- exact: only the literal identifier value matches
Annotation argument grammar:
name := [a-zA-Z][a-zA-Z0-9_]*
arg := any non-empty string that does not contain ',' or ')' (leading/trailing whitespace trimmed)
args := arg (',' arg)* -- comma-separated; the outer Selector split is parenthesis-aware
annotation := '@' name '(' args? ')' -- name must be unique within one SelectorElem
Style selector combining with logical OR multiple SelectorElem objects.
Definition Selector.h:149
@ Exact
A desired spacing is used as it, without any adjustment.
Definition Image.h:221

Argument constraints:

  • Arguments are comma-separated and whitespace-trimmed, so spaces are allowed within a single argument.
  • The Selector-level comma split skips commas inside '()' so annotation args never conflict with it.
  • Quoted strings are not supported; arguments may not contain ',' or ')'.
  • Floats and negative numbers are not supported.

Example: "Images#Brain/Seg[visible=\"true\"]:focus@labelValues(42, 55)@labelNames(white matter, gray matter)"

Selector operator|| (const SelectorElem &lhs, const SelectorElem &rhs)
std::optional< Selectoroperator""_sel (const char *str, std::size_t len)
 Directly construct a Selector from a string literal like "*"_sel .
Search Tab / S to search, Esc to close