MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
CSOValidator.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2015, 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 "MLCSOIncludes.h"
19
21
22class CSO;
23class CSOGroup;
24class CSOList;
25class CSOPredicate;
26
28{
29public:
33 CSOValidator(const std::vector<const CSO*>& csos);
34 CSOValidator(const CSOList& csoList);
36
41
46
51
56
62
67 bool areAllCSOsParallel(double epsilon);
69
77 bool areAllCSOsParallelToPlane(const Vector3& planeNormal, double epsilon);
79
84
87
90
94
98
99private:
100 const CSO* _getFirstCSO();
101 std::vector<const CSO*> _getAllCSOs();
102 std::vector<const CSO*> _getAllCSOsFromCSOGroup();
103 std::vector<const CSO*> _getAllCSOsFromCSOList();
104
105 const std::vector<const CSO*>* _csos;
106 const CSOGroup* _csoGroup;
107 const CSOList* _csoList;
108};
109
std::vector< unsigned int > CSOIdVector
Defines a vector to hold CSO and CSOGroup IDs.
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
Definition MLCSOSystem.h:23
A CSOGroup comprises a number of CSOs, which themselves can be in a number of different CSOGroups.
Definition CSOGroup.h:38
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
Definition CSOList.h:61
bool areAllCSOsOpen()
Returns whether all CSOs are open.
bool hasAtLeastCSOGroups(size_t minNumGroups)
Returns whether passed CSO collection has at least 'minNumGroups' CSOGroup if passed CSO collection i...
bool areAllCSOsParallelToPlane(const Vector3 &planeNormal, double epsilon)
Returns whether all CSOs are parallel to the plane given by a normal vector.
bool areAllCSOsSatisfyingPredicate(const CSOPredicate &pred)
Returns whether all CSOs satisfy given predicate.
bool areAllCSOsInPlane(CSOIdVector &violatingCSOIDs)
bool hasAtMostCSOGroups(size_t maxNumGroups)
Returns whether passed CSO collection has at most 'maxNumGroups' CSOGroups if passed CSO collection i...
bool areAllCSOsNotSelfIntersecting(CSOIdVector &violatingCSOIDs)
CSOValidator(const CSOList &csoList)
bool areAllCSOsClosed(CSOIdVector &violatingCSOIDs)
bool areAllCSOsParallel(double epsilon)
Returns whether all CSOs are parallel to the plane on which the first CSO in the passed CSO collectio...
bool areAllCSOsInPlane()
Returns whether all CSOs are in-plane.
bool areAllCSOsClosed()
Returns whether all CSOs are closed.
bool areAllCSOsParallel(double epsilon, CSOIdVector &violatingCSOIDs)
CSOValidator(const CSOGroup &csoGroup)
bool areAllCSOsParallelToPlane(const Vector3 &planeNormal, double epsilon, CSOIdVector &violatingCSOIDs)
bool areAllCSOsInSamePlane(CSOIdVector &violatingCSOIDs)
CSOValidator(const std::vector< const CSO * > &csos)
Constructors taking a CSO collection to be validated: a std::vector, a CSOList, or a CSOGroup.
bool hasAtLeastCSOs(size_t minNumCSOs)
Returns whether passed CSO collection has at least 'minNumCSOs' CSOs.
bool hasAtMostCSOs(size_t maxNumCSOs)
Returns whether passed CSO collection has at most 'maxNumCSOs' CSOs.
bool areAllCSOsNotSelfIntersecting()
Returns whether all CSOs are not self intersecting.
bool areAllCSOsInSamePlane()
Returns whether all CSOs are in the same plane as the first CSO in the passed CSO collection.
bool areAllCSOsSatisfyingPredicate(const CSOPredicate &pred, CSOIdVector &violatingCSOIDs)
bool areAllCSOsOpen(CSOIdVector &violatingCSOIDs)
The CSO represents a contour segmentation object.
Definition CSO.h:44
Target mlrange_cast(Source arg)
Generic version of checked ML casts.