ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
Classes | Functions | Variables
main.cpp File Reference
#include <pcl/common/common.h>
#include <pcl/filters/extract_indices.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <vector>
#include "hc.h"
#include "msd.h"
#include "mst.h"
#include "smoothenCloud.h"
Include dependency graph for main.cpp:

Go to the source code of this file.

Classes

struct  hc_params
 
struct  rgb_t
 
class  Point
 

Functions

void visualizeTriplets (pcl::visualization::PCLVisualizer &viewer, pcl::PointCloud< pcl::PointXYZI >::Ptr cloud, std::vector< hc::triplet > const &triplets)
 
void visualizeClusterAsMst (pcl::visualization::PCLVisualizer &viewer, pcl::PointCloud< pcl::PointXYZI >::Ptr cloud, Cluster const &cluster)
 
Cluster use_hc (pcl::PointCloud< pcl::PointXYZI >::Ptr cloud, std::vector< hc::triplet > triplets, float scale, float cdist, size_t cleanup_min_triplets, int opt_verbose=0)
 
void colorByIndex (pcl::PointCloud< pcl::PointXYZ >::ConstPtr cloud, pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud_rgb)
 
void colorByIntensity (pcl::PointCloud< pcl::PointXYZI >::ConstPtr cloud, pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud_rgb, float minIntensity=0.0f, float maxIntensity=4000.0f)
 
void colorByCluster (pcl::PointCloud< pcl::PointXYZ >::ConstPtr cloud, pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud_rgb, Cluster const cluster, std::vector< rgb_t > const cluster_rgb)
 
std::vector< rgb_tcreateClusterColour (pcl::PointCloud< pcl::PointXYZ >::ConstPtr cloud, Cluster const cluster)
 
void clustersToGnuplot (pcl::PointCloud< pcl::PointXYZ >::Ptr cloud, Cluster const cluster, std::vector< rgb_t > cluster_rgb)
 
void clustersToGnuplot (pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud)
 
void debugGnuplot (pcl::PointCloud< pcl::PointXYZI >::Ptr cloud_smooth, pcl::PointCloud< pcl::PointXYZI >::Ptr cloud, const char *fname="debug_smoothed.gnuplot")
 
void clustersToCSV (pcl::PointCloud< pcl::PointXYZ >::Ptr cloud, Cluster const cluster)
 
void cloudToCSV (pcl::PointCloud< pcl::PointXYZI >::Ptr cloud, const char *fname="debug_smoothed.csv")
 
int main (int argc, char **argv)
 

Variables

const char * usage
 

Function Documentation

◆ cloudToCSV()

void cloudToCSV ( pcl::PointCloud< pcl::PointXYZI >::Ptr  cloud,
const char *  fname = "debug_smoothed.csv" 
)

Definition at line 479 of file main.cpp.

◆ clustersToCSV()

void clustersToCSV ( pcl::PointCloud< pcl::PointXYZ >::Ptr  cloud,
Cluster const  cluster 
)

Definition at line 433 of file main.cpp.

◆ clustersToGnuplot() [1/2]

void clustersToGnuplot ( pcl::PointCloud< pcl::PointXYZ >::Ptr  cloud,
Cluster const  cluster,
std::vector< rgb_t cluster_rgb 
)

Definition at line 301 of file main.cpp.

◆ clustersToGnuplot() [2/2]

void clustersToGnuplot ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud)

Definition at line 365 of file main.cpp.

◆ colorByCluster()

void colorByCluster ( pcl::PointCloud< pcl::PointXYZ >::ConstPtr  cloud,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud_rgb,
Cluster const  cluster,
std::vector< rgb_t > const  cluster_rgb 
)

Definition at line 240 of file main.cpp.

◆ colorByIndex()

void colorByIndex ( pcl::PointCloud< pcl::PointXYZ >::ConstPtr  cloud,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud_rgb 
)

Definition at line 208 of file main.cpp.

◆ colorByIntensity()

void colorByIntensity ( pcl::PointCloud< pcl::PointXYZI >::ConstPtr  cloud,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr  cloud_rgb,
float  minIntensity = 0.0f,
float  maxIntensity = 4000.0f 
)

Definition at line 223 of file main.cpp.

◆ createClusterColour()

std::vector<rgb_t> createClusterColour ( pcl::PointCloud< pcl::PointXYZ >::ConstPtr  cloud,
Cluster const  cluster 
)

Definition at line 272 of file main.cpp.

◆ debugGnuplot()

void debugGnuplot ( pcl::PointCloud< pcl::PointXYZI >::Ptr  cloud_smooth,
pcl::PointCloud< pcl::PointXYZI >::Ptr  cloud,
const char *  fname = "debug_smoothed.gnuplot" 
)

Definition at line 387 of file main.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 495 of file main.cpp.

◆ use_hc()

Cluster use_hc ( pcl::PointCloud< pcl::PointXYZI >::Ptr  cloud,
std::vector< hc::triplet triplets,
float  scale,
float  cdist,
size_t  cleanup_min_triplets,
int  opt_verbose = 0 
)

Definition at line 196 of file main.cpp.

◆ visualizeClusterAsMst()

void visualizeClusterAsMst ( pcl::visualization::PCLVisualizer &  viewer,
pcl::PointCloud< pcl::PointXYZI >::Ptr  cloud,
Cluster const &  cluster 
)

Definition at line 124 of file main.cpp.

◆ visualizeTriplets()

void visualizeTriplets ( pcl::visualization::PCLVisualizer &  viewer,
pcl::PointCloud< pcl::PointXYZI >::Ptr  cloud,
std::vector< hc::triplet > const &  triplets 
)

Definition at line 88 of file main.cpp.

Variable Documentation

◆ usage

const char* usage
Initial value:
=
"Usage:\n"
"\tcloud_viewer [options] <infile>\n"
"Options (defaults in brackets):\n"
"\t-gnuplot print result as a gnuplot command\n"
"\t-r <radius> radius for point smoothing [7.0]\n"
"\t (when negative, it is set to dNN)\n"
"\t-k <n> number of nearest neighbours used for creating triplets\n"
"\t [19]\n"
"\t-n <n> number of the best triplets to use [3]\n"
"\t-a <alpha> maximum angle between the lines in a triplet [0.015]\n"
"\t-s <scale> scalingfactor for clustering [1.0]\n"
"\t-t <dist> best cluster distance [5.0]\n"
"\t-m <n> minimum number of triplets for a cluster [5]\n"
"\t-o <outfile> write results to <outfile>\n"
"\t-x11 show interactive window with clustering\n"
"\t-v <n> be verbose and save debug trace to file. n is the\n"
"\t verbose depth\n"
"Version:\n"
"\t1.0 from 2018-03-27"

Definition at line 24 of file main.cpp.