|
Volume Cartographer 2.28.0
|
Local Reslice Particle Simulation (LRPS) segmentation. More...
#include <vc/segmentation/LocalResliceParticleSim.hpp>
Public Types | |
| using | Pointer = std::shared_ptr< LocalResliceSegmentation > |
Public Types inherited from volcart::segmentation::ChainSegmentationAlgorithm | |
| enum class | Status { Success , Failure , ReturnedEarly } |
| using | Pointer = std::shared_ptr< ChainSegmentationAlgorithm > |
| using | Chain = std::vector< cv::Vec3d > |
| using | PointSet = OrderedPointSet< cv::Vec3d > |
| using | Bounds = BoundingBox< double, 3 > |
Public Member Functions | |
| LocalResliceSegmentation ()=default | |
| Default constructor. | |
| ~LocalResliceSegmentation () override=default | |
| void | setTargetZIndex (int z) |
| Set the target z-index. | |
| auto | getTargetZIndex () const -> int |
| Get the target z-index. | |
| void | setOptimizationIterations (int n) |
| Set the number of curve optimization iterations per step. | |
| void | setAlpha (double a) |
| Set the weight for the Active Contour metric. More... | |
| void | setK1 (double k) |
| Set the stretch weight factor. More... | |
| void | setK2 (double k) |
| Set the curvature weight factor. More... | |
| void | setBeta (double b) |
| Set the weight for the Absolute Curvature Sum metric. More... | |
| void | setDelta (double d) |
| Set the weight for the Arc Length metric. More... | |
| void | setMaterialThickness (double m) |
| Set the estimated thickness of the substrate (in um) More... | |
| void | setResliceSize (int s) |
| Set the reslice window size. | |
| void | setDistanceWeightFactor (int f) |
| Set the distance weight factor for candidate positions. | |
| void | setConsiderPrevious (bool b) |
| Set whether to consider previous position as candidate position. | |
| auto | compute () -> PointSet override |
| Compute the segmentation. More... | |
| void | setVisualize (bool b) |
| void | setDumpVis (bool b) |
| auto | progressIterations () const -> std::size_t override |
| Returns the maximum progress value. More... | |
Public Member Functions inherited from volcart::segmentation::ChainSegmentationAlgorithm | |
| ~ChainSegmentationAlgorithm () override=default | |
| auto | progressIterations () const -> std::size_t override |
| Returns the maximum progress value. More... | |
| void | setVolume (Volume::Pointer vol) |
| Set the input Volume. More... | |
| void | setBounds (Bounds b) |
| Set the bounding box for computation. More... | |
| void | setChain (Chain c) |
| Set the input chain of seed points. More... | |
| void | setNumberOfSteps (std::size_t n) |
| Set the number of propagation steps. More... | |
| void | setStepSize (double s) |
| Set the propagation step size. More... | |
| auto | getStatus () const -> Status |
| Get the status of the previous computation. More... | |
| auto | getPointSet () const -> const PointSet & |
| Get the segmented pointset. More... | |
| auto | getPointSet () -> PointSet & |
| Get the segmented pointset. More... | |
| virtual std::size_t | progressIterations () const =0 |
Static Public Member Functions | |
| template<typename... Args> | |
| static auto | New (Args... args) -> Pointer |
Private Member Functions | |
| auto | estimate_normal_at_index_ (const FittedCurve ¤tCurve, int index) -> cv::Vec3d |
| Estimate the normal to the curve at point index. More... | |
| auto | draw_particle_on_slice_ (const FittedCurve &curve, int sliceIndex, int particleIndex=-1, bool showSpline=false) const -> cv::Mat |
| Debug: Draw curve on slice image. More... | |
| auto | create_final_pointset_ (const std::vector< std::vector< Voxel > > &points) -> PointSet |
| Convert the internal storage array into a final PointSet. | |
Private Attributes | |
| int | endIndex_ {0} |
| double | alpha_ {1.0 / 3.0} |
| double | k1_ {0.5} |
| double | k2_ {0.5} |
| double | beta_ {1.0 / 3.0} |
| double | delta_ {1.0 / 3.0} |
| int | peakDistanceWeight_ {50} |
| bool | considerPrevious_ {false} |
| bool | dumpVis_ {false} |
| bool | visualize_ {false} |
| int | numIters_ {15} |
| double | materialThickness_ {100} |
| int | resliceSize_ {32} |
Static Private Attributes | |
| static constexpr double | DEFAULT_MIN_ENERGY_GRADIENT = 1e-7 |
Additional Inherited Members | |
Public Attributes inherited from volcart::IterationsProgress | |
| Signal | progressStarted |
| Signal< std::size_t > | progressUpdated |
| Signal | progressComplete |
Protected Member Functions inherited from volcart::segmentation::ChainSegmentationAlgorithm | |
| ChainSegmentationAlgorithm ()=default | |
Protected Attributes inherited from volcart::segmentation::ChainSegmentationAlgorithm | |
| Volume::Pointer | vol_ |
| Chain | startingChain_ |
| Bounds | bb_ |
| std::size_t | numSteps_ {0} |
| double | stepSize_ {1.0} |
| PointSet | result_ |
| Status | status_ {Status::Success} |
Local Reslice Particle Simulation (LRPS) segmentation.
This algorithm propagates a chain of points forward through a volume from a starting z-index to an ending z-index. Each point is assumed to start within a "channel" of maximum intensity, that is, the bright voxels of a page layer. As the chain propagates forward, each point produces a reslice image that is locally orthogonal to the layer. Using this view, the algorithm finds the weighted set of maxima local to the point. These are assumed to be layer voxels on the current or a nearby layer. Using the sorted maxima for each point, the algorithm then selects the propagated positions for all points in the chain that minimize the energy loss of the chain curvature.
The ending index is inclusive.
Definition at line 34 of file LocalResliceParticleSim.hpp.
| using volcart::segmentation::LocalResliceSegmentation::Pointer = std::shared_ptr<LocalResliceSegmentation> |
Pointer
Definition at line 38 of file LocalResliceParticleSim.hpp.
|
overridedefault |
Default destructor
|
overridevirtual |
Compute the segmentation.
Implements volcart::segmentation::ChainSegmentationAlgorithm.
|
private |
Debug: Draw curve on slice image.
| curve | Input curve |
| sliceIndex | Slice on which to draw |
| particleIndex | Highlight point at particleIndex |
| showSpline | Draw interpolated curve. Default only draws points |
|
private |
Estimate the normal to the curve at point index.
| currentCurve | Input curve |
| index | Index of point on curve |
|
inlinestatic |
Make a new shared instance
Definition at line 48 of file LocalResliceParticleSim.hpp.
|
overridevirtual |
Returns the maximum progress value.
Reimplemented from volcart::segmentation::ChainSegmentationAlgorithm.
| void volcart::segmentation::LocalResliceSegmentation::setAlpha | ( | double | a | ) |
Set the weight for the Active Contour metric.
| void volcart::segmentation::LocalResliceSegmentation::setBeta | ( | double | b | ) |
Set the weight for the Absolute Curvature Sum metric.
| void volcart::segmentation::LocalResliceSegmentation::setDelta | ( | double | d | ) |
Set the weight for the Arc Length metric.
| void volcart::segmentation::LocalResliceSegmentation::setDumpVis | ( | bool | b | ) |
Debug: Dumps reslices and intensity maps to disk
| void volcart::segmentation::LocalResliceSegmentation::setK1 | ( | double | k | ) |
Set the stretch weight factor.
| void volcart::segmentation::LocalResliceSegmentation::setK2 | ( | double | k | ) |
Set the curvature weight factor.
| void volcart::segmentation::LocalResliceSegmentation::setMaterialThickness | ( | double | m | ) |
Set the estimated thickness of the substrate (in um)
Used to generate the radius of the structure tensor calculation
| void volcart::segmentation::LocalResliceSegmentation::setVisualize | ( | bool | b | ) |
Debug: Shows intensity maps in GUI window
|
private |
Active Contour weight parameter
Definition at line 155 of file LocalResliceParticleSim.hpp.
|
private |
Abs. Curvature Sum weight parameter
Definition at line 161 of file LocalResliceParticleSim.hpp.
|
private |
Reconsider previous position flag
Definition at line 167 of file LocalResliceParticleSim.hpp.
|
staticconstexprprivate |
Default minimum energy gradient
Definition at line 150 of file LocalResliceParticleSim.hpp.
|
private |
Arc Length weight parameter
Definition at line 163 of file LocalResliceParticleSim.hpp.
|
private |
Dump visualization to disk flag
Definition at line 169 of file LocalResliceParticleSim.hpp.
|
private |
Target z-index
Definition at line 153 of file LocalResliceParticleSim.hpp.
|
private |
Active Contour stretch parameter
Definition at line 157 of file LocalResliceParticleSim.hpp.
|
private |
Active Contour curvature parameter
Definition at line 159 of file LocalResliceParticleSim.hpp.
|
private |
Estimated material thickness in um
Definition at line 175 of file LocalResliceParticleSim.hpp.
|
private |
Number of curve optimization iterations
Definition at line 173 of file LocalResliceParticleSim.hpp.
|
private |
Distance weight factor for candidate positions
Definition at line 165 of file LocalResliceParticleSim.hpp.
|
private |
Window size for reslice
Definition at line 177 of file LocalResliceParticleSim.hpp.
|
private |
Show visualization in GUI flag
Definition at line 171 of file LocalResliceParticleSim.hpp.