/usr/include/vtkDICOMSequence.h is in libvtk-dicom-dev 0.7.10-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | /*=========================================================================
Program: DICOM for VTK
Copyright (c) 2012-2015 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef vtkDICOMSequence_h
#define vtkDICOMSequence_h
#include "vtkDICOMModule.h" // For export macro
#include "vtkDICOMValue.h"
class vtkDICOMItem;
class vtkDICOMTagPath;
//! A sequence of items according to the SQ representation.
/*!
* This class is for constructing and decoding sequences.
* There are two ways that sequences can be constructed:
* A fixed-size sequence can be created and then its items
* filled in with the SetItem() method, or, you can start
* with an empty sequence and use AddItem() to append items.
*/
class VTKDICOM_EXPORT vtkDICOMSequence
{
public:
//@{
//! Construct a growable sequence with no items.
vtkDICOMSequence();
//! Construct a sequence of fixed size.
explicit vtkDICOMSequence(unsigned int n);
//@}
//@{
//! Clear a sequence, remove its contents and make it empty.
void Clear();
//@}
//@{
//! Get a value from an item in the sequence.
const vtkDICOMValue &GetAttributeValue(
size_t i, vtkDICOMTag tag) const;
const vtkDICOMValue &GetAttributeValue(
size_t i, const vtkDICOMTagPath &p) const;
//@}
//@{
//! Add an item to the sequence.
/*!
* After calling this method, GetNumberOfItems() will report
* the number of items in the sequence, but GetVL() will return
* the special value 0xffffffff to indicate that this is a delimited
* sequence rather than a fixed-size sequence.
*/
void AddItem(const vtkDICOMItem& item);
//! Get the number of items in the sequence.
size_t GetNumberOfItems() const {
return this->V.GetNumberOfValues(); }
//@}
//@{
//! Set an item in the sequence.
/*!
* This method can only be used if space as been allocated within
* the sequence by specifying a size when calling the constructor.
*/
void SetItem(size_t i, const vtkDICOMItem& item);
//! Get an item from the sequence.
const vtkDICOMItem& GetItem(size_t i) const;
//! Get a pointer to the items in the sequence.
const vtkDICOMItem *GetSequenceData() const {
return this->V.GetSequenceData(); }
//@}
//@{
//! Copy constructor.
vtkDICOMSequence(const vtkDICOMSequence& o) : V(o.V) {}
//! Conversion from value to sequence is type checked.
vtkDICOMSequence(const vtkDICOMValue& o) : V(o) {
if (o.GetVR() != vtkDICOMVR::SQ) { this->V.Clear(); } }
//! Check that the sequence was constructed from a valid value.
bool IsValid() const {
return this->V.IsValid(); }
//@}
//@{
//! Assignment operator.
vtkDICOMSequence& operator=(const vtkDICOMSequence& o) {
this->V = o.V; return *this; }
//! Assignment from value to sequence is type checked.
vtkDICOMSequence& operator=(const vtkDICOMValue& o) {
if (o.GetVR() == vtkDICOMVR::SQ) { this->V = o; }
else { this->V.Clear(); } return *this; }
//@}
private:
friend class vtkDICOMValue;
vtkDICOMValue V;
//! An invalid value, for when one is needed.
static const vtkDICOMValue InvalidValue;
//! An empty item, for when one is needed.
static const vtkDICOMItem EmptyItem;
};
VTKDICOM_EXPORT ostream& operator<<(ostream& os, const vtkDICOMSequence& v);
#endif /* vtkDICOMSequence_h */
// VTK-HeaderTest-Exclude: vtkDICOMSequence.h
|