ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::utility Namespace Reference

Namespaces

 detail_
 
 filesystem
 
 random
 

Classes

class  CPUInfo
 CPU information. More...
 
struct  hash_tuple
 
struct  hash_tuple< std::tuple< TT... > >
 
struct  hash_eigen
 
struct  hash_enum_class
 
class  UniformRandIntGenerator
 Draw pseudo-random integers bounded by min and max (inclusive) from a uniform distribution. More...
 
class  IJsonConvertible
 
class  IntersectionTest
 
class  Logger
 Logger class should be used as a global singleton object (GetInstance()). More...
 
class  VerbosityContextManager
 
class  ConsoleProgressBar
 
struct  in_place_t
 
struct  in_place_index_t
 
struct  in_place_type_t
 
class  optional
 
struct  trivial_init_t
 
struct  nullopt_t
 
class  bad_optional_access
 
union  storage_t
 
union  constexpr_storage_t
 
struct  optional_base
 
struct  constexpr_optional_base
 
class  optional< T & >
 
class  optional< T && >
 
class  CountingProgressReporter
 
struct  ConsoleProgressUpdater
 update_progress(double percent) functor for ConsoleProgressBar More...
 
class  Timer
 
class  ScopeTimer
 
class  FPSTimer
 
struct  MiniVecHash
 
struct  MiniVecEq
 
class  CompilerInfo
 Compiler information. More...
 
struct  MiniVec
 
struct  Overloaded
 
struct  Overloaded< T1, Ts... >
 
struct  Overloaded< T1 >
 
class  Feature
 Class to store featrues for registration. More...
 

Typedefs

using Matrix4d_allocator = Eigen::aligned_allocator< Eigen::Matrix4d >
 
using Matrix6d_allocator = Eigen::aligned_allocator< Eigen::Matrix6d >
 
using Vector2d_allocator = Eigen::aligned_allocator< Eigen::Vector2d >
 
using Vector3uint8_allocator = Eigen::aligned_allocator< Eigen::Vector3uint8 >
 
using Vector4i_allocator = Eigen::aligned_allocator< Eigen::Vector4i >
 
using Vector4d_allocator = Eigen::aligned_allocator< Eigen::Vector4d >
 
using Vector6d_allocator = Eigen::aligned_allocator< Eigen::Vector6d >
 
template<class T >
using OptionalBase = typename std::conditional< std::is_trivially_destructible< T >::value, constexpr_optional_base< typename std::remove_const< T >::type >, optional_base< typename std::remove_const< T >::type > >::type
 
typedef std::vector< Eigen::Vector2i > CorrespondenceSet
 

Enumerations

enum class  VerbosityLevel { Error = 0 , Warning = 1 , Info = 2 , Debug = 3 }
 
enum class  TextColor {
  Black = 0 , Red = 1 , Green = 2 , Yellow = 3 ,
  Blue = 4 , Magenta = 5 , Cyan = 6 , White = 7
}
 

Functions

std::string GetProgramOptionAsString (int argc, char **argv, const std::string &option, const std::string &default_value="")
 
int GetProgramOptionAsInt (int argc, char **argv, const std::string &option, const int default_value=0)
 
double GetProgramOptionAsDouble (int argc, char **argv, const std::string &option, const double default_value=0.0)
 
Eigen::VectorXd GetProgramOptionAsEigenVectorXd (int argc, char **argv, const std::string &option, const Eigen::VectorXd default_value=Eigen::VectorXd::Zero(0))
 
bool ProgramOptionExists (int argc, char **argv, const std::string &option)
 
bool ProgramOptionExistsAny (int argc, char **argv, const std::vector< std::string > &options)
 
Eigen::Matrix3d SkewMatrix (const Eigen::Vector3d &vec)
 Genretate a skew-symmetric matrix from a vector 3x1. More...
 
Eigen::Matrix4d TransformVector6dToMatrix4d (const Eigen::Vector6d &input)
 
Eigen::Vector6d TransformMatrix4dToVector6d (const Eigen::Matrix4d &input)
 
std::tuple< bool, Eigen::VectorXd > SolveLinearSystemPSD (const Eigen::MatrixXd &A, const Eigen::VectorXd &b, bool prefer_sparse=false, bool check_symmetric=false, bool check_det=false, bool check_psd=false)
 Function to solve Ax=b. More...
 
std::tuple< bool, Eigen::Matrix4d > SolveJacobianSystemAndObtainExtrinsicMatrix (const Eigen::Matrix6d &JTJ, const Eigen::Vector6d &JTr)
 
std::tuple< bool, std::vector< Eigen::Matrix4d, Matrix4d_allocator > > SolveJacobianSystemAndObtainExtrinsicMatrixArray (const Eigen::MatrixXd &JTJ, const Eigen::VectorXd &JTr)
 
template<typename MatType , typename VecType >
std::tuple< MatType, VecType, double > ComputeJTJandJTr (std::function< void(int, VecType &, double &, double &)> f, int iteration_num, bool verbose=true)
 
template<typename MatType , typename VecType >
std::tuple< MatType, VecType, double > ComputeJTJandJTr (std::function< void(int, std::vector< VecType, Eigen::aligned_allocator< VecType >> &, std::vector< double > &, std::vector< double > &)> f, int iteration_num, bool verbose=true)
 
Eigen::Matrix3d RotationMatrixX (double radians)
 
Eigen::Matrix3d RotationMatrixY (double radians)
 
Eigen::Matrix3d RotationMatrixZ (double radians)
 
Eigen::Vector3uint8 ColorToUint8 (const Eigen::Vector3d &color)
 
Eigen::Vector3d ColorToDouble (uint8_t r, uint8_t g, uint8_t b)
 Color conversion from uint8_t 0-255 to double [0,1]. More...
 
Eigen::Vector3d ColorToDouble (const Eigen::Vector3uint8 &rgb)
 
template<typename IdxType >
Eigen::Matrix3d ComputeCovariance (const std::vector< Eigen::Vector3d > &points, const std::vector< IdxType > &indices)
 Function to compute the covariance matrix of a set of points. More...
 
template<typename IdxType >
std::tuple< Eigen::Vector3d, Eigen::Matrix3d > ComputeMeanAndCovariance (const std::vector< Eigen::Vector3d > &points, const std::vector< IdxType > &indices)
 Function to compute the mean and covariance matrix of a set of points. More...
 
template<typename RealType , typename IdxType >
std::tuple< Eigen::Vector3d, Eigen::Matrix3d > ComputeMeanAndCovariance (const RealType *const points, const std::vector< IdxType > &indices)
 
std::string StringPrintf (const char *format,...)
 
std::string StringReplace (const std::string &str, const std::string &old_str, const std::string &new_str)
 
bool StringContains (const std::string &src, const std::string &dst)
 
std::string StringReplaceFirst (const std::string &str, const std::string &old_str, const std::string &new_str)
 
std::string StringReplaceLast (const std::string &str, const std::string &old_str, const std::string &new_str)
 
bool StringStartsWith (const std::string &str, const std::string &prefix)
 
bool StringEndsWith (const std::string &str, const std::string &postfix)
 
std::string JoinStrings (const std::vector< std::string > &strs, const std::string &delimiter=", ")
 
std::vector< std::string > StringSplit (const std::string &str, const std::string &delimiters=" ", bool trim_empty_str=true)
 
void SplitString (std::vector< std::string > &tokens, const std::string &str, const std::string &delimiters=" ", bool trim_empty_str=true)
 
std::vector< std::string > SplitString (const std::string &str, const std::string &delimiters=" ", bool trim_empty_str=true)
 
size_t WordLength (const std::string &doc, size_t start_pos, const std::string &valid_chars="_")
 
std::string & LeftStripString (std::string &str, const std::string &chars="\t\n\v\f\r ")
 
std::string & RightStripString (std::string &str, const std::string &chars="\t\n\v\f\r ")
 
std::string & StripString (std::string &str, const std::string &chars="\t\n\v\f\r ")
 
std::string ToLower (const std::string &s)
 Convert string to the lower case. More...
 
std::string ToUpper (const std::string &s)
 Convert string to the upper case. More...
 
template<typename... Args>
std::string FormatString (const std::string &format, Args... args)
 Format string. More...
 
template<typename... Args>
std::string FastFormatString (const std::string &format, Args... args)
 Format string fast (Unix / BSD Only) More...
 
void Sleep (int milliseconds)
 
int DivUp (int x, int y)
 Computes the quotient of x/y with rounding up. More...
 
std::string GetCurrentTimeStamp ()
 Returns current time stamp. More...
 
Json::Value StringToJson (const std::string &json_str)
 Parse string and conver to Json::value. Throws exception if the conversion is invalid. More...
 
std::string JsonToString (const Json::Value &json)
 Serialize a Json::Value to a string. More...
 
void SetVerbosityLevel (VerbosityLevel level)
 
VerbosityLevel GetVerbosityLevel ()
 Get global verbosity level of CloudViewer. More...
 
template<class T >
constexpr T && constexpr_forward (typename std::remove_reference< T >::type &t) noexcept
 
template<class T >
constexpr T && constexpr_forward (typename std::remove_reference< T >::type &&t) noexcept
 
template<class T >
constexpr std::remove_reference< T >::type && constexpr_move (T &&t) noexcept
 
template<class T >
constexpr bool operator== (const optional< T > &x, const optional< T > &y)
 
template<class T >
constexpr bool operator!= (const optional< T > &x, const optional< T > &y)
 
template<class T >
constexpr bool operator< (const optional< T > &x, const optional< T > &y)
 
template<class T >
constexpr bool operator> (const optional< T > &x, const optional< T > &y)
 
template<class T >
constexpr bool operator<= (const optional< T > &x, const optional< T > &y)
 
template<class T >
constexpr bool operator>= (const optional< T > &x, const optional< T > &y)
 
template<class T >
constexpr bool operator== (const optional< T > &x, nullopt_t) noexcept
 
template<class T >
constexpr bool operator== (nullopt_t, const optional< T > &x) noexcept
 
template<class T >
constexpr bool operator!= (const optional< T > &x, nullopt_t) noexcept
 
template<class T >
constexpr bool operator!= (nullopt_t, const optional< T > &x) noexcept
 
