Skip to content

Instantly share code, notes, and snippets.

#include <vtkCellData.h>
#include <vtkSmartPointer.h>
#include <vtkUniformGrid.h>
#include <vtkUnsignedIntArray.h>
#include <vtkXMLImageDataWriter.h>
int main(int, char *[]) {
// Create a grid
vtkSmartPointer<vtkUniformGrid> uniformGrid =
vtkSmartPointer<vtkUniformGrid>::New();
#include <vtkCellData.h>
#include <vtkSmartPointer.h>
#include <vtkStructuredGrid.h>
#include <vtkUnsignedIntArray.h>
#include <vtkXMLStructuredGridWriter.h>
void Grid3D() {
// Create a grid
vtkSmartPointer<vtkStructuredGrid> structuredGrid =
vtkSmartPointer<vtkStructuredGrid>::New();
@daviddoria
daviddoria / gist:1725d6dfe1bf6ee2f951eb6ae9b6a973
Created January 14, 2017 15:16
Demonstrate all "one-to-rest" pairs SVM confidence
#include <opencv2/opencv.hpp>
#include <algorithm>
#include <unordered_map>
#include <set>
#include <vector>
const int WIDTH = 512;
const int HEIGHT = 512;
#include <iostream>
#include <opencv2/ml/ml.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc.hpp>
int main(int, char**)
{
// Data for visual representation
#include <iostream>
#include <opencv2/ml/ml.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc.hpp>
int main(int, char**)
{
// Data for visual representation
original
------------
/usr/include/c++/6.1.1
/usr/include/c++/6.1.1/x86_64-pc-linux-gnu
/usr/include/c++/6.1.1/backward
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include
/usr/local/include
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include-fixed
/usr/include
#include <iostream>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>
typedef boost::property<boost::edge_weight_t, double> EdgeWeightProperty;
/*
adjacency_list<OutEdgeList, VertexList, Directed,
VertexProperties, EdgeProperties,
#include "AbstractPoint.h"
//BOOST_CLASS_EXPORT_IMPLEMENT(AbstractPoint)
#include "AbstractPoint.h"
BOOST_CLASS_EXPORT_IMPLEMENT(AbstractPoint)
#ifndef ABSTRACT_POINT_H
#define ABSTRACT_POINT_H
#include <boost/serialization/export.hpp>
class AbstractPoint
{
public:
virtual ~AbstractPoint(){}
virtual void DoSomething() = 0;