MeVisLab Toolbox Reference
MLCSOIncludes.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 
15 
16 #pragma once
17 
18 #include "MLCSOSystem.h"
19 
21 const int CSO_VERSION = 6;
22 
23 
24 #include <mlModuleIncludes.h>
25 #include <mlModule.h>
26 
27 
29 #define CSO_PRINT(msg) { std::stringstream strstream; \
30  strstream << msg; \
31  ML_UTILS_NAMESPACE::MLErrorOutput.printAndNotify(ML_COUT, "CSO", "", "", strstream.str(), "", __FILE__, __LINE__, NULL, NULL, ML_RESULT_OK); }
32 
34 #define CSO_ERROR(msg) { std::stringstream strstream; \
35  strstream << msg; \
36  ML_UTILS_NAMESPACE::MLErrorOutput.printAndNotify(ML_ERROR, "CSO", "", "", strstream.str(), "", __FILE__, __LINE__, NULL, NULL, ML_RESULT_OK); }
37 
39 #define CSO_WARNING(msg) { std::stringstream strstream; \
40  strstream << msg; \
41  ML_UTILS_NAMESPACE::MLErrorOutput.printAndNotify(ML_WARNING, "CSO", "", "", strstream.str(), "", __FILE__, __LINE__, NULL, NULL, ML_RESULT_OK); }
42 
44 #define CSO_DEBUG(msg) { std::stringstream strstream; \
45  strstream << msg; \
46  ML_UTILS_NAMESPACE::MLErrorOutput.printAndNotify(ML_COUT, "CSO Debug", "", "", strstream.str(), "", __FILE__, __LINE__, NULL, NULL, ML_RESULT_OK); }
47 
48 #include <fstream>
49 #include <mlUnicode.h>
50 
51 
52 #include <ThirdPartyWarningsDisable.h>
53 #include <boost/unordered_map.hpp>
54 #include <ThirdPartyWarningsRestore.h>
55 
58 #define MAX_VOXEL_BOUNDING_BOX_CACHE_SIZE 12
59 
61 typedef std::map <unsigned int, unsigned int> CSOIdToCSOIdMap;
63 typedef std::vector <unsigned int> CSOIdVector;
65 const unsigned int INVALID_CSO_ID = static_cast<unsigned int>(-1);
66 
67 
71 {
72  bool operator == (const MatrixHashPair& other) const
73  {
74  return (this->matrix == other.matrix) && (this->hashKey == other.hashKey);
75  }
77  size_t hashKey;
78 };
79 
83 {
84  inline size_t operator()(const MatrixHashPair& hashPair) const
85  {
86  return hashPair.hashKey;
87  }
88 };
std::map< unsigned int, unsigned int > CSOIdToCSOIdMap
Defines a map type to map old CSOIds to new CSOIds when merging CSOLists.
Definition: MLCSOIncludes.h:61
const unsigned int INVALID_CSO_ID
Defines a CSO/CSOGroup id that is invalid.
Definition: MLCSOIncludes.h:65
std::vector< unsigned int > CSOIdVector
Defines a vector to hold CSO and CSOGroup ids.
Definition: MLCSOIncludes.h:63
const int CSO_VERSION
Global include file for MLCSO library with definitions and includes.
Definition: MLCSOIncludes.h:21
Struct for retrieving a hash key for a Matrix4 which is used in the caches for voxel bounding boxes.
Definition: MLCSOIncludes.h:83
size_t operator()(const MatrixHashPair &hashPair) const
Definition: MLCSOIncludes.h:84
Struct for storing hash information for hashing by a Matrix4 and its precomputed hash key.
Definition: MLCSOIncludes.h:71
ml::Matrix4 matrix
Definition: MLCSOIncludes.h:76
bool operator==(const MatrixHashPair &other) const
Definition: MLCSOIncludes.h:72