GDCM 2.2.0

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

- File List
- File Members

gdcmSegmentReader.h
Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004
    00005   Copyright (c) 2006-2011 Mathieu Malaterre
    00006   All rights reserved.
    00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00008
    00009      This software is distributed WITHOUT ANY WARRANTY; without even
    00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00011      PURPOSE.  See the above copyright notice for more information.
    00012
    00013 =========================================================================*/
    00014 #ifndef GDCMSEGMENTREADER_H
    00015 #define GDCMSEGMENTREADER_H
    00016
    00017 #include <map>
    00018
    00019 #include <gdcmReader.h>
    00020 #include <gdcmSegment.h>
    00021
    00022 namespace gdcm
    00023 {
    00024
    00031 class GDCM_EXPORT SegmentReader : public Reader
    00032 {
    00033 public:
    00034   typedef std::vector< SmartPointer< Segment > > SegmentVector;
    00035
    00036   SegmentReader();
    00037
    00038   virtual ~SegmentReader();
    00039
    00041   virtual bool Read(); // Set to protected ?
    00042
    00043   //**        Segment getters/setters     **//
    00044   const SegmentVector GetSegments() const;
    00045   SegmentVector GetSegments();
    00046
    00047 //  unsigned int GetNumberOfSegments();
    00048
    00049 protected:
    00050
    00051   typedef std::map< unsigned long, SmartPointer< Segment > > SegmentMap;
    00052
    00053   bool ReadSegments();
    00054
    00055   bool ReadSegment(const Item & segmentItem, const unsigned int idx);
    00056
    00057
    00058   SegmentMap Segments;  // The key value is item number (in segment sequence)
    00059                         // or the surface number (for a surface segmentation).
    00060
    00061 };
    00062
    00063 }
    00064
    00065 #endif // GDCMSEGMENTREADER_H