GDCM 3.2.1

gdcmFileExplicitFilter.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 GDCMFILEEXPLICITFILTER_H
15#define GDCMFILEEXPLICITFILTER_H
16
17#include "gdcmFile.h"
18
19 namespace gdcm
20{
21 class Dicts;
22
38 class GDCM_EXPORT FileExplicitFilter
39{
40 public:
41 FileExplicitFilter():F(new File),ChangePrivateTags(false),UseVRUN(true),RecomputeItemLength(false),RecomputeSequenceLength(false) {}
42 ~FileExplicitFilter() = default;
43
45 void SetChangePrivateTags(bool b) { ChangePrivateTags = b;}
46
48 void SetUseVRUN(bool b) { UseVRUN = b; }
49
51 void SetRecomputeItemLength(bool b);
52 void SetRecomputeSequenceLength(bool b);
53
55
57 bool Change();
58
60 void SetFile(const File& f) { F = f; }
61 File &GetFile() { return *F; }
62
63 protected:
64 bool ProcessDataSet(DataSet &ds, Dicts const & dicts);
65 bool ChangeFMI();
66
67 private:
68 SmartPointer<File> F;
69 bool ChangePrivateTags;
70 bool UseVRUN;
71 bool RecomputeItemLength;
72 bool RecomputeSequenceLength;
73};
74
75
76} // end namespace gdcm
77
78#endif //GDCMFILEEXPLICITFILTER_H
gdcm::DataSet
Class to represent a Data Set (which contains Data Elements)
Definition gdcmDataSet.h:56
gdcm::Dicts
Class to manipulate the sum of knowledge (all the dict user load)
Definition gdcmDicts.h:29
gdcm::FileExplicitFilter::ChangeFMI
bool ChangeFMI()
gdcm::FileExplicitFilter::ProcessDataSet
bool ProcessDataSet(DataSet &ds, Dicts const &dicts)
gdcm::FileExplicitFilter::SetRecomputeSequenceLength
void SetRecomputeSequenceLength(bool b)
gdcm::FileExplicitFilter::SetChangePrivateTags
void SetChangePrivateTags(bool b)
Decide whether or not to VR'ify private tags.
Definition gdcmFileExplicitFilter.h:45
gdcm::FileExplicitFilter::SetUseVRUN
void SetUseVRUN(bool b)
When VR=16bits in explicit but Implicit has a 32bits length, use VR=UN.
Definition gdcmFileExplicitFilter.h:48
gdcm::FileExplicitFilter::~FileExplicitFilter
~FileExplicitFilter()=default
gdcm::FileExplicitFilter::FileExplicitFilter
FileExplicitFilter()
Definition gdcmFileExplicitFilter.h:41
gdcm::FileExplicitFilter::SetRecomputeItemLength
void SetRecomputeItemLength(bool b)
By default set Sequence & Item length to Undefined to avoid recomputing length:
gdcm::FileExplicitFilter::GetFile
File & GetFile()
Definition gdcmFileExplicitFilter.h:61
gdcm::FileExplicitFilter::SetFile
void SetFile(const File &f)
Set/Get File.
Definition gdcmFileExplicitFilter.h:60
gdcm::FileExplicitFilter::Change
bool Change()
Set FMI Transfer Syntax.
gdcm::File
a DICOM File
Definition gdcmFile.h:34
gdcm::SmartPointer
Class for Smart Pointer.
Definition gdcmSmartPointer.h:40
gdcmFile.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21