forked from danaele/ExtractLabelSurfaces
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExtractLabelSurfaces.h
More file actions
53 lines (40 loc) · 1.7 KB
/
ExtractLabelSurfaces.h
File metadata and controls
53 lines (40 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <vtkSmartPointer.h>
#include <vtkPolyData.h>
#include <vtkDataReader.h>
#include <vtkPolyDataReader.h>
#include <vtkPolyDataWriter.h>
#include <vtkThreshold.h>
#include <vtkThresholdPoints.h>
#include <vtkCellArray.h>
#include <vtkUnstructuredGrid.h>
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <vtkPointData.h>
#include <list>
#include <map>
#include <iterator>
#include <ExtractLabelSurfacesCLP.h>
#include "rapidjson/document.h"
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
#include <iostream>
#include "rapidjson/filereadstream.h" // FileReadStream
#include "rapidjson/encodedstream.h" // EncodedInputStream
#include <cstdio>
#include <vtksys/SystemTools.hxx> // for MakeDirectory()
struct LabelIds {
int labelNumber;
std::string labelTextName;
};
int ExtractPointData ( std::string vtkLabelFile , std::string labelNameInfo , std::string arrayName ) ;
int TranslateToLabelNumber ( std::string labelNameInfo , std::string labelNumberInfo , bool useTranslationTable , std::string labelTranslationTable, std::string ignoreLabel ) ;
int CreateSurfaceLabelFiles ( std::string vtkFile , std::string labelNumberInfo , std::string prefix , bool overlapping, std::string ignoreLabel, bool useTranslationTable, std::string labelTranslationTable) ;
int GetNumberIgnored (std::string ignoreLabel, std::string labelTranslationTable );
std::map < std::string, LabelIds > ReadLabelTranslationTable ( std::string labelTranslationTable ) ;
vtkSmartPointer <vtkPolyData> ReadVTKFile ( std::string vtkFile ) ;
std::string IntToString ( int number ) ;
std::string DoubleToString ( double number ) ;
std::string writeLinePoints ( double p[3] ) ;