template<class T >
constexpr bool operator< (const optional< T > &, nullopt_t) noexcept
 
template<class T >
constexpr bool operator< (nullopt_t, const optional< T > &x) noexcept
 
template<class T >
constexpr bool operator<= (const optional< T > &x, nullopt_t) noexcept
 
template<class T >
constexpr bool operator<= (nullopt_t, const optional< T > &) noexcept
 
template<class T >
constexpr bool operator> (const optional< T > &x, nullopt_t) noexcept
 
template<class T >
constexpr bool operator> (nullopt_t, const optional< T > &) noexcept
 
template<class T >
constexpr bool operator>= (const optional< T > &, nullopt_t) noexcept
 
template<class T >
constexpr bool operator>= (nullopt_t, const optional< T > &x) noexcept
 
template<class T >
constexpr bool operator== (const optional< T > &x, const T &v)
 
template<class T >
constexpr bool operator== (const T &v, const optional< T > &x)
 
template<class T >
constexpr bool operator!= (const optional< T > &x, const T &v)
 
template<class T >
constexpr bool operator!= (const T &v, const optional< T > &x)
 
template<class T >
constexpr bool operator< (const optional< T > &x, const T &v)
 
template<class T >
constexpr bool operator> (const T &v, const optional< T > &x)
 
template<class T >
constexpr bool operator> (const optional< T > &x, const T &v)
 
template<class T >
constexpr bool operator< (const T &v, const optional< T > &x)
 
template<class T >
constexpr bool operator>= (const optional< T > &x, const T &v)
 
template<class T >
constexpr bool operator<= (const T &v, const optional< T > &x)
 
template<class T >
constexpr bool operator<= (const optional< T > &x, const T &v)
 
template<class T >
constexpr bool operator>= (const T &v, const optional< T > &x)
 
template<class T >
constexpr bool operator== (const optional< T & > &x, const T &v)
 
template<class T >
constexpr bool operator== (const T &v, const optional< T & > &x)
 
template<class T >
constexpr bool operator!= (const optional< T & > &x, const T &v)
 
template<class T >
constexpr bool operator!= (const T &v, const optional< T & > &x)
 
template<class T >
constexpr bool operator< (const optional< T & > &x, const T &v)
 
template<class T >
constexpr bool operator> (const T &v, const optional< T & > &x)
 
template<class T >
constexpr bool operator> (const optional< T & > &x, const T &v)
 
template<class T >
constexpr bool operator< (const T &v, const optional< T & > &x)
 
template<class T >
constexpr bool operator>= (const optional< T & > &x, const T &v)
 
template<class T >
constexpr bool operator<= (const T &v, const optional< T & > &x)
 
template<class T >
constexpr bool operator<= (const optional< T & > &x, const T &v)
 
template<class T >
constexpr bool operator>= (const T &v, const optional< T & > &x)
 
template<class T >
constexpr bool operator== (const optional< const T & > &x, const T &v)
 
template<class T >
constexpr bool operator== (const T &v, const optional< const T & > &x)
 
template<class T >
constexpr bool operator!= (const optional< const T & > &x, const T &v)
 
template<class T >
constexpr bool operator!= (const T &v, const optional< const T & > &x)
 
template<class T >
constexpr bool operator< (const optional< const T & > &x, const T &v)
 
template<class T >
constexpr bool operator> (const T &v, const optional< const T & > &x)
 
template<class T >
constexpr bool operator> (const optional< const T & > &x, const T &v)
 
template<class T >
constexpr bool operator< (const T &v, const optional< const T & > &x)
 
template<class T >
constexpr bool operator>= (const optional< const T & > &x, const T &v)
 
template<class T >
constexpr bool operator<= (const T &v, const optional< const T & > &x)
 
template<class T >
constexpr bool operator<= (const optional< const T & > &x, const T &v)
 
template<class T >
constexpr bool operator>= (const T &v, const optional< const T & > &x)
 
template<class T >
void swap (optional< T > &x, optional< T > &y) noexcept(noexcept(x.swap(y)))
 
template<class T >
constexpr optional< typename std::decay< T >::typemake_optional (T &&v)
 
template<class X >
constexpr optional< X & > make_optional (std::reference_wrapper< X > v)
 
int EstimateMaxThreads ()
 Estimate the maximum number of threads to be used in a parallel region. More...
 
bool InParallel ()
 Returns true if in an parallel section. More...
 
static int PhysicalConcurrency ()
 Returns the number of physical CPU cores. More...
 
static std::string GetCPUModelName ()
 Returns the CPU model name/brand string. More...
 
template std::tuple< Eigen::Matrix6d, Eigen::Vector6d, double > ComputeJTJandJTr (std::function< void(int, Eigen::Vector6d &, double &, double &)> f, int iteration_num, bool verbose)
 
template std::tuple< Eigen::Matrix6d, Eigen::Vector6d, double > ComputeJTJandJTr (std::function< void(int, std::vector< Eigen::Vector6d, Vector6d_allocator > &, std::vector< double > &, std::vector< double > &)> f, int iteration_num, bool verbose)
 
template Eigen::Matrix3d ComputeCovariance (const std::vector< Eigen::Vector3d > &points, const std::vector< size_t > &indices)
 
template std::tuple< Eigen::Vector3d, Eigen::Matrix3d > ComputeMeanAndCovariance (const std::vector< Eigen::Vector3d > &points, const std::vector< size_t > &indices)
 
template Eigen::Matrix3d ComputeCovariance (const std::vector< Eigen::Vector3d > &points, const std::vector< int > &indices)
 
template std::tuple< Eigen::Vector3d, Eigen::Matrix3d > ComputeMeanAndCovariance (const std::vector< Eigen::Vector3d > &points, const std::vector< int > &indices)
 
template std::tuple< Eigen::Vector3d, Eigen::Matrix3d > ComputeMeanAndCovariance (const float *const points, const std::vector< size_t > &indices)
 
template std::tuple< Eigen::Vector3d, Eigen::Matrix3d > ComputeMeanAndCovariance (const double *const points, const std::vector< size_t > &indices)
 
template std::tuple< Eigen::Vector3d, Eigen::Matrix3d > ComputeMeanAndCovariance (const float *const points, const std::vector< int > &indices)
 
template std::tuple< Eigen::Vector3d, Eigen::Matrix3d > ComputeMeanAndCovariance (const double *const points, const std::vector< int > &indices)
 
static std::string GetEnvVar (const std::string &name)
 
std::string GetMD5 (const std::string &file_path)
 Computes MD5 Hash for the given file. More...
 
static size_t WriteDataCb (void *ptr, size_t size, size_t nmemb, FILE *stream)
 
std::string DownloadFromURL (const std::string &url, const std::string &md5, const std::string &download_dir)
 Download a file from URL. If a file already exists and the MD5 hash matches, the download will be skipped. More...
 
std::string DownloadFromMirrors (const std::vector< std::string > &mirrors, const std::string &md5, const std::string &download_dir)
 Download a file from list of mirror URLs. If a file already exists and the MD5 hash matches, the download will be skipped. All file names must be the same in mirrors. More...
 
bool IsSupportedCompressedFilePath (const std::string &file_path)
 Returns true if the file is a supported compressed file path. It does not check if the file exists. It only checks the file extension. More...
 
void Extract (const std::string &file_path, const std::string &extract_dir)
 Function to extract compressed files. More...
 
static int ExtractCurrentFile (unzFile uf, const std::string &extract_dir, const std::string &password)
 
void ExtractFromZIP (const std::string &file_path, const std::string &extract_dir)
 Function to extract files compressed in .zip format. More...
 
template<int N>
MiniVec< float, N > floor (const MiniVec< float, N > &a)
 
template<int N>
MiniVec< double, N > floor (const MiniVec< double, N > &a)
 
template<int N>
MiniVec< float, N > ceil (const MiniVec< float, N > &a)
 
template<int N>
MiniVec< double, N > ceil (const MiniVec< double, N > &a)
 
template<class T , int N>
MiniVec< T, N > operator- (const MiniVec< T, N > &a)
 
template<class T , int N>
MiniVec< T, N > operator! (const MiniVec< T, N > &a)
 
