MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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
21const int CSO_VERSION = 6;
22
23
24#include <mlModuleIncludes.h>
25#include <mlModule.h>
26
27
29#define CSO_PRINT(msg) \
30 { \
31 std::stringstream strstream; \
32 strstream << msg; \
33 ML_UTILS_NAMESPACE::MLErrorOutput.printAndNotify(ML_COUT, "CSO", "", "", strstream.str(), "", __FILE__, __LINE__, \
34 NULL, NULL, ML_RESULT_OK); \
35 }
36
38#define CSO_ERROR(msg) \
39 { \
40 std::stringstream strstream; \
41 strstream << msg; \
42 ML_UTILS_NAMESPACE::MLErrorOutput.printAndNotify(ML_ERROR, "CSO", "", "", strstream.str(), "", __FILE__, __LINE__, \
43 NULL, NULL, ML_RESULT_OK); \
44 }
45
47#define CSO_WARNING(msg) \
48 { \
49 std::stringstream strstream; \
50 strstream << msg; \
51 ML_UTILS_NAMESPACE::MLErrorOutput.printAndNotify(ML_WARNING, "CSO", "", "", strstream.str(), "", __FILE__, \
52 __LINE__, NULL, NULL, ML_RESULT_OK); \
53 }
54
56#define CSO_DEBUG(msg) \
57 { \
58 std::stringstream strstream; \
59 strstream << msg; \
60 ML_UTILS_NAMESPACE::MLErrorOutput.printAndNotify(ML_COUT, "CSO Debug", "", "", strstream.str(), "", __FILE__, \
61 __LINE__, NULL, NULL, ML_RESULT_OK); \
62 }
63
64#include <fstream>
65#include <mlUnicode.h>
66
67
68#include <ThirdPartyWarningsDisable.h>
69#include <boost/unordered_map.hpp>
70#include <ThirdPartyWarningsRestore.h>
71
74#define MAX_VOXEL_BOUNDING_BOX_CACHE_SIZE 12
75
77typedef std::map<unsigned int, unsigned int> CSOIdToCSOIdMap;
79typedef std::vector<unsigned int> CSOIdVector;
81const unsigned int INVALID_CSO_ID = static_cast<unsigned int>(-1);
82
83
87{
88 bool operator==(const MatrixHashPair& other) const
89 {
90 return (this->matrix == other.matrix) && (this->hashKey == other.hashKey);
91 }
93 size_t hashKey;
94};
95
99{
100 inline size_t operator()(const MatrixHashPair& hashPair) const
101 {
102 return hashPair.hashKey;
103 }
104};
std::map< unsigned int, unsigned int > CSOIdToCSOIdMap
Defines a map type to map old CSOIds to new CSOIds when merging CSOLists.
const unsigned int INVALID_CSO_ID
Defines a CSO/CSOGroup ID that is invalid.
std::vector< unsigned int > CSOIdVector
Defines a vector to hold CSO and CSOGroup IDs.
const int CSO_VERSION
Global include file for MLCSO library with definitions and includes.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Struct for retrieving a hash key for a Matrix4 that is used in the caches for voxel bounding boxes.
size_t operator()(const MatrixHashPair &hashPair) const
Struct for storing hash information for hashing by a Matrix4 and its precomputed hash key.
ml::Matrix4 matrix
bool operator==(const MatrixHashPair &other) const