Volume Cartographer 2.27.0
|
Volume Cartographer library More...
Namespaces | |
namespace | color |
Color constants. | |
namespace | experimental |
Experimental algorithms and utilities library. | |
namespace | filesystem |
Alias for std::filesystem | |
namespace | io |
IO classes. | |
namespace | landmarks |
Volume landmark classes. | |
namespace | logging |
Logging utilities. | |
namespace | meshing |
Mesh generation and modification library. | |
namespace | meshmath |
Mesh mathematical operations. | |
namespace | segmentation |
Segmentation algorithms and utilities library | |
namespace | shapes |
Shape and mesh primitives. | |
namespace | testing |
Project testing utilities library. | |
namespace | texturing |
Texturing and parameterization algorithms and utilities library. | |
Classes | |
class | ABFNode |
Parameterize a mesh using ABF++. More... | |
class | AffineTransform |
3D affine transform More... | |
class | AlignUVMapToAxisNode |
Rotate a UVMap to align a specified volume axis to the -V direction of UV space. More... | |
struct | Annotation |
Segmentation annotation. More... | |
class | ApplyTransformNode |
Template node for applying 3D transforms to objects. More... | |
struct | auto_mmap_info |
Memmap record which automatically unmaps the file on destruction. More... | |
class | BoundingBox |
Generic axis-aligned bounding box class for operations in N-dimensions. More... | |
class | Cache |
Abstract Base Class for Key-Value Caches. More... | |
class | CalculateNeighborhoodRadiusNode |
Auto-calculate a texturing neighborhood's 3D radius in voxels given the expected layer thickness and the texturing Volume's voxel size. More... | |
class | CalculateNumVertsNode |
Calculate the number of vertices required to produce a particular resampling density factor. More... | |
struct | CannySettings |
class | CompositeTextureNode |
Generate a texture image using a variety of composite volume filters. More... | |
class | CompositeTransform |
Collection of transforms. More... | |
class | CuboidGenerator |
Class for generating box-like neighborhoods from a point in a Volume. More... | |
class | DiskBasedObjectBaseClass |
Base class for objects stored on disk with an associated metadata file. More... | |
class | EnumerateIterable |
class | FlatteningErrorNode |
Calculate the L2 and LInf stretch between a 2D and 3D mesh. More... | |
class | FlipUVMapNode |
Flip a UVMap across one or both of its axes. More... | |
class | IdentityTransform |
Identity transform. More... | |
class | IntegralTextureNode |
Generate a Texture by taking the discrete integral (summation) of the neighborhood adjacent to a point. More... | |
class | IntersectionTextureNode |
Generate a Texture by intersection with a Volume. More... | |
class | InvertTransformNode |
Return the inverted transform. More... | |
class | IOException |
IO operation exception. More... | |
struct | IterationsProgress |
Mixin type for classes which report their progress. More... | |
class | LaplacianSmoothMeshNode |
Apply Laplacian smoothing to a mesh. More... | |
class | LayerTextureNode |
Generate a Texture of layered images. More... | |
class | LineGenerator |
Class for generating line-like neighborhoods from a point in a Volume. More... | |
class | LoadImageNode |
Read an image from the specified path. More... | |
class | LoadMeshNode |
Read a mesh from a file. More... | |
class | LoadPPMNode |
Read a PerPixelMap from disk. More... | |
class | LoadTransformNode |
Load a transform from a JSON file. More... | |
class | LoadVolumePkgNode |
Load a VolumePkg from disk. More... | |
class | LoadVolumetricMaskNode |
Load a VolumetricMask from a .vcps file. More... | |
class | LRUCache |
Least Recently Used Cache. More... | |
class | MeshingNode |
Generate an ordered mesh from an OrderedPointSet. More... | |
class | MeshPropertiesNode |
Retrieve Mesh properties (e.g. number of vertices, number of faces, etc.) More... | |
struct | MeshReaderResult |
Result for ReadMesh. More... | |
struct | MeshWriterOpts |
General options for WriteMesh. More... | |
class | Metadata |
Generic interface for storing metadata as key/value pairs. More... | |
struct | mmap_info |
Memmap record. More... | |
class | NDArray |
Dynamically-allocated N-Dimensional Array. More... | |
class | NeighborhoodGenerator |
Base class for neighborhood generating classes. More... | |
class | NeighborhoodGeneratorNode |
Configure a NeighborhoodGenerator for use by a texturing algorithm. More... | |
struct | NoOpMutex |
class | OrderedPointSet |
Holds a collection of ordered points. More... | |
class | OrientNormalsNode |
Orient vertex normals towards a reference point. More... | |
class | OrthographicFlatteningNode |
Computes a 2D parameterization of a triangular mesh using orthographic projection. More... | |
class | PerPixelMap |
A raster of a UVMap that provides a per-pixel mapping between a Volume and a Texture generated from that volume. More... | |
class | PlotLStretchErrorNode |
Plot per-face L stretch error metrics. More... | |
class | PlotUVMapNode |
Plot the UV points on an image. More... | |
class | PointSet |
Holds a collection of points. More... | |
class | PointSetIO |
Read and write PointSet and OrderedPointSet. More... | |
class | PPMGeneratorNode |
Generates a PerPixelMap from an ITKMesh and a UVMap. More... | |
class | PPMPropertiesNode |
Retrieve PerPixelMap properties (e.g. mask, cell map, etc.) More... | |
struct | ProjectInfo |
class | Range2DIterable |
Provides an iterable range of 2D number pairs with optional step size. More... | |
class | RangeIterable |
Provides an iterable range of numbers with optional step size. More... | |
class | Render |
Render data. More... | |
class | ResampleMeshNode |
Mesh resampling using Approximated Centroidal Voronoi Diagrams. More... | |
class | Reslice |
An image generated by intersecting a plane with a Volume. More... | |
class | RotateUVMapNode |
Rotate a UVMap by a multiple of 90 degrees. More... | |
class | ScaleMeshNode |
Scale an ITKMesh by a linear scale factor. More... | |
class | Segmentation |
Segmentation data. More... | |
class | SegmentationPropertiesNode |
Retrieve Segmentation properties (e.g. pointset) More... | |
class | SegmentationSelectorNode |
Get a Segmentation by uuid. More... | |
class | Signal |
Basic signal class for implementing event callbacks. More... | |
struct | SimpleMesh |
class | SkyscanMetadataIO |
Read a Skyscan metadata log. More... | |
class | Tensor3D |
A 3rd-order tensor object. More... | |
struct | TexturedMesh |
Convenience type for textured meshes. More... | |
class | ThicknessTextureNode |
Generate a Texture using the thickness of the segmented layer. More... | |
class | Transform3D |
Base class for 3D transforms. More... | |
class | TransformMeshNode |
Apply a transform to an ITKMesh. More... | |
class | TransformPPMNode |
Apply a transform to a PerPixelMap. More... | |
class | TransformSelectorNode |
Get a transform by ID. More... | |
class | UVMap |
Stores per-vertex UV mappings. More... | |
class | UVMapToMeshNode |
Convert a UVMap to a mesh. More... | |
struct | Vec3Hash |
class | Volume |
Volumetric image data. More... | |
class | VolumeMask |
Per-voxel Segmentation State Mask for Volumes. More... | |
class | VolumePkg |
The interface to the VolumePkg (.volpkg) file format. More... | |
class | VolumePkgPropertiesNode |
Retrieve VolumePkg properties (e.g. name, version, etc.) More... | |
class | VolumePropertiesNode |
Set/Retrieve Volume properties (voxel size, bounds, etc.) More... | |
class | VolumeSelectorNode |
Get a Volume by uuid. More... | |
class | VolumetricMask |
Stores per-voxel mask information for a volume. More... | |
class | WriteImageNode |
Write image to the specified path. More... | |
struct | WriteImageOpts |
class | WriteImageSequenceNode |
class | WriteMeshNode |
Write a mesh to a file. More... | |
class | WritePPMNode |
Write a PerPixelMap to disk. More... | |
Typedefs | |
using | EigenValue = double |
using | EigenVector = cv::Vec3d |
using | EigenPairs = std::array< std::pair< EigenValue, EigenVector >, 3 > |
using | StructureTensor = cv::Matx33d |
using | Neighborhood = NDArray< std::uint16_t > |
N-dimensional neighborhood class. More... | |
using | AnnotationFlag = std::uint8_t |
using | AnnotationSet = OrderedPointSet< Annotation > |
Ordered annotation collection. More... | |
using | Color = cv::Vec3b |
Color type. More... | |
using | DictionaryEntryKey = std::string |
using | Dictionary = std::unordered_map< DictionaryEntryKey, DictionaryEntryType > |
using | Library = std::unordered_map< int, Dictionary > |
using | Vec3iHash = Vec3Hash< cv::Vec3i > |
ITK Mesh | |
using | ITKPixel = itk::Vector< double, 3 > |
using | ITKMeshTraits = itk::DefaultStaticMeshTraits< ITKPixel, 3, 3, double, double, ITKPixel > |
using | ITKMesh = itk::Mesh< ITKPixel, 3, ITKMeshTraits > |
using | ITKPoint = ITKMesh::PointType |
using | ITKCell = ITKMesh::CellType |
using | ITKTriangle = itk::TriangleCell< ITKCell > |
using | ITKPointsContainer = ITKMesh::PointsContainer |
using | ITKPointsLocator = itk::PointsLocator< ITKPointsContainer > |
using | ITKPointIterator = ITKPointsContainer::ConstIterator |
using | ITKCellIterator = ITKMesh::CellsContainer::Iterator |
using | ITKPointInCellIterator = ITKCell::PointIdIterator |
ITK QuadEdgeMesh | |
using | QuadPixel = std::array< double, 3 > |
using | QuadVector = itk::Vector< double, 3 > |
using | QuadTraits = itk::QuadEdgeMeshExtendedTraits< QuadVector, 3, 2, double, double, QuadVector, bool, bool > |
using | QuadEdgeMesh = itk::QuadEdgeMesh< double, 3, QuadTraits > |
using | QuadPoint = QuadEdgeMesh::PointType |
using | QuadPointIdentifier = QuadEdgeMesh::PointIdentifier |
using | QuadCell = QuadEdgeMesh::CellType |
using | QuadCellIdentifier = QuadEdgeMesh::CellIdentifier |
using | QuadTriangleCell = itk::TriangleCell< QuadCell > |
using | QuadPointsContainer = QuadEdgeMesh::PointsContainer |
using | QuadPointsInMeshIterator = QuadEdgeMesh::PointsContainer::ConstIterator |
using | QuadCellIterator = QuadEdgeMesh::CellsContainer::Iterator |
using | QuadPointsInCellIterator = QuadCell::PointIdIterator |
using | QuadMeshQE = QuadEdgeMesh::QEType |
using | QuadMeshIteratorGeom = QuadMeshQE::IteratorGeom |
using | QuadEdgeList = QuadEdgeMesh::EdgeListType |
using | QuadEdgeListPointer = QuadEdgeMesh::EdgeListPointerType |
using | QuadEdgeListIterator = QuadEdgeList::iterator |
Enumerations | |
enum class | IOMode { ASCII = 0 , BINARY } |
IO Mode for file readers/writers. More... | |
enum class | Direction { Negative = -1 , Bidirectional = 0 , Positive = 1 } |
Neighborhood directional filtering options. More... | |
enum class | DictionaryEntryType { String , Int , Double } |
enum class | ColorMap { ColorMap::Magma = 0 , ColorMap::Inferno , ColorMap::Plasma , ColorMap::Viridis , ColorMap::Phase , ColorMap::BWR } |
Built-in color maps. More... | |
enum class | MemoryStringFormat { Int , Float } |
Functions | |
auto | ReadImage (const filesystem::path &path) -> cv::Mat |
Read an image from the specified path. More... | |
void | WriteImage (const filesystem::path &path, const cv::Mat &img, WriteImageOpts={}) |
Write image to the specified path. More... | |
template<class Iterable > | |
void | WriteImageSequence (const filesystem::path &path, const Iterable &iterable, const WriteImageOpts &opts={}) |
auto | ReadMesh (const filesystem::path &path) -> MeshReaderResult |
Read a mesh from a file. More... | |
void | WriteMesh (const filesystem::path &path, const ITKMesh::Pointer &mesh, const UVMap::Pointer &uv=nullptr, const cv::Mat &texture=cv::Mat(), const MeshWriterOpts &opts={}) |
Write a mesh to a file. More... | |
StructureTensor | ComputeVoxelStructureTensor (const Volume::Pointer &volume, int vx, int vy, int vz, int radius=1, int kernelSize=3) |
Compute the structure tensor for a voxel position. More... | |
StructureTensor | ComputeVoxelStructureTensor (const Volume::Pointer &volume, const cv::Vec3i &index, int radius=1, int kernelSize=3) |
StructureTensor | ComputeSubvoxelStructureTensor (const Volume::Pointer &volume, double vx, double vy, double vz, int radius=1, int kernelSize=3) |
Compute the structure tensor for a subvoxel position. More... | |
StructureTensor | ComputeSubvoxelStructureTensor (const Volume::Pointer &volume, const cv::Vec3d &index, int radius=1, int kernelSize=3) |
EigenPairs | ComputeVoxelEigenPairs (const Volume::Pointer &volume, int x, int y, int z, int radius=1, int kernelSize=3) |
Compute the eigenvalues and eigenvectors from the structure tensor for a voxel position. More... | |
EigenPairs | ComputeVoxelEigenPairs (const Volume::Pointer &volume, const cv::Vec3i &index, int radius=1, int kernelSize=3) |
EigenPairs | ComputeSubvoxelEigenPairs (const Volume::Pointer &volume, double x, double y, double z, int radius=1, int kernelSize=3) |
Compute the eigenvalues and eigenvectors from the structure tensor for a subvoxel position. More... | |
EigenPairs | ComputeSubvoxelEigenPairs (const Volume::Pointer &volume, const cv::Vec3d &index, int radius=1, int kernelSize=3) |
template<typename DType > | |
Tensor3D< DType > | ComputeVoxelNeighbors (const Volume::Pointer &volume, const cv::Vec3i ¢er, std::int32_t rx, std::int32_t ry, std::int32_t rz) |
Get an axis-aligned cuboid subvolume centered on a voxel. More... | |
template<typename DType > | |
Tensor3D< DType > | ComputeSubvoxelNeighbors (const Volume::Pointer &volume, const cv::Vec3d ¢er, int rx, int ry, int rz, const cv::Vec3d &xvec={1, 0, 0}, const cv::Vec3d &yvec={0, 1, 0}, const cv::Vec3d &zvec={0, 0, 1}) |
Get an axis-aligned cuboid subvolume centered on a subvoxel. More... | |
void | WriteAnnotationSet (const filesystem::path &path, const AnnotationSet &as) |
Write an AnnotationSet to disk. | |
auto | ReadAnnotationSet (const filesystem::path &path) -> AnnotationSet |
Load an AnnotationSet from disk. | |
void | DeepCopy (const ITKMesh::Pointer &input, const ITKMesh::Pointer &output, bool copyVertices=true, bool copyFaces=true) |
Create exact copy of ITKMesh. More... | |
auto | DeepCopy (const ITKMesh::Pointer &input, bool copyVertices=true, bool copyFaces=true) -> ITKMesh::Pointer |
Create exact copy of ITKMesh. More... | |
auto | operator* (const Transform3D::Pointer &lhs, const Transform3D::Pointer &rhs) -> Transform3D::Pointer |
Compose transform convenience operator. More... | |
auto | ApplyTransform (const ITKMesh::Pointer &mesh, const Transform3D::Pointer &transform, bool normalize=true) -> ITKMesh::Pointer |
Apply a transform to an ITKMesh. | |
auto | ApplyTransform (const PerPixelMap &ppm, const Transform3D::Pointer &transform, bool normalize=true) -> PerPixelMap |
Apply a transform to a PerPixelMap. | |
auto | ApplyTransform (const PerPixelMap::Pointer &ppm, const Transform3D::Pointer &transform, bool normalize=true) -> PerPixelMap::Pointer |
Apply a transform to a PerPixelMap::Pointer. | |
template<class PointSetT > | |
auto | ApplyTransform (const PointSetT &ps, const Transform3D::Pointer &transform) -> PointSetT |
Apply a transform to a PointSet. More... | |
cv::Mat | ApplyLUT (const cv::Mat &img, const cv::Mat &lut, float min, float max, bool invert=false) |
Apply a LUT to an image. More... | |
cv::Mat | ApplyLUT (const cv::Mat &img, const cv::Mat &lut, float min, float mid, float max, bool invert=false) |
Apply a LUT to an image. More... | |
cv::Mat | ApplyLUT (const cv::Mat &img, const cv::Mat &lut, bool invert=false, const cv::Mat &mask=cv::Mat()) |
Apply a LUT to an image. More... | |
cv::Mat | GenerateLUTScaleBar (const cv::Mat &lut, bool invert=false, std::size_t height=36, std::size_t width=256) |
Generate a LUT scale bar image. More... | |
cv::Vec3d | CartesianToBarycentric (const cv::Vec3d &pt, const cv::Vec3d &triA, const cv::Vec3d &triB, const cv::Vec3d &triC) |
Convert a Cartesian coordinate to barycentric coordinate relative to the given triangle. More... | |
cv::Vec3d | BarycentricToCartesian (const cv::Vec3d &pt, const cv::Vec3d &triA, const cv::Vec3d &triB, const cv::Vec3d &triC) |
Convert a barycentric coordinate relative to the given triangle to a Cartesian coordinate. More... | |
bool | BarycentricPointIsInTriangle (const cv::Vec3d &pt) |
Check whether a barycentric coordinate is bounded by the given triangle. | |
cv::Vec3d | BarycentricNormalInterpolation (const cv::Vec3d &uvw, const cv::Vec3d &nA, const cv::Vec3d &nB, const cv::Vec3d &nC) |
Use Barycentric coordinates to smoothly interpolate a normal. | |
bool | CartesianPointIsInTriangle (const cv::Vec3d &pt, const cv::Vec3d &triA, const cv::Vec3d &triB, const cv::Vec3d &triC) |
Check whether a Cartesian coordinate is bounded by the given triangle. | |
auto | Canny (cv::Mat src, const CannySettings &settings) -> cv::Mat |
Perform Canny edge segmentation on an image. | |
std::string | ColorMapToString (ColorMap cm) |
Get the string name of a ColorMap. | |
ColorMap | ColorMapFromString (const std::string &str) |
Get a ColorMap from its string name. | |
cv::Mat | GetColorMapLUT (ColorMap cm, std::size_t bins=256) |
Get a color map LUT for use with ApplyLUT. | |
cv::Mat | GetColorMapLUT (const std::string &name, std::size_t bins=256) |
Get a color map LUT for use with ApplyLUT. | |
auto | DateTime () -> std::string |
Returns a string representation of the current date and time. More... | |
template<typename Rep , typename Period > | |
auto | DurationToString (std::chrono::duration< Rep, Period > input) -> std::string |
Returns a string representation of the provided time duration. More... | |
template<typename Duration = std::chrono::milliseconds> | |
auto | DurationFromString (const std::string &str) -> Duration |
Convert a duration string to a a std::chrono duration. More... | |
template<typename T , std::enable_if_t< std::is_floating_point< T >::value, bool > = true> | |
auto | AlmostEqual (const T lhs, const T rhs, T epsAbs=static_cast< T >(DEFAULT_MAX_DIFFERENCE), T epsRel=std::numeric_limits< T >::epsilon()) -> bool |
Compare if two floating-point numbers are "almost equal". More... | |
std::string | FormatStrToRegexStr (const std::string &s) |
Converts a printf-style format string to a std::regex string. More... | |
auto | DepthToString (int depth) -> std::string |
Convert an OpenCV depth enum value to a human-readable string. | |
auto | QuantizeImage (const cv::Mat &m, int depth=CV_16U, bool scaleMinMax=true) -> cv::Mat |
Convert image to specified depth using max scaling. More... | |
auto | ColorConvertImage (const cv::Mat &m, int channels=1) -> cv::Mat |
Convert image to specified number of channels. | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &os, const RangeIterable< T > &it) |
template<typename T > | |
auto | range (T stop) |
template<typename T0 , typename T1 > | |
auto | range (T0 start, T1 stop) |
template<typename T0 , typename T1 , typename T2 > | |
auto | range (T0 start, T1 stop, T2 step) |
template<typename T0 , typename T1 > | |
auto | range2D (T0 vStop, T1 uStop) |
template<typename T0 , typename T1 , typename T2 , typename T3 > | |
auto | range2D (T0 vStart, T1 vStop, T2 uStart, T3 uStop) |
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > | |
auto | range2D (T0 vStart, T1 vStop, T2 uStart, T3 uStop, T4 step) |
template<class Iterable > | |
auto | enumerate (Iterable &&it) |
Wrap an Iterable into a new one whose iterators return an [index, value] pair. More... | |
template<typename... Args> | |
EnumerateIterable< std::vector< std::common_type_t< Args... > > > | enumerate (Args &&... args) |
Wrap an Iterable into a new one whose iterators return an [index, value] pair. More... | |
static std::size_t | LinearNeighborhoodSize (double radius, double interval, Direction dir) |
Return the size of a Linear Neighborhood calculated with the given parameters. More... | |
auto | Logger () -> std::shared_ptr< spdlog::logger > |
Volume Cartographer global logger. | |
auto | MemmapFile (const filesystem::path &path) -> mmap_info |
Memory map a file. More... | |
auto | UnmapFile (mmap_info &mmap_info) -> int |
Unmap a memory mapped file. More... | |
auto | memmap_supported () -> bool |
std::size_t | MemorySizeStringParser (const std::string &s) |
Converts strings describing memory sizes to byte values. More... | |
std::string | BytesToMemorySizeString (std::size_t bytes, const std::string &suffix="GB", MemoryStringFormat fmt=MemoryStringFormat::Int) |
static void | to_upper (std::string &s) |
Convert string characters to upper case (in place) More... | |
static std::string | to_upper (std::string &&s) |
Convert string characters to upper case (r-value) More... | |
static std::string | to_upper_copy (std::string s) |
Convert string characters to upper case (copy) More... | |
static void | to_lower (std::string &s) |
Convert string characters to lower case (in place) More... | |
static std::string | to_lower (std::string &&s) |
Convert string characters to lower case (r-value) More... | |
static std::string | to_lower_copy (std::string s) |
Convert string characters to lower case (copy) More... | |
static auto | to_bool (const std::string &s) -> bool |
Convert a string to a bool. More... | |
static void | trim_left (std::string &s) |
Left trim (in place) More... | |
static std::string | trim_left (std::string &&s) |
Left trim (r-value) More... | |
static std::string | trim_left_copy (std::string s) |
Left trim (copy) More... | |
static void | trim_right (std::string &s) |
Right trim (in place) More... | |
static std::string | trim_right (std::string &&s) |
Right trim (r-value) More... | |
static std::string | trim_right_copy (std::string s) |
Right trim (copy) More... | |
static void | trim (std::string &s) |
Trim from both ends (in place) More... | |
static std::string | trim (std::string &&s) |
Trim from both ends (r-value) More... | |
static std::string | trim_copy (std::string s) |
Right trim (copy) More... | |
template<typename... Ds> | |
static std::vector< std::string > | split (const std::string &s, const Ds &... ds) |
Split a string by a delimiter. More... | |
static auto | partition (std::string_view s, std::string_view sep) -> std::tuple< std::string, std::string, std::string > |
Partition a string by a separator substring. More... | |
template<typename Integer , std::enable_if_t< std::is_integral_v< Integer >, bool > = true> | |
auto | to_padded_string (Integer val, const int padding, const char fill='0') -> std::string |
Convert an Integer to a padded string. More... | |
void | RegisterNodes () |
Register all VC provided nodes with the smgl library. | |
Variables | |
constexpr auto | IsFileType = io::FileExtensionFilter |
constexpr auto | IsUnixHiddenFile = io::UnixHiddenFileFilter |
static const auto | ZERO_STRUCTURE_TENSOR |
static constexpr AnnotationFlag | ANNO_NONE = 0x0000 |
static constexpr AnnotationFlag | ANNO_ANCHOR = 0x0001 |
static constexpr AnnotationFlag | ANNO_MANUAL = 0x0002 |
static constexpr AnnotationFlag | ANNO_USED_IN_RUN = 0x0004 |
static const cv::Vec2d | NULL_MAPPING {-1, -1} |
static constexpr int | VOLPKG_VERSION_LATEST = 7 |
Volume Package version generated by this release More... | |
const Dictionary | V7 |
const Dictionary | V6 = V7 |
const Dictionary | V5 = V6 |
const Dictionary | V4 = V5 |
const Dictionary | V3 |
const Dictionary | V2 |
const Dictionary | V1 |
const Library | VERSION_LIBRARY |
static constexpr double | DEFAULT_MAX_DIFFERENCE = 1e-7 |
Volume Cartographer library
using volcart::AnnotationFlag = typedef std::uint8_t |
Annotation flags
Definition at line 15 of file Annotation.hpp.
using volcart::AnnotationSet = typedef OrderedPointSet<Annotation> |
Ordered annotation collection.
Definition at line 41 of file Annotation.hpp.
using volcart::Color = typedef cv::Vec3b |
using volcart::Dictionary = typedef std::unordered_map<DictionaryEntryKey, DictionaryEntryType> |
Holds a set of key-value pairs that map JSON metadata keys to the expected type of the value. A template for the structure of a VolumePkg's metadata.
Definition at line 48 of file VolumePkgVersion.hpp.
using volcart::DictionaryEntryKey = typedef std::string |
Dictionary entry
Definition at line 39 of file VolumePkgVersion.hpp.
using volcart::EigenPairs = typedef std::array<std::pair<EigenValue, EigenVector>, 3> |
EigenPair type
Definition at line 25 of file StructureTensor.hpp.
using volcart::EigenValue = typedef double |
Eigenvalue type
Definition at line 19 of file StructureTensor.hpp.
using volcart::EigenVector = typedef cv::Vec3d |
Eigenvector type
Definition at line 22 of file StructureTensor.hpp.
using volcart::ITKCell = typedef ITKMesh::CellType |
ITK Mesh Generic Face
Definition at line 28 of file ITKMesh.hpp.
using volcart::ITKCellIterator = typedef ITKMesh::CellsContainer::Iterator |
ITK Mesh Cell Iterator
Definition at line 43 of file ITKMesh.hpp.
using volcart::ITKMesh = typedef itk::Mesh<ITKPixel, 3, ITKMeshTraits> |
ITK Mesh
Definition at line 22 of file ITKMesh.hpp.
using volcart::ITKMeshTraits = typedef itk::DefaultStaticMeshTraits<ITKPixel, 3, 3, double, double, ITKPixel> |
ITK Mesh base properties
Definition at line 18 of file ITKMesh.hpp.
using volcart::ITKPixel = typedef itk::Vector<double, 3> |
ITK Vertex/Pixel base properties
Definition at line 15 of file ITKMesh.hpp.
using volcart::ITKPoint = typedef ITKMesh::PointType |
ITK Mesh Vertex
Definition at line 25 of file ITKMesh.hpp.
using volcart::ITKPointInCellIterator = typedef ITKCell::PointIdIterator |
ITK Mesh Vertex ID In Cell Iterator
Definition at line 46 of file ITKMesh.hpp.
using volcart::ITKPointIterator = typedef ITKPointsContainer::ConstIterator |
ITK Mesh Point Iterator
Definition at line 40 of file ITKMesh.hpp.
using volcart::ITKPointsContainer = typedef ITKMesh::PointsContainer |
ITK Mesh Point Container
Definition at line 34 of file ITKMesh.hpp.
using volcart::ITKPointsLocator = typedef itk::PointsLocator<ITKPointsContainer> |
ITK Mesh Point Locator
Definition at line 37 of file ITKMesh.hpp.
using volcart::ITKTriangle = typedef itk::TriangleCell<ITKCell> |
ITK Mesh Triangular Face
Definition at line 31 of file ITKMesh.hpp.
using volcart::Library = typedef std::unordered_map<int, Dictionary> |
Holds a set of key-value pairs that map version number keys to a specific Dictionary of metadata mappings.
Definition at line 54 of file VolumePkgVersion.hpp.
using volcart::QuadCell = typedef QuadEdgeMesh::CellType |
ITK QEM Generic Face
Definition at line 46 of file QuadEdgeMesh.hpp.
using volcart::QuadCellIdentifier = typedef QuadEdgeMesh::CellIdentifier |
ITK QEM Cell ID
Definition at line 49 of file QuadEdgeMesh.hpp.
using volcart::QuadCellIterator = typedef QuadEdgeMesh::CellsContainer::Iterator |
ITK QEM Face Iterator
Definition at line 61 of file QuadEdgeMesh.hpp.
using volcart::QuadEdgeList = typedef QuadEdgeMesh::EdgeListType |
ITK QEM Edge List
Definition at line 73 of file QuadEdgeMesh.hpp.
using volcart::QuadEdgeListIterator = typedef QuadEdgeList::iterator |
ITK QEM Edge List Iterator
Definition at line 79 of file QuadEdgeMesh.hpp.
using volcart::QuadEdgeListPointer = typedef QuadEdgeMesh::EdgeListPointerType |
ITK QEM Edge List Pointer
Definition at line 76 of file QuadEdgeMesh.hpp.
using volcart::QuadEdgeMesh = typedef itk::QuadEdgeMesh<double, 3, QuadTraits> |
ITK Quad-Edge Mesh
http://www.insight-journal.org/browse/publication/122
Definition at line 37 of file QuadEdgeMesh.hpp.
using volcart::QuadMeshIteratorGeom = typedef QuadMeshQE::IteratorGeom |
ITK QEM Geometry Iterator
Definition at line 70 of file QuadEdgeMesh.hpp.
using volcart::QuadMeshQE = typedef QuadEdgeMesh::QEType |
ITK QEM Edge
Definition at line 67 of file QuadEdgeMesh.hpp.
using volcart::QuadPixel = typedef std::array<double, 3> |
ITK QEM Vertex/Pixel base properties
Definition at line 17 of file QuadEdgeMesh.hpp.
using volcart::QuadPoint = typedef QuadEdgeMesh::PointType |
ITK QEM Vertex
Definition at line 40 of file QuadEdgeMesh.hpp.
using volcart::QuadPointIdentifier = typedef QuadEdgeMesh::PointIdentifier |
ITK QEM Vertex ID
Definition at line 43 of file QuadEdgeMesh.hpp.
using volcart::QuadPointsContainer = typedef QuadEdgeMesh::PointsContainer |
ITK QEM Point Container
Definition at line 55 of file QuadEdgeMesh.hpp.
using volcart::QuadPointsInCellIterator = typedef QuadCell::PointIdIterator |
ITK QEM Vertex ID In Cell Iterator
Definition at line 64 of file QuadEdgeMesh.hpp.
using volcart::QuadPointsInMeshIterator = typedef QuadEdgeMesh::PointsContainer::ConstIterator |
ITK QEM Point Container Iterator
Definition at line 58 of file QuadEdgeMesh.hpp.
using volcart::QuadTraits = typedef itk::QuadEdgeMeshExtendedTraits< QuadVector, 3, 2, double, double, QuadVector, bool, bool> |
ITK QEM Mesh base properties
Definition at line 23 of file QuadEdgeMesh.hpp.
using volcart::QuadTriangleCell = typedef itk::TriangleCell<QuadCell> |
ITK QEM Triangular Face
Definition at line 52 of file QuadEdgeMesh.hpp.
using volcart::QuadVector = typedef itk::Vector<double, 3> |
ITK QEM Cell Pixel base properties
Definition at line 20 of file QuadEdgeMesh.hpp.
using volcart::StructureTensor = typedef cv::Matx33d |
StructureTensor type
Definition at line 28 of file StructureTensor.hpp.
using volcart::Vec3iHash = typedef Vec3Hash<cv::Vec3i> |
Hash for cv::Vec3i
Definition at line 41 of file HashFunctions.hpp.
|
strong |
Possible types for Dictionary entries
Definition at line 42 of file VolumePkgVersion.hpp.
|
strong |
Neighborhood directional filtering options.
Definition at line 25 of file NeighborhoodGenerator.hpp.
|
strong |
Definition at line 17 of file MemorySizeStringParser.hpp.
|
inline |
Compare if two floating-point numbers are "almost equal".
Two numbers are "almost equal" if the absolute difference between the numbers is below the absolute error epsMax
or if the absolute difference is smaller than epsRel
% of the largest input parameter.
lhs | Left operand |
rhs | Right operand |
epsAbs | Maximum absolute difference. Useful when comparing numbers close to 0. |
epsRel | Maximum relative difference. |
Definition at line 49 of file FloatComparison.hpp.
cv::Mat volcart::ApplyLUT | ( | const cv::Mat & | img, |
const cv::Mat & | lut, | ||
float | min, | ||
float | mid, | ||
float | max, | ||
bool | invert = false |
||
) |
Apply a LUT to an image.
Maps the pixel values of an image to the range of a LUT. LUT must be a cv::Mat with shape . Input images should be
CV_8U
, CV_16U
, or CV_32F
. Inputs with more than one channel will be converted to grayscale prior to mapping.
This overload provides two linear maps. Pixel values in the range [0, bins / 2)f$ and values in the range
[bins / 2, bins)f$. This is useful if you want to map a specific value to the midpoint of a LUT (e.g. ColorMap::BWR). If invert is true, the bin mapping will be reversed.
auto volcart::ApplyTransform | ( | const PointSetT & | ps, |
const Transform3D::Pointer & | transform | ||
) | -> PointSetT |
Apply a transform to a PointSet.
Definition at line 11 of file TransformsImpl.hpp.
cv::Vec3d volcart::BarycentricToCartesian | ( | const cv::Vec3d & | pt, |
const cv::Vec3d & | triA, | ||
const cv::Vec3d & | triB, | ||
const cv::Vec3d & | triC | ||
) |
Convert a barycentric coordinate relative to the given triangle to a Cartesian coordinate.
pt | Barycentric coordinate |
triA | Position of the first vertex in the triangle |
triB | Position of the second vertex in the triangle |
triC | Position of the third vertex in the triangle |
cv::Vec3d volcart::CartesianToBarycentric | ( | const cv::Vec3d & | pt, |
const cv::Vec3d & | triA, | ||
const cv::Vec3d & | triB, | ||
const cv::Vec3d & | triC | ||
) |
Convert a Cartesian coordinate to barycentric coordinate relative to the given triangle.
pt | Cartesian coordinate |
triA | Position of the first vertex in the triangle |
triB | Position of the second vertex in the triangle |
triC | Position of the third vertex in the triangle |
EigenPairs volcart::ComputeSubvoxelEigenPairs | ( | const Volume::Pointer & | volume, |
double | x, | ||
double | y, | ||
double | z, | ||
int | radius = 1 , |
||
int | kernelSize = 3 |
||
) |
Compute the eigenvalues and eigenvectors from the structure tensor for a subvoxel position.
The structure tensor is calculated from the gradient of a cubic subvolume centered around the provided point. The size of this subvolume is defined by radius
.
The kernelSize
must be one of the following: 1, 3, 5, 7. If kernelSize = 3
, the Scharr operator will be used to calculate the gradient, otherwise the Sobel operator will be used.
More information about the structure tensor can be found on Wikipedia.
radius | Radius of subvolume used to calculate structure tensor |
kernelSize | Size of the gradient kernel |
This version computes the structure tensor for subvoxel positions within the volume.
Tensor3D< DType > volcart::ComputeSubvoxelNeighbors | ( | const Volume::Pointer & | volume, |
const cv::Vec3d & | center, | ||
int | rx, | ||
int | ry, | ||
int | rz, | ||
const cv::Vec3d & | xvec = {1, 0, 0} , |
||
const cv::Vec3d & | yvec = {0, 1, 0} , |
||
const cv::Vec3d & | zvec = {0, 0, 1} |
||
) |
Get an axis-aligned cuboid subvolume centered on a subvoxel.
Definition at line 170 of file StructureTensor.hpp.
StructureTensor volcart::ComputeSubvoxelStructureTensor | ( | const Volume::Pointer & | volume, |
double | vx, | ||
double | vy, | ||
double | vz, | ||
int | radius = 1 , |
||
int | kernelSize = 3 |
||
) |
Compute the structure tensor for a subvoxel position.
The structure tensor is calculated from the gradient of a cubic subvolume centered around the provided point. The size of this subvolume is defined by radius
.
The kernelSize
must be one of the following: 1, 3, 5, 7. If kernelSize = 3
, the Scharr operator will be used to calculate the gradient, otherwise the Sobel operator will be used.
More information about the structure tensor can be found on Wikipedia.
radius | Radius of subvolume used to calculate structure tensor |
kernelSize | Size of the gradient kernel |
This version computes the structure tensor for subvoxel positions within the volume.
EigenPairs volcart::ComputeVoxelEigenPairs | ( | const Volume::Pointer & | volume, |
int | x, | ||
int | y, | ||
int | z, | ||
int | radius = 1 , |
||
int | kernelSize = 3 |
||
) |
Compute the eigenvalues and eigenvectors from the structure tensor for a voxel position.
The structure tensor is calculated from the gradient of a cubic subvolume centered around the provided point. The size of this subvolume is defined by radius
.
The kernelSize
must be one of the following: 1, 3, 5, 7. If kernelSize = 3
, the Scharr operator will be used to calculate the gradient, otherwise the Sobel operator will be used.
More information about the structure tensor can be found on Wikipedia.
radius | Radius of subvolume used to calculate structure tensor |
kernelSize | Size of the gradient kernel |
Tensor3D< DType > volcart::ComputeVoxelNeighbors | ( | const Volume::Pointer & | volume, |
const cv::Vec3i & | center, | ||
std::int32_t | rx, | ||
std::int32_t | ry, | ||
std::int32_t | rz | ||
) |
Get an axis-aligned cuboid subvolume centered on a voxel.
center | Center position of the subvolume |
rx | Radius of the subvolume X-axis |
ry | Radius of the subvolume Y-axis |
rz | Radius of the subvolume Z-axis |
Definition at line 142 of file StructureTensor.hpp.
StructureTensor volcart::ComputeVoxelStructureTensor | ( | const Volume::Pointer & | volume, |
int | vx, | ||
int | vy, | ||
int | vz, | ||
int | radius = 1 , |
||
int | kernelSize = 3 |
||
) |
Compute the structure tensor for a voxel position.
The structure tensor is calculated from the gradient of a cubic subvolume centered around the provided point. The size of this subvolume is defined by radius
.
The kernelSize
must be one of the following: 1, 3, 5, 7. If kernelSize = 3
, the Scharr operator will be used to calculate the gradient, otherwise the Sobel operator will be used.
More information about the structure tensor can be found on Wikipedia.
radius | Radius of subvolume used to calculate structure tensor |
kernelSize | Size of the gradient kernel |
|
inline |
Returns a string representation of the current date and time.
Format: YYYYMMDDHMS
Code from here.
Definition at line 26 of file DateTime.hpp.
auto volcart::DeepCopy | ( | const ITKMesh::Pointer & | input, |
bool | copyVertices = true , |
||
bool | copyFaces = true |
||
) | -> ITKMesh::Pointer |
Create exact copy of ITKMesh.
Copy vertex and face information from the input mesh into the output mesh. The resulting mesh is a unique (i.e. memory independent) copy of the original.
auto volcart::DurationFromString | ( | const std::string & | str | ) | -> Duration |
Convert a duration string to a a std::chrono duration.
Accepts strings with ordered combinations of #h
, #m
, #s
, and #ms
. Examples: 10s
, 500ms
, 1m30s
.
Duration | Output duration type |
str | Input string |
Definition at line 97 of file DateTime.hpp.
auto volcart::DurationToString | ( | std::chrono::duration< Rep, Period > | input | ) | -> std::string |
Returns a string representation of the provided time duration.
Format: dd:hh:mm:ss
Code from here.
Definition at line 44 of file DateTime.hpp.
auto volcart::memmap_supported | ( | ) | -> bool |
Whether memory mapping is available on this platform
auto volcart::MemmapFile | ( | const filesystem::path & | path | ) | -> mmap_info |
Memory map a file.
If successful, mmap_info
will contain the address and size required to unmap the file with UnmapFile. If memory mapping fails for any reason, mmap_info
will be empty. This can be checked with mmap_info::operator bool()
:
std::size_t volcart::MemorySizeStringParser | ( | const std::string & | s | ) |
Converts strings describing memory sizes to byte values.
Takes a string of the form [integer](K|M|G|T)B
and returns the number of bytes described by the string. Values without a character suffix are assumed to be bytes.
Examples: Input: "1", Output: 1 Input: "1KB", Output: 1024 Input: "1K", Output: 1024 Input: "1M", Output: 1048576
auto volcart::operator* | ( | const Transform3D::Pointer & | lhs, |
const Transform3D::Pointer & | rhs | ||
) | -> Transform3D::Pointer |
Compose transform convenience operator.
Same as Transform3D::Compose but only returns the composed transform. If composition fails for any reason, will throw an exception.
std::invalid_argument | if lhs or rhs are not composable |
std::runtime_error | if transform composition failed |
std::ostream & volcart::operator<< | ( | std::ostream & | os, |
const RangeIterable< T > & | it | ||
) |
Convenience method for printing RangeIterables
Definition at line 128 of file Iteration.hpp.
|
inlinestatic |
Partition a string by a separator substring.
Definition at line 223 of file String.hpp.
auto volcart::ReadImage | ( | const filesystem::path & | path | ) | -> cv::Mat |
Read an image from the specified path.
Currently just a wrapper around:
auto volcart::ReadMesh | ( | const filesystem::path & | path | ) | -> MeshReaderResult |
Read a mesh from a file.
Uses the file extension to determine which mesh reader is used (e.g. OBJReader, PLYReader, etc.).
path | Input file path |
|
inlinestatic |
Split a string by a delimiter.
Definition at line 179 of file String.hpp.
|
inlinestatic |
Convert a string to a bool.
Definition at line 60 of file String.hpp.
|
inlinestatic |
Convert string characters to lower case (r-value)
Definition at line 46 of file String.hpp.
|
inlinestatic |
Convert string characters to lower case (in place)
Definition at line 39 of file String.hpp.
|
inlinestatic |
Convert string characters to lower case (copy)
Definition at line 53 of file String.hpp.
auto volcart::to_padded_string | ( | Integer | val, |
const int | padding, | ||
const char | fill = '0' |
||
) | -> std::string |
Convert an Integer to a padded string.
Definition at line 247 of file String.hpp.
|
inlinestatic |
Convert string characters to upper case (r-value)
Definition at line 25 of file String.hpp.
|
inlinestatic |
Convert string characters to upper case (in place)
Definition at line 18 of file String.hpp.
|
inlinestatic |
Convert string characters to upper case (copy)
Definition at line 32 of file String.hpp.
|
inlinestatic |
Trim from both ends (r-value)
https://stackoverflow.com/a/217605
Definition at line 160 of file String.hpp.
|
inlinestatic |
Trim from both ends (in place)
https://stackoverflow.com/a/217605
Definition at line 149 of file String.hpp.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
auto volcart::UnmapFile | ( | mmap_info & | mmap_info | ) | -> int |
Unmap a memory mapped file.
On success, returns 0. If mmap_info.addr == nullptr
, mmap_info.size <= 0
, or memory mapping is unsupported by the platform, does nothing and returns -1. If unmapping fails, logs an error and returns a platform-specific error code:
void volcart::WriteImage | ( | const filesystem::path & | path, |
const cv::Mat & | img, | ||
WriteImageOpts | = {} |
||
) |
Write image to the specified path.
Uses volcart::WriteTIFF for all tiff images, which includes support for transparency and floating-point images. Otherwise, uses cv::imwrite.
volcart::IOException |
void volcart::WriteImageSequence | ( | const filesystem::path & | path, |
const Iterable & | iterable, | ||
const WriteImageOpts & | opts = {} |
||
) |
Definition at line 49 of file ImageIO.hpp.
void volcart::WriteMesh | ( | const filesystem::path & | path, |
const ITKMesh::Pointer & | mesh, | ||
const UVMap::Pointer & | uv = nullptr , |
||
const cv::Mat & | texture = cv::Mat() , |
||
const MeshWriterOpts & | opts = {} |
||
) |
Write a mesh to a file.
Uses the provided file extension to determine which mesh writer is used (e.g. OBJWriter, PLYWriter, etc.).
path | Output file path |
mesh | Mesh to write |
uv | UVMap for the provided mesh. Required to write a textured mesh. |
texture | Texture image mapped by the provided UV Map. Required to write a textured mesh. |
|
staticconstexpr |
Definition at line 17 of file Annotation.hpp.
|
staticconstexpr |
Definition at line 18 of file Annotation.hpp.
|
staticconstexpr |
Definition at line 16 of file Annotation.hpp.
|
staticconstexpr |
Definition at line 19 of file Annotation.hpp.
|
staticconstexpr |
Definition at line 27 of file FloatComparison.hpp.
|
constexpr |
Convenience alias for FileExtensionFilter
Definition at line 51 of file FileFilters.hpp.
|
constexpr |
Convenience alias for UnixHiddenFileFilter
Definition at line 54 of file FileFilters.hpp.
|
static |
const Dictionary volcart::V1 |
Metadata dictionary for VolumePkg v1.
Definition at line 105 of file VolumePkgVersion.hpp.
const Dictionary volcart::V2 |
Metadata dictionary for VolumePkg v2.
Definition at line 90 of file VolumePkgVersion.hpp.
const Dictionary volcart::V3 |
Metadata dictionary for VolumePkg v3.
Definition at line 75 of file VolumePkgVersion.hpp.
const Dictionary volcart::V4 = V5 |
Metadata dictionary for VolumePkg v4.
Definition at line 72 of file VolumePkgVersion.hpp.
const Dictionary volcart::V5 = V6 |
Metadata dictionary for VolumePkg v5
Definition at line 69 of file VolumePkgVersion.hpp.
const Dictionary volcart::V6 = V7 |
Metadata dictionary for VolumePkg v6.
Definition at line 66 of file VolumePkgVersion.hpp.
const Dictionary volcart::V7 |
Metadata dictionary for VolumePkg v7.
Definition at line 58 of file VolumePkgVersion.hpp.
const Library volcart::VERSION_LIBRARY |
Global Library used to store all template Dictionaries.
Definition at line 122 of file VolumePkgVersion.hpp.
|
staticconstexpr |
Volume Package version generated by this release
Definition at line 36 of file VolumePkgVersion.hpp.
|
static |
Zero-valued StructureTensor
Definition at line 31 of file StructureTensor.hpp.