GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

gdcmSegmentReader.h
Go to the documentation of this file.
1 /*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13 =========================================================================*/
14 #ifndef GDCMSEGMENTREADER_H
15 #define GDCMSEGMENTREADER_H
16
17 #include <map>
18
19 #include <gdcmReader.h>
20 #include <gdcmSegment.h>
21
22 namespace gdcm
23 {
24
31 class GDCM_EXPORT SegmentReader : public Reader
32 {
33 public:
34 typedef std::vector< SmartPointer< Segment > > SegmentVector;
35
36 SegmentReader();
37
38 virtual ~SegmentReader();
39
41 virtual bool Read(); // Set to protected ?
42
43 //** Segment getters/setters **//
44 const SegmentVector GetSegments() const;
45 SegmentVector GetSegments();
46
47 // unsigned int GetNumberOfSegments();
48
49 protected:
50
51 typedef std::map< unsigned long, SmartPointer< Segment > > SegmentMap;
52
53 bool ReadSegments();
54
55 bool ReadSegment(const Item & segmentItem, const unsigned int idx);
56
57
58 SegmentMap Segments; // The key value is item number (in segment sequence)
59 // or the surface number (for a surface segmentation).
60
61 };
62
63 }
64
65 #endif // GDCMSEGMENTREADER_H