template<class T , int N>
MiniVec< T, N > operator+ (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
void operator+= (MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< T, N > operator+ (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator+ (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
void operator+= (MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator- (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
void operator-= (MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< T, N > operator- (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator- (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
void operator-= (MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator* (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
void operator*= (MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< T, N > operator* (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator* (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
void operator*= (MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator/ (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
void operator/= (MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< T, N > operator/ (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator/ (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
void operator/= (MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< bool, N > operator< (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator< (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator< (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator<= (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator<= (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator<= (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator> (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator> (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator> (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator>= (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator>= (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator>= (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator== (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator== (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator== (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator!= (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator!= (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator!= (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator&& (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator&& (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator&& (T a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator|| (const MiniVec< T, N > &a, const MiniVec< T, N > &b)
 
template<class T , int N>
MiniVec< bool, N > operator|| (const MiniVec< T, N > &a, T b)
 
template<class T , int N>
MiniVec< T, N > operator|| (T a, const MiniVec< T, N > &b)
 
template<typename... Ts>
Overloaded< Ts... > Overload (Ts... ts)
 
template<class Tin , class Tout >
void InclusivePrefixSum (const Tin *first, const Tin *last, Tout *out)
 
std::shared_ptr< FeatureComputeFPFHFeature (const ccPointCloud &input, const geometry::KDTreeSearchParam &search_param=geometry::KDTreeSearchParamKNN(), const utility::optional< std::vector< size_t >> &indices=utility::nullopt)
 
CorrespondenceSet CorrespondencesFromFeatures (const Feature &source_features, const Feature &target_features, bool mutual_filter=false, float mutual_consistency_ratio=0.1)
 Function to find correspondences via 1-nearest neighbor feature matching. Target is used to construct a nearest neighbor search object, in order to query source. More...
 
void pybind_eigen (py::module &m)
 
void pybind_logging (py::module &m)
 
void pybind_matrix (py::module &m)
 
void pybind_scalarfield (py::module &m)
 
void pybind_utility (py::module &m)
 

Variables

constexpr in_place_t in_place {}
 
constexpr struct cloudViewer::utility::trivial_init_t trivial_init
 
constexpr nullopt_t nullopt {nullopt_t::init()}
 
static const std::unordered_map< std::string, std::function< void(const std::string &, const std::string &)> > file_extension_to_extract_function
 

Typedef Documentation

◆ CorrespondenceSet

typedef std::vector<Eigen::Vector2i> cloudViewer::utility::CorrespondenceSet

Definition at line 24 of file ecvFeature.h.

◆ Matrix4d_allocator

using cloudViewer::utility::Matrix4d_allocator = typedef Eigen::aligned_allocator<Eigen::Matrix4d>

Definition at line 125 of file Eigen.h.

◆ Matrix6d_allocator

using cloudViewer::utility::Matrix6d_allocator = typedef Eigen::aligned_allocator<Eigen::Matrix6d>

Definition at line 126 of file Eigen.h.

◆ OptionalBase

template<class T >
using cloudViewer::utility::OptionalBase = typedef typename std::conditional< std::is_trivially_destructible<T>::value, constexpr_optional_base<typename std::remove_const< T>::type>, optional_base<typename std::remove_const<T>::type> >::type

Definition at line 237 of file Optional.h.

◆ Vector2d_allocator

using cloudViewer::utility::Vector2d_allocator = typedef Eigen::aligned_allocator<Eigen::Vector2d>

Definition at line 127 of file Eigen.h.

◆ Vector3uint8_allocator

using cloudViewer::utility::Vector3uint8_allocator = typedef Eigen::aligned_allocator<Eigen::Vector3uint8>

Definition at line 128 of file Eigen.h.

◆ Vector4d_allocator

using cloudViewer::utility::Vector4d_allocator = typedef Eigen::aligned_allocator<Eigen::Vector4d>

Definition at line 130 of file Eigen.h.

◆ Vector4i_allocator

using cloudViewer::utility::Vector4i_allocator = typedef Eigen::aligned_allocator<Eigen::Vector4i>

Definition at line 129 of file Eigen.h.

◆ Vector6d_allocator

using cloudViewer::utility::Vector6d_allocator = typedef Eigen::aligned_allocator<Eigen::Vector6d>

Definition at line 131 of file Eigen.h.

Enumeration Type Documentation

◆ TextColor

Enumerator
Black 
Red 
Green 
Yellow 
Blue 
Magenta 
Cyan 
White 

Definition at line 117 of file Logging.h.

◆ VerbosityLevel

Enumerator
Error 

LogError throws now a runtime_error with the given error message. This should be used if there is no point in continuing the given algorithm at some point and the error is not returned in another way (e.g., via a bool/int as return value).

Warning 

LogWarning is used if an error occurs, but the error is also signaled via a return value (i.e., there is no need to throw an exception). This warning should further be used, if the algorithms encounters a state that does not break its continuation, but the output is likely not to be what the user expected.

Info 

LogInfo is used to inform the user with expected output, e.g, pressed a key in the visualizer prints helping information.

Debug 

LogDebug is used to print debug/additional information on the state of the algorithm.

Definition at line 97 of file Logging.h.

Function Documentation

◆ ceil() [1/2]

template<int N>
MiniVec<double, N> cloudViewer::utility::ceil ( const MiniVec< double, N > &  a)
inline

Definition at line 96 of file MiniVec.h.

◆ ceil() [2/2]

template<int N>
MiniVec<float, N> cloudViewer::utility::ceil ( const MiniVec< float, N > &  a)
inline

Definition at line 89 of file MiniVec.h.

Referenced by cloudViewer::core::kernel::Arange(), FacetsClassifier::ByOrientation(), cloudViewer::visualization::gui::MenuImgui::CalcHeight(), cloudViewer::visualization::gui::Button::CalcPreferredSize(), cloudViewer::visualization::gui::Checkbox::CalcPreferredSize(), cloudViewer::visualization::gui::ColorEdit::CalcPreferredSize(), cloudViewer::visualization::gui::Combobox::CalcPreferredSize(), cloudViewer::visualization::gui::Label::CalcPreferredSize(), cloudViewer::visualization::gui::CollapsableVert::CalcPreferredSize(), cloudViewer::visualization::gui::ListView::CalcPreferredSize(), cloudViewer::visualization::gui::NumberEdit::CalcPreferredSize(), cloudViewer::visualization::gui::ProgressBar::CalcPreferredSize(), cloudViewer::visualization::gui::RadioButton::CalcPreferredSize(), cloudViewer::visualization::gui::TextEdit::CalcPreferredSize(), cloudViewer::visualization::gui::ToggleSwitch::CalcPreferredSize(), cloudViewer::visualization::gui::VectorEdit::CalcPreferredSize(), cloudViewer::visualization::gui::Slider::CalcPreferredSize(), cloudViewer::StatisticalTestingTools::computeAdaptativeChi2Dist(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneRobustMax(), AnglesCustomPlot::computeHistogram(), ComputeKmeansClustering(), ComputeMaxNeighborhoodLength(), ccEntityAction::computeStatParams(), ccVolumeCalcTool::ComputeVolume(), cloudViewer::visualization::rendering::TGaussianSplatBuffersBuilder::ConstructBuffers(), cloudViewer::core::kernel::CPUCeilElementKernel(), DistanceMapGenerationTool::CreateMap(), ccComparisonDlg::determineBestOctreeLevel(), cloudViewer::visualization::gui::ImageWidget::Draw(), cloudViewer::visualization::gui::MenuImgui::Draw(), QCPHiddenArea::draw(), cloudViewer::visualization::gui::FileDialog::FileDialog(), FilterGLSL::FilterGLSL(), cloudViewer::DgmOctree::findNearestNeighborsStartingFromCell(), cloudViewer::DgmOctree::findNeighborsInASphereStartingFromCell(), cloudViewer::DgmOctree::findTheNearestNeighborStartingFromCell(), PyramidGL::GenerateFeatureDisplayVBO(), PyramidGL::GetAlignedStorageSize(), PyramidGL::GetFeatureDescriptors(), getMortarMaps(), cloudViewer::DgmOctree::getPointsInNeighbourCellsAround(), PyramidGL::GetTextureStorageSize(), qM3C2Tools::GuessBestParams(), cloudViewer::visualization::GuiSettingsView::GuiSettingsView(), StereogramWidget::init(), cloudViewer::pipelines::color_map::ImageWarpingField::InitializeWarpingFields(), cloudViewer::DistanceComputationTools::intersectMeshWithOctree(), cloudViewer::Grid3D< Type >::intersectWith(), cloudViewer::visualization::gui::CollapsableVert::Layout(), cloudViewer::visualization::gui::VGrid::Layout(), cloudViewer::visualization::gui::LUTTreeCell::Layout(), flann::lsh::LshTable< ElementType >::LshTable(), StereogramWidget::paintEvent(), cloudViewer::visualization::VisualizerWithVertexSelection::PickPoints(), CommandCrossSection::process(), CommandVolume25D::process(), G3Point::quant(), cloudViewer::pipelines::registration::RegistrationRANSACBasedOnCorrespondence(), cloudViewer::core::TBBHashBackend< Key, Hash, Eq >::Reserve(), PyramidGL::ResizeFeatureStorage(), ri_inc(), ri_ini(), cloudViewer::MeshSamplingTools::samplePointsOnMesh(), SampleSphere(), LASFWFFilter::saveToFile(), LasIOFilter::saveToFile(), LASFilter::saveToFile(), cloudViewer::NormalizedProgress::scale(), cloudViewer::SaitoSquaredDistanceTransform::SDT_3D(), PyramidGL::SetLevelFeatureNum(), cloudViewer::StatisticalTestingTools::testCloudWithStatisticalModel(), DistanceMapGenerationDlg::toggleOverlayGrid(), cc2Point5DimEditor::update2DDisplayZoom(), DistanceMapGenerationDlg::updateGridSteps(), and cloudViewer::ml::impl::VoxelizeCPU().

◆ ColorToDouble() [1/2]

Eigen::Vector3d cloudViewer::utility::ColorToDouble ( const Eigen::Vector3uint8 rgb)

Definition at line 282 of file Eigen.cpp.

References ColorToDouble().

◆ ColorToDouble() [2/2]

Eigen::Vector3d cloudViewer::utility::ColorToDouble ( uint8_t  r,
uint8_t  g,
uint8_t  b 
)

Color conversion from uint8_t 0-255 to double [0,1].

Definition at line 278 of file Eigen.cpp.

Referenced by ColorToDouble().

◆ ColorToUint8()

Eigen::Vector3uint8 cloudViewer::utility::ColorToUint8 ( const Eigen::Vector3d &  color)

Color conversion from double [0,1] to uint8_t 0-255; this does proper clipping and rounding

Definition at line 269 of file Eigen.cpp.

References color, max(), and min().

Referenced by cloudViewer::io::WritePointCloudToPLY(), and cloudViewer::io::WritePointCloudToPTS().

◆ ComputeCovariance() [1/3]

template<typename IdxType >
Eigen::Matrix3d cloudViewer::utility::ComputeCovariance ( const std::vector< Eigen::Vector3d > &  points,
const std::vector< IdxType > &  indices 
)

Function to compute the covariance matrix of a set of points.

Definition at line 287 of file Eigen.cpp.

References points.

◆ ComputeCovariance() [2/3]

template Eigen::Matrix3d cloudViewer::utility::ComputeCovariance ( const std::vector< Eigen::Vector3d > &  points,
const std::vector< int > &  indices 
)

◆ ComputeCovariance() [3/3]

template Eigen::Matrix3d cloudViewer::utility::ComputeCovariance ( const std::vector< Eigen::Vector3d > &  points,
const std::vector< size_t > &  indices 
)

◆ ComputeFPFHFeature()

std::shared_ptr<Feature> cloudViewer::utility::ComputeFPFHFeature ( const ccPointCloud input,
const geometry::KDTreeSearchParam search_param = geometry::KDTreeSearchParamKNN(),
const utility::optional< std::vector< size_t >> &  indices = utility::nullopt 
)

Function to compute FPFH feature for a point cloud.

Parameters
inputThe Input point cloud.
search_paramKDTree KNN search parameter.
indicesIndices of the points to compute FPFH features on. If not set, compute features for the whole point cloud.

Referenced by cloudViewer::t::pipelines::registration::LegacyComputeFPFHFeature(), and cloudViewer::pipelines::registration::pybind_feature_methods().

◆ ComputeJTJandJTr() [1/4]

template std::tuple<Eigen::Matrix6d, Eigen::Vector6d, double> cloudViewer::utility::ComputeJTJandJTr ( std::function< void(int, Eigen::Vector6d &, double &, double &)>  f,
int  iteration_num,
bool  verbose 
)

◆ ComputeJTJandJTr() [2/4]

template std::tuple<Eigen::Matrix6d, Eigen::Vector6d, double> cloudViewer::utility::ComputeJTJandJTr ( std::function< void(int, std::vector< Eigen::Vector6d, Vector6d_allocator > &, std::vector< double > &, std::vector< double > &)>  f,
int  iteration_num,
bool  verbose 
)

◆ ComputeJTJandJTr() [3/4]

template<typename MatType , typename VecType >
std::tuple< MatType, VecType, double > cloudViewer::utility::ComputeJTJandJTr ( std::function< void(int, std::vector< VecType, Eigen::aligned_allocator< VecType >> &, std::vector< double > &, std::vector< double > &)>  f,
int  iteration_num,
bool  verbose = true 
)

Function to compute JTJ and Jtr Input: function pointer f and total number of rows of Jacobian matrix Output: JTJ, JTr, sum of r^2 Note: f takes index of row, and outputs corresponding residual and row vector.

Definition at line 189 of file Eigen.cpp.

References LogDebug.

◆ ComputeJTJandJTr() [4/4]

template<typename MatType , typename VecType >
std::tuple< MatType, VecType, double > cloudViewer::utility::ComputeJTJandJTr ( std::function< void(int, VecType &, double &, double &)>  f,
int  iteration_num,
bool  verbose = true 
)

Function to compute JTJ and Jtr Input: function pointer f and total number of rows of Jacobian matrix Output: JTJ, JTr, sum of r^2 Note: f takes index of row, and outputs corresponding residual and row vector.

Definition at line 148 of file Eigen.cpp.

References LogDebug.

Referenced by cloudViewer::pipelines::registration::TransformationEstimationPointToPlane::ComputeTransformation(), and cloudViewer::pipelines::color_map::RunRigidOptimizer().

◆ ComputeMeanAndCovariance() [1/8]

template std::tuple<Eigen::Vector3d, Eigen::Matrix3d> cloudViewer::utility::ComputeMeanAndCovariance ( const double *const  points,
const std::vector< int > &  indices 
)

◆ ComputeMeanAndCovariance() [2/8]

template std::tuple<Eigen::Vector3d, Eigen::Matrix3d> cloudViewer::utility::ComputeMeanAndCovariance ( const double *const  points,
const std::vector< size_t > &  indices 
)

◆ ComputeMeanAndCovariance() [3/8]

template std::tuple<Eigen::Vector3d, Eigen::Matrix3d> cloudViewer::utility::ComputeMeanAndCovariance ( const float *const  points,
const std::vector< int > &  indices 
)

◆ ComputeMeanAndCovariance() [4/8]

template std::tuple<Eigen::Vector3d, Eigen::Matrix3d> cloudViewer::utility::ComputeMeanAndCovariance ( const float *const  points,
const std::vector< size_t > &  indices 
)

◆ ComputeMeanAndCovariance() [5/8]

template<typename RealType , typename IdxType >
std::tuple< Eigen::Vector3d, Eigen::Matrix3d > cloudViewer::utility::ComputeMeanAndCovariance ( const RealType *const  points,
const std::vector< IdxType > &  indices 
)

Function to compute the mean and covariance matrix of a set of points.

Template Parameters
RealTypeEither float or double.
IdxTypeEither size_t or int.
Parameters
pointsContiguous memory with the 3D points.
indicesThe indices for which the mean and covariance will be computed.
Returns
The mean and covariance matrix.

Definition at line 370 of file Eigen.cpp.

References points.

◆ ComputeMeanAndCovariance() [6/8]

template<typename IdxType >
std::tuple< Eigen::Vector3d, Eigen::Matrix3d > cloudViewer::utility::ComputeMeanAndCovariance ( const std::vector< Eigen::Vector3d > &  points,
const std::vector< IdxType > &  indices 
)

Function to compute the mean and covariance matrix of a set of points.

Definition at line 321 of file Eigen.cpp.

References points.

◆ ComputeMeanAndCovariance() [7/8]

template std::tuple<Eigen::Vector3d, Eigen::Matrix3d> cloudViewer::utility::ComputeMeanAndCovariance ( const std::vector< Eigen::Vector3d > &  points,
const std::vector< int > &  indices 
)

◆ ComputeMeanAndCovariance() [8/8]

template std::tuple<Eigen::Vector3d, Eigen::Matrix3d> cloudViewer::utility::ComputeMeanAndCovariance ( const std::vector< Eigen::Vector3d > &  points,
const std::vector< size_t > &  indices 
)

◆ constexpr_forward() [1/2]

template<class T >
constexpr T&& cloudViewer::utility::constexpr_forward ( typename std::remove_reference< T >::type &&  t)
inlineconstexprnoexcept

Definition at line 58 of file Optional.h.

◆ constexpr_forward() [2/2]

template<class T >
constexpr T&& cloudViewer::utility::constexpr_forward ( typename std::remove_reference< T >::type t)
inlineconstexprnoexcept

Definition at line 52 of file Optional.h.

◆ constexpr_move()

template<class T >
constexpr std::remove_reference<T>::type&& cloudViewer::utility::constexpr_move ( T &&  t)
inlineconstexprnoexcept

◆ CorrespondencesFromFeatures()

CorrespondenceSet cloudViewer::utility::CorrespondencesFromFeatures ( const Feature source_features,
const Feature target_features,
bool  mutual_filter = false,
float  mutual_consistency_ratio = 0.1 
)

Function to find correspondences via 1-nearest neighbor feature matching. Target is used to construct a nearest neighbor search object, in order to query source.

Parameters
source_features(D, N) feature
target_features(D, M) feature
mutual_filterBoolean flag, only return correspondences (i, j) s.t. source_features[i] and target_features[j] are mutually the nearest neighbor.
mutual_consistency_ratioFloat threshold to decide whether the number of correspondences is sufficient. Only used when mutual_filter is set to True.
Returns
A CorrespondenceSet. When mutual_filter is disabled: the first column is arange(0, N) of source, and the second column is the corresponding index of target. When mutual_filter is enabled, return the filtering subset of the aforementioned correspondence set where source[i] and target[j] are mutually the nearest neighbor. If the subset size is smaller than mutual_consistency_ratio * N, return the unfiltered set.

Referenced by cloudViewer::pipelines::registration::pybind_feature_methods().

◆ DivUp()

int cloudViewer::utility::DivUp ( int  x,
int  y 
)
inline

Computes the quotient of x/y with rounding up.

Definition at line 210 of file Helper.h.

Referenced by cloudViewer::ml::contrib::AllPairsSortedIoU(), and cloudViewer::ml::contrib::NmsCPUKernel().

◆ DownloadFromMirrors()

std::string cloudViewer::utility::DownloadFromMirrors ( const std::vector< std::string > &  mirrors,
const std::string &  md5,
const std::string &  download_dir 
)

Download a file from list of mirror URLs. If a file already exists and the MD5 hash matches, the download will be skipped. All file names must be the same in mirrors.

Parameters
mirrorsList of file mirror URLs for the same file. The saved file name will be the last part of the URL.
md5MD5 checksum of the file. This is required as the same URL may point to different files over time.
download_dirThe file will be downloaded to download_dir.
Returns
Path to downloaded file.
Exceptions
std::runtime_errorIf the download fails.

Definition at line 160 of file Download.cpp.

References DownloadFromURL(), cloudViewer::utility::filesystem::GetFileNameWithoutDirectory(), LogError, and LogWarning.

Referenced by cloudViewer::data::DownloadDataset::DownloadDataset().

◆ DownloadFromURL()

std::string cloudViewer::utility::DownloadFromURL ( const std::string &  url,
const std::string &  md5,
const std::string &  download_dir 
)

Download a file from URL. If a file already exists and the MD5 hash matches, the download will be skipped.

Parameters
urlFile URL. The saved file name will be the last part of the URL.
md5MD5 checksum of the file. This is required as the same URL may point to different files over time.
download_dirThe file will be downloaded to download_dir.
Returns
Path to downloaded file.
Exceptions
std::runtime_errorIf the download fails.

Definition at line 89 of file Download.cpp.

References cloudViewer::utility::filesystem::DirectoryExists(), cloudViewer::utility::filesystem::FileExists(), cloudViewer::utility::filesystem::GetFileNameWithoutDirectory(), GetMD5(), LogError, LogInfo, cloudViewer::utility::filesystem::MakeDirectoryHierarchy(), and WriteDataCb().

Referenced by DownloadFromMirrors().

◆ EstimateMaxThreads()

◆ Extract()

void cloudViewer::utility::Extract ( const std::string &  file_path,
const std::string &  extract_dir 
)

Function to extract compressed files.

Parameters
file_pathPath to file. Example: "/path/to/file/file.zip"
extract_dirDirectory path where the file will be extracted to. If the directory does not exist, it will be created.

Definition at line 33 of file Extract.cpp.

References cloudViewer::utility::filesystem::DirectoryExists(), file_extension_to_extract_function, cloudViewer::utility::filesystem::FileExists(), format, cloudViewer::utility::filesystem::GetFileExtensionInLowerCase(), IsSupportedCompressedFilePath(), LogError, LogInfo, and cloudViewer::utility::filesystem::MakeDirectoryHierarchy().

Referenced by cloudViewer::data::DownloadDataset::DownloadDataset(), and ExtractMesh().

◆ ExtractCurrentFile()

static int cloudViewer::utility::ExtractCurrentFile ( unzFile  uf,
const std::string &  extract_dir,
const std::string &  password 
)
static

◆ ExtractFromZIP()

void cloudViewer::utility::ExtractFromZIP ( const std::string &  file_path,
const std::string &  extract_dir 
)

Function to extract files compressed in .zip format.

Parameters
file_pathPath to file. Example: "/path/to/file/file.zip"
extract_dirDirectory path where the file will be extracted to.

Definition at line 158 of file ExtractZIP.cpp.

References ExtractCurrentFile(), LogError, unz_global_info64_s::number_entry, UNZ_OK, unzClose(), unzGetGlobalInfo64(), unzGoToNextFile(), and unzOpen64().

◆ FastFormatString()

template<typename... Args>
std::string cloudViewer::utility::FastFormatString ( const std::string &  format,
Args...  args 
)
inline

Format string fast (Unix / BSD Only)

Definition at line 191 of file Helper.h.

References format, and FormatString().

Referenced by cloudViewer::io::WritePointCloudInMemoryToXYZ().

◆ floor() [1/2]

template<int N>
MiniVec<double, N> cloudViewer::utility::floor ( const MiniVec< double, N > &  a)
inline

Definition at line 82 of file MiniVec.h.

◆ floor() [2/2]

template<int N>
MiniVec<float, N> cloudViewer::utility::floor ( const MiniVec< float, N > &  a)
inline

Definition at line 75 of file MiniVec.h.

References floorf().

Referenced by Tiler::addPoint(), G3Point::arange(), cloud2binary(), cloudViewer::StatisticalTestingTools::computeAdaptativeChi2Dist(), ccHistogramWindow::computeBinArrayFromSF(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistances(), cloudViewer::core::nns::ComputeVoxelIndex(), cloudViewer::ml::impl::ComputeVoxelIndex(), cloudViewer::core::kernel::CPUFloorElementKernel(), cloudViewer::visualization::rendering::GeometryBuffersBuilder::CreateIndexBuffer(), cwt2d(), decimate_vec(), CSF::do_filtering(), cloudViewer::visualization::gui::ListView::Draw(), QCPHiddenArea::draw(), cloudViewer::ml::contrib::PointXYZ::floor(), ecvGenericDisplayTools::FontSizeModifier(), ccRasterizeTool::generateContours(), ccRasterizeTool::generateImage(), FacetsClassifier::GetFamilyIndexes(), e57::SourceDestBufferImpl::getNextInt64(), SiftPyramid::GetRequiredOctaveNum(), qCanupoTrainingDialog::getScales(), CorrespondenceMatchingDialog::getScales(), TemplateAlignmentDialog::getScales(), PCVContext::GLAccumPixel(), Greedy_KWayEdgeBalance(), Greedy_KWayEdgeRefine(), cloudViewer::ml::contrib::grid_subsampling(), qM3C2Tools::GuessBestParams(), ccRegistrationTools::ICP(), qVoxFallTools::Index2Grid(), StereogramWidget::init(), cloudViewer::ml::impl::InterpolationVec< T, VECSIZE, InterpolationMode::LINEAR_BORDER >::Interpolate(), cloudViewer::visualization::gui::VGrid::Layout(), MlevelRecursiveBisection(), MLKKM_WPartGraphKway(), pba::SparseBundleCPU< Float >::NonlinearOptimizeLM(), pba::SparseBundleCU::NonlinearOptimizeLM(), ccOrthoSectionGenerationDlg::onStepChanged(), optRotY(), cloudViewer::t::geometry::kernel::voxel_grid::PointCloudTouchCPU(), G3Point::quant(), Random_KWayEdgeRefine(), masc::Tools::RandomSubset(), rotY(), SampleSphere(), e57::SourceDestBufferImpl::setNextInt64(), and cloudViewer::t::pipelines::kernel::UpdateSPFHFeature().

◆ FormatString()

template<typename... Args>
std::string cloudViewer::utility::FormatString ( const std::string &  format,
Args...  args 
)
inline

Format string.

Definition at line 176 of file Helper.h.

References format, and size.

Referenced by FastFormatString().

◆ GetCPUModelName()

static std::string cloudViewer::utility::GetCPUModelName ( )
static

Returns the CPU model name/brand string.

Definition at line 115 of file CPUInfo.cpp.

References NULL, result, size, and StripString().

◆ GetCurrentTimeStamp()

◆ GetEnvVar()

static std::string cloudViewer::utility::GetEnvVar ( const std::string &  name)
static

Definition at line 23 of file Parallel.cpp.

References name.

Referenced by EstimateMaxThreads().

◆ GetMD5()

std::string cloudViewer::utility::GetMD5 ( const std::string &  file_path)

Computes MD5 Hash for the given file.

Parameters
file_pathPath to the file.

Definition at line 46 of file Download.cpp.

References cloudViewer::utility::filesystem::FileExists(), and LogError.

Referenced by DownloadFromURL(), and cloudViewer::data::DownloadDataset::HasDownloaded().

◆ GetProgramOptionAsDouble()

double cloudViewer::utility::GetProgramOptionAsDouble ( int  argc,
char **  argv,
const std::string &  option,
const double  default_value = 0.0 
)

Definition at line 52 of file Console.cpp.

References GetProgramOptionAsString().

Referenced by convert(), and main().

◆ GetProgramOptionAsEigenVectorXd()

Eigen::VectorXd cloudViewer::utility::GetProgramOptionAsEigenVectorXd ( int  argc,
char **  argv,
const std::string &  option,
const Eigen::VectorXd  default_value = Eigen::VectorXd::Zero(0) 
)

Definition at line 71 of file Console.cpp.

References GetProgramOptionAsString(), and SplitString().

Referenced by convert().

◆ GetProgramOptionAsInt()

int cloudViewer::utility::GetProgramOptionAsInt ( int  argc,
char **  argv,
const std::string &  option,
const int  default_value = 0 
)

Definition at line 31 of file Console.cpp.

References GetProgramOptionAsString().

Referenced by convert(), and main().

◆ GetProgramOptionAsString()

std::string cloudViewer::utility::GetProgramOptionAsString ( int  argc,
char **  argv,
const std::string &  option,
const std::string &  default_value = "" 
)

◆ GetVerbosityLevel()

VerbosityLevel cloudViewer::utility::GetVerbosityLevel ( )

◆ InclusivePrefixSum()

template<class Tin , class Tout >
void cloudViewer::utility::InclusivePrefixSum ( const Tin *  first,
const Tin *  last,
Tout *  out 
)

◆ InParallel()

bool cloudViewer::utility::InParallel ( )

Returns true if in an parallel section.

Definition at line 48 of file Parallel.cpp.

Referenced by cloudViewer::core::kernel::CPUReductionEngine::Run().

◆ IsSupportedCompressedFilePath()

bool cloudViewer::utility::IsSupportedCompressedFilePath ( const std::string &  file_path)

Returns true if the file is a supported compressed file path. It does not check if the file exists. It only checks the file extension.

Parameters
file_pathThe file path to check.

Definition at line 27 of file Extract.cpp.

References file_extension_to_extract_function, format, and cloudViewer::utility::filesystem::GetFileExtensionInLowerCase().

Referenced by cloudViewer::data::DownloadDataset::DownloadDataset(), and Extract().

◆ JoinStrings()

std::string cloudViewer::utility::JoinStrings ( const std::vector< std::string > &  strs,
const std::string &  delimiter = ", " 
)

Definition at line 168 of file Helper.cpp.

Referenced by cloudViewer::core::tensor_check::AssertTensorDtypes_().

◆ JsonToString()

std::string cloudViewer::utility::JsonToString ( const Json::Value &  json)

Serialize a Json::Value to a string.

Parameters
jsonThe Json::Value object to be converted.
Returns
A string containing the json value.

Definition at line 33 of file IJsonConvertible.cpp.

Referenced by cloudViewer::visualization::webrtc_server::WebRTCWindowSystem::CallHttpAPI(), and fmt::formatter< Json::Value >::format().

◆ LeftStripString()

std::string & cloudViewer::utility::LeftStripString ( std::string &  str,
const std::string &  chars = "\t\n\v\f\r " 
)

Definition at line 228 of file Helper.cpp.

Referenced by StripString().

◆ make_optional() [1/2]

template<class X >
constexpr optional<X&> cloudViewer::utility::make_optional ( std::reference_wrapper< X v)
constexpr

Definition at line 900 of file Optional.h.

◆ make_optional() [2/2]

template<class T >
constexpr optional<typename std::decay<T>::type> cloudViewer::utility::make_optional ( T &&  v)
constexpr

Definition at line 895 of file Optional.h.

◆ operator!()

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator! ( const MiniVec< T, N > &  a)
inline

Definition at line 110 of file MiniVec.h.

◆ operator!=() [1/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator!= ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 184 of file MiniVec.h.

◆ operator!=() [2/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator!= ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 184 of file MiniVec.h.

◆ operator!=() [3/12]

template<class T >
constexpr bool cloudViewer::utility::operator!= ( const optional< const T & > &  x,
const T &  v 
)
constexpr

Definition at line 839 of file Optional.h.

◆ operator!=() [4/12]

template<class T >
constexpr bool cloudViewer::utility::operator!= ( const optional< T & > &  x,
const T &  v 
)
constexpr

Definition at line 778 of file Optional.h.

◆ operator!=() [5/12]

template<class T >
constexpr bool cloudViewer::utility::operator!= ( const optional< T > &  x,
const optional< T > &  y 
)
constexpr

Definition at line 620 of file Optional.h.

◆ operator!=() [6/12]

template<class T >
constexpr bool cloudViewer::utility::operator!= ( const optional< T > &  x,
const T &  v 
)
constexpr

Definition at line 717 of file Optional.h.

◆ operator!=() [7/12]

template<class T >
constexpr bool cloudViewer::utility::operator!= ( const optional< T > &  x,
nullopt_t   
)
constexprnoexcept

Definition at line 656 of file Optional.h.

◆ operator!=() [8/12]

template<class T >
constexpr bool cloudViewer::utility::operator!= ( const T &  v,
const optional< const T & > &  x 
)
constexpr

Definition at line 844 of file Optional.h.

◆ operator!=() [9/12]

template<class T >
constexpr bool cloudViewer::utility::operator!= ( const T &  v,
const optional< T & > &  x 
)
constexpr

Definition at line 783 of file Optional.h.

◆ operator!=() [10/12]

template<class T >
constexpr bool cloudViewer::utility::operator!= ( const T &  v,
const optional< T > &  x 
)
constexpr

Definition at line 722 of file Optional.h.

◆ operator!=() [11/12]

template<class T >
constexpr bool cloudViewer::utility::operator!= ( nullopt_t  ,
const optional< T > &  x 
)
constexprnoexcept

Definition at line 661 of file Optional.h.

◆ operator!=() [12/12]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator!= ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 184 of file MiniVec.h.

◆ operator&&() [1/3]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator&& ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 185 of file MiniVec.h.

◆ operator&&() [2/3]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator&& ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 185 of file MiniVec.h.

◆ operator&&() [3/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator&& ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 185 of file MiniVec.h.

◆ operator*() [1/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator* ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 152 of file MiniVec.h.

◆ operator*() [2/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator* ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 152 of file MiniVec.h.

◆ operator*() [3/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator* ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 152 of file MiniVec.h.

◆ operator*=() [1/2]

template<class T , int N>
void cloudViewer::utility::operator*= ( MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 152 of file MiniVec.h.

◆ operator*=() [2/2]

template<class T , int N>
void cloudViewer::utility::operator*= ( MiniVec< T, N > &  a,
b 
)
inline

Definition at line 152 of file MiniVec.h.

◆ operator+() [1/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator+ ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 150 of file MiniVec.h.

◆ operator+() [2/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator+ ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 150 of file MiniVec.h.

◆ operator+() [3/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator+ ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 150 of file MiniVec.h.

◆ operator+=() [1/2]

template<class T , int N>
void cloudViewer::utility::operator+= ( MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 150 of file MiniVec.h.

◆ operator+=() [2/2]

template<class T , int N>
void cloudViewer::utility::operator+= ( MiniVec< T, N > &  a,
b 
)
inline

Definition at line 150 of file MiniVec.h.

◆ operator-() [1/4]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator- ( const MiniVec< T, N > &  a)
inline

Definition at line 103 of file MiniVec.h.

◆ operator-() [2/4]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator- ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 151 of file MiniVec.h.

◆ operator-() [3/4]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator- ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 151 of file MiniVec.h.

◆ operator-() [4/4]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator- ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 151 of file MiniVec.h.

◆ operator-=() [1/2]

template<class T , int N>
void cloudViewer::utility::operator-= ( MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 151 of file MiniVec.h.

◆ operator-=() [2/2]

template<class T , int N>
void cloudViewer::utility::operator-= ( MiniVec< T, N > &  a,
b 
)
inline

Definition at line 151 of file MiniVec.h.

◆ operator/() [1/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator/ ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator/() [2/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator/ ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator/() [3/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator/ ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator/=() [1/2]

template<class T , int N>
void cloudViewer::utility::operator/= ( MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator/=() [2/2]

template<class T , int N>
void cloudViewer::utility::operator/= ( MiniVec< T, N > &  a,
b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator<() [1/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator< ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator<() [2/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator< ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator<() [3/12]

template<class T >
constexpr bool cloudViewer::utility::operator< ( const optional< const T & > &  x,
const T &  v 
)
constexpr

Definition at line 849 of file Optional.h.

◆ operator<() [4/12]

template<class T >
constexpr bool cloudViewer::utility::operator< ( const optional< T & > &  x,
const T &  v 
)
constexpr

Definition at line 788 of file Optional.h.

◆ operator<() [5/12]

template<class T >
constexpr bool cloudViewer::utility::operator< ( const optional< T > &  ,
nullopt_t   
)
constexprnoexcept

Definition at line 666 of file Optional.h.

◆ operator<() [6/12]

template<class T >
constexpr bool cloudViewer::utility::operator< ( const optional< T > &  x,
const optional< T > &  y 
)
constexpr

Definition at line 625 of file Optional.h.

◆ operator<() [7/12]

template<class T >
constexpr bool cloudViewer::utility::operator< ( const optional< T > &  x,
const T &  v 
)
constexpr

Definition at line 727 of file Optional.h.

◆ operator<() [8/12]

template<class T >
constexpr bool cloudViewer::utility::operator< ( const T &  v,
const optional< const T & > &  x 
)
constexpr

Definition at line 864 of file Optional.h.

◆ operator<() [9/12]

template<class T >
constexpr bool cloudViewer::utility::operator< ( const T &  v,
const optional< T & > &  x 
)
constexpr

Definition at line 803 of file Optional.h.

◆ operator<() [10/12]

template<class T >
constexpr bool cloudViewer::utility::operator< ( const T &  v,
const optional< T > &  x 
)
constexpr

Definition at line 742 of file Optional.h.

◆ operator<() [11/12]

template<class T >
constexpr bool cloudViewer::utility::operator< ( nullopt_t  ,
const optional< T > &  x 
)
constexprnoexcept

Definition at line 671 of file Optional.h.

◆ operator<() [12/12]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator< ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator<=() [1/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator<= ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator<=() [2/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator<= ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator<=() [3/12]

template<class T >
constexpr bool cloudViewer::utility::operator<= ( const optional< const T & > &  x,
const T &  v 
)
constexpr

Definition at line 879 of file Optional.h.

◆ operator<=() [4/12]

template<class T >
constexpr bool cloudViewer::utility::operator<= ( const optional< T & > &  x,
const T &  v 
)
constexpr

Definition at line 818 of file Optional.h.

◆ operator<=() [5/12]

template<class T >
constexpr bool cloudViewer::utility::operator<= ( const optional< T > &  x,
const optional< T > &  y 
)
constexpr

Definition at line 635 of file Optional.h.

◆ operator<=() [6/12]

template<class T >
constexpr bool cloudViewer::utility::operator<= ( const optional< T > &  x,
const T &  v 
)
constexpr

Definition at line 757 of file Optional.h.

◆ operator<=() [7/12]

template<class T >
constexpr bool cloudViewer::utility::operator<= ( const optional< T > &  x,
nullopt_t   
)
constexprnoexcept

Definition at line 676 of file Optional.h.

◆ operator<=() [8/12]

template<class T >
constexpr bool cloudViewer::utility::operator<= ( const T &  v,
const optional< const T & > &  x 
)
constexpr

Definition at line 874 of file Optional.h.

◆ operator<=() [9/12]

template<class T >
constexpr bool cloudViewer::utility::operator<= ( const T &  v,
const optional< T & > &  x 
)
constexpr

Definition at line 813 of file Optional.h.

◆ operator<=() [10/12]

template<class T >
constexpr bool cloudViewer::utility::operator<= ( const T &  v,
const optional< T > &  x 
)
constexpr

Definition at line 752 of file Optional.h.

◆ operator<=() [11/12]

template<class T >
constexpr bool cloudViewer::utility::operator<= ( nullopt_t  ,
const optional< T > &   
)
constexprnoexcept

Definition at line 681 of file Optional.h.

◆ operator<=() [12/12]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator<= ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 153 of file MiniVec.h.

◆ operator==() [1/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator== ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 183 of file MiniVec.h.

◆ operator==() [2/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator== ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 183 of file MiniVec.h.

◆ operator==() [3/12]

template<class T >
constexpr bool cloudViewer::utility::operator== ( const optional< const T & > &  x,
const T &  v 
)
constexpr

Definition at line 829 of file Optional.h.

◆ operator==() [4/12]

template<class T >
constexpr bool cloudViewer::utility::operator== ( const optional< T & > &  x,
const T &  v 
)
constexpr

Definition at line 768 of file Optional.h.

◆ operator==() [5/12]

◆ operator==() [6/12]

template<class T >
constexpr bool cloudViewer::utility::operator== ( const optional< T > &  x,
const T &  v 
)
constexpr

Definition at line 707 of file Optional.h.

◆ operator==() [7/12]

template<class T >
constexpr bool cloudViewer::utility::operator== ( const optional< T > &  x,
nullopt_t   
)
constexprnoexcept

Definition at line 646 of file Optional.h.

◆ operator==() [8/12]

template<class T >
constexpr bool cloudViewer::utility::operator== ( const T &  v,
const optional< const T & > &  x 
)
constexpr

Definition at line 834 of file Optional.h.

◆ operator==() [9/12]

template<class T >
constexpr bool cloudViewer::utility::operator== ( const T &  v,
const optional< T & > &  x 
)
constexpr

Definition at line 773 of file Optional.h.

◆ operator==() [10/12]

template<class T >
constexpr bool cloudViewer::utility::operator== ( const T &  v,
const optional< T > &  x 
)
constexpr

Definition at line 712 of file Optional.h.

◆ operator==() [11/12]

template<class T >
constexpr bool cloudViewer::utility::operator== ( nullopt_t  ,
const optional< T > &  x 
)
constexprnoexcept

Definition at line 651 of file Optional.h.

◆ operator==() [12/12]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator== ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 183 of file MiniVec.h.

◆ operator>() [1/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator> ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 181 of file MiniVec.h.

◆ operator>() [2/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator> ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 181 of file MiniVec.h.

◆ operator>() [3/12]

template<class T >
constexpr bool cloudViewer::utility::operator> ( const optional< const T & > &  x,
const T &  v 
)
constexpr

Definition at line 859 of file Optional.h.

◆ operator>() [4/12]

template<class T >
constexpr bool cloudViewer::utility::operator> ( const optional< T & > &  x,
const T &  v 
)
constexpr

Definition at line 798 of file Optional.h.

◆ operator>() [5/12]

template<class T >
constexpr bool cloudViewer::utility::operator> ( const optional< T > &  x,
const optional< T > &  y 
)
constexpr

Definition at line 630 of file Optional.h.

◆ operator>() [6/12]

template<class T >
constexpr bool cloudViewer::utility::operator> ( const optional< T > &  x,
const T &  v 
)
constexpr

Definition at line 737 of file Optional.h.

◆ operator>() [7/12]

template<class T >
constexpr bool cloudViewer::utility::operator> ( const optional< T > &  x,
nullopt_t   
)
constexprnoexcept

Definition at line 686 of file Optional.h.

◆ operator>() [8/12]

template<class T >
constexpr bool cloudViewer::utility::operator> ( const T &  v,
const optional< const T & > &  x 
)
constexpr

Definition at line 854 of file Optional.h.

◆ operator>() [9/12]

template<class T >
constexpr bool cloudViewer::utility::operator> ( const T &  v,
const optional< T & > &  x 
)
constexpr

Definition at line 793 of file Optional.h.

◆ operator>() [10/12]

template<class T >
constexpr bool cloudViewer::utility::operator> ( const T &  v,
const optional< T > &  x 
)
constexpr

Definition at line 732 of file Optional.h.

◆ operator>() [11/12]

template<class T >
constexpr bool cloudViewer::utility::operator> ( nullopt_t  ,
const optional< T > &   
)
constexprnoexcept

Definition at line 691 of file Optional.h.

◆ operator>() [12/12]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator> ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 181 of file MiniVec.h.

◆ operator>=() [1/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator>= ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 182 of file MiniVec.h.

◆ operator>=() [2/12]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator>= ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 182 of file MiniVec.h.

◆ operator>=() [3/12]

template<class T >
constexpr bool cloudViewer::utility::operator>= ( const optional< const T & > &  x,
const T &  v 
)
constexpr

Definition at line 869 of file Optional.h.

◆ operator>=() [4/12]

template<class T >
constexpr bool cloudViewer::utility::operator>= ( const optional< T & > &  x,
const T &  v 
)
constexpr

Definition at line 808 of file Optional.h.

◆ operator>=() [5/12]

template<class T >
constexpr bool cloudViewer::utility::operator>= ( const optional< T > &  ,
nullopt_t   
)
constexprnoexcept

Definition at line 696 of file Optional.h.

◆ operator>=() [6/12]

template<class T >
constexpr bool cloudViewer::utility::operator>= ( const optional< T > &  x,
const optional< T > &  y 
)
constexpr

Definition at line 640 of file Optional.h.

◆ operator>=() [7/12]

template<class T >
constexpr bool cloudViewer::utility::operator>= ( const optional< T > &  x,
const T &  v 
)
constexpr

Definition at line 747 of file Optional.h.

◆ operator>=() [8/12]

template<class T >
constexpr bool cloudViewer::utility::operator>= ( const T &  v,
const optional< const T & > &  x 
)
constexpr

Definition at line 884 of file Optional.h.

◆ operator>=() [9/12]

template<class T >
constexpr bool cloudViewer::utility::operator>= ( const T &  v,
const optional< T & > &  x 
)
constexpr

Definition at line 823 of file Optional.h.

◆ operator>=() [10/12]

template<class T >
constexpr bool cloudViewer::utility::operator>= ( const T &  v,
const optional< T > &  x 
)
constexpr

Definition at line 762 of file Optional.h.

◆ operator>=() [11/12]

template<class T >
constexpr bool cloudViewer::utility::operator>= ( nullopt_t  ,
const optional< T > &  x 
)
constexprnoexcept

Definition at line 701 of file Optional.h.

◆ operator>=() [12/12]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator>= ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 182 of file MiniVec.h.

◆ operator||() [1/3]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator|| ( const MiniVec< T, N > &  a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 186 of file MiniVec.h.

◆ operator||() [2/3]

template<class T , int N>
MiniVec<bool, N> cloudViewer::utility::operator|| ( const MiniVec< T, N > &  a,
b 
)
inline

Definition at line 186 of file MiniVec.h.

◆ operator||() [3/3]

template<class T , int N>
MiniVec<T, N> cloudViewer::utility::operator|| ( a,
const MiniVec< T, N > &  b 
)
inline

Definition at line 186 of file MiniVec.h.

◆ Overload()

template<typename... Ts>
Overloaded<Ts...> cloudViewer::utility::Overload ( Ts...  ts)

Overloads an arbitrary set of (lambda) functions.

Example:

auto Func = utility::Overload(
[&](int i) { utility::LogInfo("Got int {}", i); },
[&](float f) { utility::LogInfo("Got float {}", f); });
Func(1); // Prints: Got int 1
Func(2.4f); // Prints: Got float 2.4
#define LogInfo(...)
Definition: Logging.h:81
Overloaded< Ts... > Overload(Ts... ts)
Definition: Overload.h:55

Definition at line 55 of file Overload.h.

◆ PhysicalConcurrency()

static int cloudViewer::utility::PhysicalConcurrency ( )
static

Returns the number of physical CPU cores.

Definition at line 36 of file CPUInfo.cpp.

References count, FALSE, length(), NULL, offset, size, SplitString(), and StripString().

◆ ProgramOptionExists()

bool cloudViewer::utility::ProgramOptionExists ( int  argc,
char **  argv,
const std::string &  option 
)

Definition at line 100 of file Console.cpp.

Referenced by main(), and ProgramOptionExistsAny().

◆ ProgramOptionExistsAny()

bool cloudViewer::utility::ProgramOptionExistsAny ( int  argc,
char **  argv,
const std::vector< std::string > &  options 
)

Definition at line 104 of file Console.cpp.

References ProgramOptionExists().

Referenced by convert().

◆ pybind_eigen()

void cloudViewer::utility::pybind_eigen ( py::module &  m)

Definition at line 320 of file eigen.cpp.

References cloudViewer::docstring::static_property.

Referenced by pybind_utility().

◆ pybind_logging()

◆ pybind_matrix()

void cloudViewer::utility::pybind_matrix ( py::module &  m)

Definition at line 18 of file matrix.cpp.

References bytes, and NULL.

Referenced by pybind_utility().

◆ pybind_scalarfield()

void cloudViewer::utility::pybind_scalarfield ( py::module &  m)

Definition at line 17 of file scalarfield.cpp.

References cloudViewer::ScalarField::addElement(), ccScalarField::alwaysShowZero(), ccScalarField::areNaNValuesShownInGrey(), cloudViewer::docstring::ClassMethodDocInject(), cloudViewer::ScalarField::computeMeanAndVariance(), cloudViewer::ScalarField::computeMinAndMax(), cloudViewer::ScalarField::currentSize(), ccScalarField::displayRange(), filename, cloudViewer::ScalarField::fill(), cloudViewer::ScalarField::flagValueAsInvalid(), format, ccScalarField::getColorRampSteps(), ccScalarField::getGlobalShift(), CCShareable::getLinkCount(), cloudViewer::ScalarField::getMax(), cloudViewer::ScalarField::getMin(), ccScalarField::getModificationFlag(), cloudViewer::ScalarField::getName(), cloudViewer::ScalarField::getValue(), ccScalarField::Range::inbound(), ccScalarField::Range::isInbound(), ccScalarField::Range::isInRange(), ccScalarField::isSerializable(), ccScalarField::isZeroAlwaysShown(), CCShareable::link(), ccScalarField::logSaturationRange(), ccScalarField::logScale(), ccScalarField::Range::max(), ccScalarField::Range::maxRange(), ccScalarField::mayHaveHiddenValues(), ccScalarField::Range::min(), name, cloudViewer::ScalarField::NaN(), ccScalarField::Range::range(), CCShareable::release(), cloudViewer::ScalarField::reserveSafe(), cloudViewer::ScalarField::resizeSafe(), ccScalarField::saturationRange(), ccScalarField::Range::setBounds(), ccScalarField::setColorRampSteps(), ccScalarField::setGlobalShift(), ccScalarField::setLogScale(), ccScalarField::setMaxDisplayed(), ccScalarField::setMinDisplayed(), ccScalarField::setModificationFlag(), cloudViewer::ScalarField::setName(), ccScalarField::setSaturationStart(), ccScalarField::setSaturationStop(), ccScalarField::Range::setStart(), ccScalarField::Range::setStop(), ccScalarField::setSymmetricalScale(), cloudViewer::ScalarField::setValue(), ccScalarField::showNaNValuesInGrey(), ccScalarField::Range::start(), ccScalarField::Range::stop(), cloudViewer::ScalarField::swap(), ccScalarField::symmetricalScale(), ecvColor::RgbTpl< Type >::ToEigen(), and cloudViewer::ScalarField::ValidValue().

Referenced by pybind_utility().

◆ pybind_utility()

void cloudViewer::utility::pybind_utility ( py::module &  m)

◆ RightStripString()

std::string & cloudViewer::utility::RightStripString ( std::string &  str,
const std::string &  chars = "\t\n\v\f\r " 
)

Definition at line 233 of file Helper.cpp.

Referenced by StripString().

◆ RotationMatrixX()

Eigen::Matrix3d cloudViewer::utility::RotationMatrixX ( double  radians)

Definition at line 248 of file Eigen.cpp.

◆ RotationMatrixY()

Eigen::Matrix3d cloudViewer::utility::RotationMatrixY ( double  radians)

Definition at line 255 of file Eigen.cpp.

◆ RotationMatrixZ()

Eigen::Matrix3d cloudViewer::utility::RotationMatrixZ ( double  radians)

Definition at line 262 of file Eigen.cpp.

◆ SetVerbosityLevel()

void cloudViewer::utility::SetVerbosityLevel ( VerbosityLevel  level)

Set global verbosity level of CloudViewer

Parameters
levelMessages with equal or less than verbosity_level verbosity will be printed.

Definition at line 89 of file Logging.cpp.

References Runtime::GetInstance().

Referenced by cloudViewer::t::pipelines::registration::BenchmarkDopplerICP(), cloudViewer::t::pipelines::registration::BenchmarkICP(), main(), cloudViewer::core::MemoryManagerStatistic::Print(), pybind_logging(), and TryGLVersion().

◆ SkewMatrix()

Eigen::Matrix3d cloudViewer::utility::SkewMatrix ( const Eigen::Vector3d &  vec)

Genretate a skew-symmetric matrix from a vector 3x1.

Definition at line 414 of file Eigen.cpp.

Referenced by cloudViewer::pipelines::registration::TransformationEstimationForGeneralizedICP::ComputeTransformation().

◆ Sleep()

◆ SolveJacobianSystemAndObtainExtrinsicMatrix()

std::tuple< bool, Eigen::Matrix4d > cloudViewer::utility::SolveJacobianSystemAndObtainExtrinsicMatrix ( const Eigen::Matrix6d JTJ,
const Eigen::Vector6d JTr 
)

◆ SolveJacobianSystemAndObtainExtrinsicMatrixArray()

std::tuple< bool, std::vector< Eigen::Matrix4d, Matrix4d_allocator > > cloudViewer::utility::SolveJacobianSystemAndObtainExtrinsicMatrixArray ( const Eigen::MatrixXd &  JTJ,
const Eigen::VectorXd &  JTr 
)

Function to solve Jacobian system Input: 6nx6n Jacobian matrix and 6n-dim residual vector. Output: tuple of is_success, n 4x4 motion matrices.

Definition at line 119 of file Eigen.cpp.

References LogWarning, SolveLinearSystemPSD(), and TransformVector6dToMatrix4d().

◆ SolveLinearSystemPSD()

std::tuple< bool, Eigen::VectorXd > cloudViewer::utility::SolveLinearSystemPSD ( const Eigen::MatrixXd &  A,
const Eigen::VectorXd &  b,
bool  prefer_sparse = false,
bool  check_symmetric = false,
bool  check_det = false,
bool  check_psd = false 
)

◆ SplitString() [1/2]

std::vector< std::string > cloudViewer::utility::SplitString ( const std::string &  str,
const std::string &  delimiters = " ",
bool  trim_empty_str = true 
)

Function to split a string, mimics boost::split http://stackoverflow.com/questions/236129/split-a-string-in-c

Definition at line 212 of file Helper.cpp.

◆ SplitString() [2/2]

◆ StringContains()

bool cloudViewer::utility::StringContains ( const std::string &  src,
const std::string &  dst 
)

Returns true of the source string contains the destination string.

Parameters
srcSource string.
dstDestination string.

Definition at line 154 of file Helper.cpp.

Referenced by cloudViewer::utility::filesystem::JoinPaths().

◆ StringEndsWith()

bool cloudViewer::utility::StringEndsWith ( const std::string &  str,
const std::string &  postfix 
)

Definition at line 163 of file Helper.cpp.

Referenced by cloudViewer::utility::filesystem::JoinPaths().

◆ StringPrintf()

std::string cloudViewer::utility::StringPrintf ( const char *  format,
  ... 
)

Definition at line 110 of file Helper.cpp.

References format, and result.

◆ StringReplace()

std::string cloudViewer::utility::StringReplace ( const std::string &  str,
const std::string &  old_str,
const std::string &  new_str 
)

Definition at line 119 of file Helper.cpp.

References position.

Referenced by cloudViewer::utility::filesystem::JoinPaths().

◆ StringReplaceFirst()

std::string cloudViewer::utility::StringReplaceFirst ( const std::string &  str,
const std::string &  old_str,
const std::string &  new_str 
)

Definition at line 134 of file Helper.cpp.

◆ StringReplaceLast()

std::string cloudViewer::utility::StringReplaceLast ( const std::string &  str,
const std::string &  old_str,
const std::string &  new_str 
)

Definition at line 144 of file Helper.cpp.

Referenced by cloudViewer::utility::filesystem::JoinPaths().

◆ StringSplit()

std::vector< std::string > cloudViewer::utility::StringSplit ( const std::string &  str,
const std::string &  delimiters = " ",
bool  trim_empty_str = true 
)

◆ StringStartsWith()

bool cloudViewer::utility::StringStartsWith ( const std::string &  str,
const std::string &  prefix 
)

Definition at line 158 of file Helper.cpp.

◆ StringToJson()

Json::Value cloudViewer::utility::StringToJson ( const std::string &  json_str)

Parse string and conver to Json::value. Throws exception if the conversion is invalid.

Parameters
json_strString containing json value.
Returns
A Json object.

Definition at line 21 of file IJsonConvertible.cpp.

References LogError.

Referenced by cloudViewer::visualization::webrtc_server::WebRTCWindowSystem::CallHttpAPI(), and cloudViewer::visualization::webrtc_server::WebRTCWindowSystem::OnDataChannelMessage().

◆ StripString()

std::string & cloudViewer::utility::StripString ( std::string &  str,
const std::string &  chars = "\t\n\v\f\r " 
)

Strip empty charactors in front and after string. Similar to Python's str.strip()

Definition at line 238 of file Helper.cpp.

References LeftStripString(), and RightStripString().

Referenced by GetCPUModelName(), PhysicalConcurrency(), and cloudViewer::docstring::FunctionDoc::StringCleanAll().

◆ swap()

template<class T >
void cloudViewer::utility::swap ( optional< T > &  x,
optional< T > &  y 
)
noexcept

◆ ToLower()

std::string cloudViewer::utility::ToLower ( const std::string &  s)

◆ ToUpper()

std::string cloudViewer::utility::ToUpper ( const std::string &  s)

Convert string to the upper case.

Definition at line 249 of file Helper.cpp.

Referenced by cloudViewer::io::ReadTriangleMesh().

◆ TransformMatrix4dToVector6d()

Eigen::Vector6d cloudViewer::utility::TransformMatrix4dToVector6d ( const Eigen::Matrix4d &  input)

Function to transform 4D motion matrix to 6D motion vector this is consistent with the matlab function in the Aerospace Toolbox Reference: https://github.com/qianyizh/ElasticReconstruction/blob/master/Matlab_Toolbox/Core/mrEvaluateRegistration.m

Definition at line 88 of file Eigen.cpp.

Referenced by cloudViewer::pipelines::registration::UpdatePoseVector().

◆ TransformVector6dToMatrix4d()

◆ WordLength()

size_t cloudViewer::utility::WordLength ( const std::string &  doc,
size_t  start_pos,
const std::string &  valid_chars = "_" 
)

String util: find length of current word staring from a position By default, alpha numeric chars and chars in valid_chars are considered as valid charactors in a word

Definition at line 257 of file Helper.cpp.

References length().

Referenced by cloudViewer::docstring::FunctionDoc::ParseReturn(), and cloudViewer::docstring::FunctionDoc::ParseSummary().

◆ WriteDataCb()

static size_t cloudViewer::utility::WriteDataCb ( void *  ptr,
size_t  size,
size_t  nmemb,
FILE *  stream 
)
static

Definition at line 83 of file Download.cpp.

References size.

Referenced by DownloadFromURL().

Variable Documentation

◆ file_extension_to_extract_function

const std::unordered_map< std::string, std::function<void(const std::string&, const std::string&)> > cloudViewer::utility::file_extension_to_extract_function
static
Initial value:
{
{"zip", ExtractFromZIP},
}
void ExtractFromZIP(const std::string &file_path, const std::string &extract_dir)
Function to extract files compressed in .zip format.
Definition: ExtractZIP.cpp:158

Definition at line 23 of file Extract.cpp.

Referenced by Extract(), and IsSupportedCompressedFilePath().

◆ in_place

constexpr in_place_t cloudViewer::utility::in_place {}
constexpr

Definition at line 40 of file Optional.h.

◆ nullopt

constexpr nullopt_t cloudViewer::utility::nullopt {nullopt_t::init()}
constexpr

Definition at line 136 of file Optional.h.

Referenced by cloudViewer::t::geometry::RaycastingScene::AddTriangles(), cloudViewer::t::pipelines::registration::ComputeFPFHFeature(), cloudViewer::t::geometry::kernel::minimum_obb::ComputeMinimumOBBApprox(), cloudViewer::t::geometry::kernel::minimum_obb::ComputeMinimumOBBJylanki(), cloudViewer::t::geometry::PointCloud::CreateFromDepthImage(), cloudViewer::t::geometry::AxisAlignedBoundingBox::CreateFromPoints(), cloudViewer::t::geometry::OrientedBoundingBox::CreateFromPoints(), cloudViewer::t::geometry::AxisAlignedBoundingBox::GetPointIndicesWithinBoundingBox(), cloudViewer::t::geometry::OrientedBoundingBox::GetPointIndicesWithinBoundingBox(), cloudViewer::ml::contrib::Iou3dCPU(), cloudViewer::ml::contrib::IouBevCPU(), cloudViewer::t::pipelines::registration::LegacyComputeFPFHFeature(), cloudViewer::visualization::webrtc_server::BitmapTrackSource::needs_denoising(), cloudViewer::t::geometry::kernel::pcapartition::PCAPartition(), cloudViewer::t::geometry::PointCloud::PointCloud(), cloudViewer::t::geometry::PointCloud::ProjectToDepthImage(), cloudViewer::t::geometry::pybind_boundingvolume(), cloudViewer::core::pybind_core_tensor(), cloudViewer::t::geometry::kernel::transform::RotateNormals(), cloudViewer::t::geometry::kernel::transform::RotatePoints(), cloudViewer::pipelines::color_map::RunRigidOptimizer(), cloudViewer::core::nns::FixedRadiusIndex::SearchHybrid(), cloudViewer::core::nns::NanoFlannIndex::SearchHybrid(), cloudViewer::core::nns::KnnIndex::SearchKnn(), cloudViewer::core::nns::NanoFlannIndex::SearchKnn(), cloudViewer::core::nns::FixedRadiusIndex::SearchRadius(), cloudViewer::core::nns::NanoFlannIndex::SearchRadius(), cloudViewer::t::geometry::LineSet::SetLineColors(), cloudViewer::t::geometry::LineSet::SetLineIndices(), cloudViewer::t::geometry::PointCloud::SetPointColors(), cloudViewer::t::geometry::PointCloud::SetPointNormals(), cloudViewer::t::geometry::LineSet::SetPointPositions(), cloudViewer::t::geometry::PointCloud::SetPointPositions(), cloudViewer::t::geometry::TriangleMesh::SetTriangleColors(), cloudViewer::t::geometry::TriangleMesh::SetTriangleIndices(), cloudViewer::t::geometry::TriangleMesh::SetTriangleNormals(), cloudViewer::t::geometry::TriangleMesh::SetVertexColors(), cloudViewer::t::geometry::TriangleMesh::SetVertexNormals(), cloudViewer::t::geometry::TriangleMesh::SetVertexPositions(), cloudViewer::core::eigen_converter::TensorToEigenVectorNxVector(), cloudViewer::t::geometry::kernel::transform::TransformNormals(), and cloudViewer::t::geometry::kernel::transform::TransformPoints().

◆ trivial_init

constexpr struct cloudViewer::utility::trivial_init_t cloudViewer::utility::trivial_init