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
21const 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
61typedef std::map <unsigned int, unsigned int> CSOIdToCSOIdMap;
63typedef std::vector <unsigned int> CSOIdVector;
65const unsigned int INVALID_CSO_ID = static_cast<unsigned int>(-1);
66
67
71{
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.
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 which 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