Volume Cartographer 2.27.0
Namespaces | Macros | Typedefs | Functions
Common.hpp File Reference
#include <algorithm>
#include <tuple>
#include <vector>
#include <opencv2/core.hpp>
Include dependency graph for Common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  volcart
 Volume Cartographer library
 
namespace  volcart::segmentation
 Segmentation algorithms and utilities library
 

Macros

#define BGR_RED   cv::Scalar(0, 0, 0xFF)
 
#define BGR_GREEN   cv::Scalar(0, 0xFF, 0)
 
#define BGR_BLUE   cv::Scalar(0xFF, 0, 0)
 
#define BGR_YELLOW   cv::Scalar(0, 0xFF, 0xFF)
 
#define BGR_MAGENTA   cv::Scalar(0xFF, 0, 0xFF)
 
#define BGR_BLACK   cv::Scalar(0, 0, 0)
 

Typedefs

using IndexIntensityPair = std::pair< int, double >
 
using IndexIntensityPairVec = typename std::vector< IndexIntensityPair >
 
using Voxel = cv::Vec3d
 
using Pixel = cv::Vec2d
 

Functions

template<typename T1 , typename T2 >
std::ostream & operator<< (std::ostream &s, std::pair< T1, T2 > p)
 Write std::pair to std::ostream. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &s, std::vector< T > v)
 Write std::vector to std::ostream. More...
 
template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > volcart::segmentation::Zip (const std::vector< T1 > &v1, const std::vector< T2 > &v2)
 Combine two equal-sized vectors into a single vector of paired elements. More...
 
template<typename T , int Length>
std::pair< std::vector< T >, std::vector< T > > volcart::segmentation::Unzip (const std::vector< cv::Vec< T, Length > > &vs)
 Separate single vector of paired elements into two vectors of single elements. More...
 
template<typename T >
std::vector< double > volcart::segmentation::NormalizeVector (const std::vector< T > &v, double newMin=0, double newMax=1)
 Normalize vector elements to within the range [newMin, newMax]. More...
 
template<typename T , int Len>
std::vector< cv::Vec< double, Len > > volcart::segmentation::NormalizeVector (const std::vector< cv::Vec< T, Len > > vs)
 Normalize vector of cv::Vec using cv::norm. More...
 
VectorMath
std::vector< double > volcart::segmentation::SquareDiff (const std::vector< Voxel > &v1, const std::vector< Voxel > &v2)
 Computes the difference of Squares on two vectors. More...
 
double volcart::segmentation::SumSquareDiff (const std::vector< double > &v1, const std::vector< double > &v2)
 Sums the square differences between two vectors. More...
 

Macro Definition Documentation

◆ BGR_BLACK

#define BGR_BLACK   cv::Scalar(0, 0, 0)

Definition at line 15 of file Common.hpp.

◆ BGR_BLUE

#define BGR_BLUE   cv::Scalar(0xFF, 0, 0)

Definition at line 12 of file Common.hpp.

◆ BGR_GREEN

#define BGR_GREEN   cv::Scalar(0, 0xFF, 0)

Definition at line 11 of file Common.hpp.

◆ BGR_MAGENTA

#define BGR_MAGENTA   cv::Scalar(0xFF, 0, 0xFF)

Definition at line 14 of file Common.hpp.

◆ BGR_RED

#define BGR_RED   cv::Scalar(0, 0, 0xFF)

Definition at line 10 of file Common.hpp.

◆ BGR_YELLOW

#define BGR_YELLOW   cv::Scalar(0, 0xFF, 0xFF)

Definition at line 13 of file Common.hpp.

Typedef Documentation

◆ IndexIntensityPair

using IndexIntensityPair = std::pair<int, double>

Definition at line 17 of file Common.hpp.

◆ IndexIntensityPairVec

using IndexIntensityPairVec = typename std::vector<IndexIntensityPair>

Definition at line 18 of file Common.hpp.

◆ Pixel

using Pixel = cv::Vec2d

Definition at line 20 of file Common.hpp.

◆ Voxel

using Voxel = cv::Vec3d

Definition at line 19 of file Common.hpp.