GDCM 3.2.1

gdcmSegmentWriter.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 GDCMSEGMENTWRITER_H
15#define GDCMSEGMENTWRITER_H
16
17#include <gdcmWriter.h>
18#include <gdcmSegment.h>
19
20 namespace gdcm
21{
22
29 class GDCM_EXPORT SegmentWriter : public Writer
30{
31 public:
32 typedef std::vector< SmartPointer< Segment > > SegmentVector;
33
34 SegmentWriter();
35
36 ~SegmentWriter() override;
37
39 bool Write() override; // Set to protected ?
40
41 //** Segment getters/setters **//
42 unsigned int GetNumberOfSegments() const;
43 void SetNumberOfSegments(const unsigned int size);
44
45 const SegmentVector & GetSegments() const;
46 SegmentVector & GetSegments();
47 SmartPointer< Segment > GetSegment(const unsigned int idx = 0) const;
48
49 void AddSegment(SmartPointer< Segment > segment);
50
51 void SetSegments(SegmentVector & segments);
52
53 protected:
54
55 bool PrepareWrite();
56
57
58 SegmentVector Segments;
59};
60
61}
62
63#endif // GDCMSEGMENTWRITER_H
gdcm::SegmentWriter::AddSegment
void AddSegment(SmartPointer< Segment > segment)
gdcm::SegmentWriter::Write
bool Write() override
Write.
gdcm::SegmentWriter::SetSegments
void SetSegments(SegmentVector &segments)
gdcm::SegmentWriter::GetSegment
SmartPointer< Segment > GetSegment(const unsigned int idx=0) const
gdcm::SegmentWriter::PrepareWrite
bool PrepareWrite()
gdcm::SegmentWriter::GetSegments
const SegmentVector & GetSegments() const
gdcm::SegmentWriter::SegmentWriter
SegmentWriter()
gdcm::SegmentWriter::SegmentVector
std::vector< SmartPointer< Segment > > SegmentVector
Definition gdcmSegmentWriter.h:32
gdcm::SegmentWriter::~SegmentWriter
~SegmentWriter() override
gdcm::SegmentWriter::Segments
SegmentVector Segments
Definition gdcmSegmentWriter.h:58
gdcm::SegmentWriter::GetNumberOfSegments
unsigned int GetNumberOfSegments() const
gdcm::SegmentWriter::GetSegments
SegmentVector & GetSegments()
gdcm::SegmentWriter::SetNumberOfSegments
void SetNumberOfSegments(const unsigned int size)
gdcm::SmartPointer
Class for Smart Pointer.
Definition gdcmSmartPointer.h:40
gdcm::Writer::Writer
Writer()
gdcmSegment.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcmWriter.h
gdcm
Definition gdcmASN1.h:21