MeVisLab Toolbox Reference
mlMLToROIContourSequence.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
27
32//----------------------------------------------------------------------------------
33#ifndef __mlMLToROIContourSequence_H
34#define __mlMLToROIContourSequence_H
35
37#include "mlProgress.h"
38
39#include <mlTypeDefs.h>
40#include <DCMTree_Lib.h>
41#include <map>
42#include <utility>
43#include <string>
44#include <boost/function.hpp>
45#include <mlPagedImage.h>
46#include <CSOBase/CSOList.h>
47
49
50typedef std::map<std::string, std::string> TStrStrMap;
51typedef std::pair<std::string, std::string> TStrStrPair;
52
53class PagedImage;
54class CSOList;
55class CSOGroup;
56class CSO;
57class DcmDRTROIContourSequenceInterface;
58class DcmDRTContourSequenceInterface;
59class DcmDRTContourImageSequenceInterface;
60
62{
63public:
67 MLToROIContourSequence(boost::function<void(float)> *setProgress);
68
72
79
85
88 void setImageReferenceMode(ImageReferenceMode mode) { _imageReferenceMode = mode; }
89 ImageReferenceMode imageReferenceMode() const { return _imageReferenceMode; }
90
91private:
92 void populateROIContourSequence(DcmDRTROIContourSequenceInterface *seq);
93 void addROIContour(DcmDRTROIContourSequenceInterface *seq, const unsigned int roiNumber,
94 const CSOGroup &csoGroup);
95 void addContour(DcmDRTContourSequenceInterface *contourSequence, const unsigned int contourNumber,
96 const CSO &cso);
97 // void addContourImage(DcmDRTContourImageSequenceInterface *contourImageSequence, const CSO& cso);
99 std::string getContourGeometricType(const CSO &cso);
100 std::string getContourData(const CSO &cso, size_t& numPoints);
101 std::string getROIDisplayColor(const CSOGroup &csoGroup);
103 bool isCollinear(const CSO& cso) const;
104
105 PagedImage *_image;
106 CSOList *_csoList;
107 Progress _progress;
108 int _precision;
109 bool _treatCollinearAsPlanar;
110 ImageReferenceMode _imageReferenceMode;
111};
112
114
115#endif
Project global and OS specific declarations.
#define MLDCMTKMLCONVERTERS_EXPORT
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
The CSO represents a contour segmentation object.
Definition CSO.h:44
Class to provide access to DRTContourImageSequence.
Class to provide access to DRTContourSequence.
Class to provide access to DRTROIContourSequence.
DCMTree::TreePtr convert(PagedImage *image, CSOList *csoList, int precision)
Converter function.
ImageReferenceMode imageReferenceMode() const
MLToROIContourSequence(boost::function< void(float)> *setProgress)
Constructor.
void setTreatCollinearAsPlanar(bool collinearIsPlanar)
Set treatCollinearAsPlanar option.
@ RequireExactlyOneSlice
always reference one image slice, print an error if the CSO does not lie in exactly one existing slic...
@ DoNotReferenceImage
never reference image
void setImageReferenceMode(ImageReferenceMode mode)
Set image reference mode, which tells the MLToROIContourSequence when to create a reference to an ima...
Class which represents an image, which manages properties of an image and image data which is located...
std::map< std::string, std::string > TStrStrMap
std::pair< std::string, std::string > TStrStrPair
Class for setting progress.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition DCMTree_Lib.h:72