GDCM 3.0.24
gdcmCleaner.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 GDCMCLEANER_H
15#define GDCMCLEANER_H
16
17#include "gdcmDPath.h"
18#include "gdcmFile.h"
19#include "gdcmSmartPointer.h"
20#include "gdcmSubject.h"
21
22namespace gdcm {
30class GDCM_EXPORT Cleaner : public Subject {
31 public:
33 ~Cleaner() override;
34
36 bool Empty(Tag const &t);
37 bool Empty(PrivateTag const &pt);
38 bool Empty(DPath const &dpath);
39 bool Empty(VR const &vr);
40
41 bool Remove(Tag const &t);
42 bool Remove(PrivateTag const &pt);
43 bool Remove(DPath const &dpath);
44 bool Remove(VR const &vr);
45
47 bool Scrub(Tag const &t);
48 bool Scrub(PrivateTag const &pt);
49 bool Scrub(DPath const &dpath);
50 bool Scrub(VR const &vr);
51
52 bool Preserve(DPath const &dpath);
53
57
61
63 void RemoveAllGroupLength(bool remove);
64
66 void RemoveAllIllegal(bool remove);
67
69 void EmptyWhenScrubFails(bool empty);
70
72 bool Clean();
73
75 void SetFile(const File &f) { F = f; }
76 // const File &GetFile() const { return *F; }
77 File &GetFile() { return *F; }
78
80 static SmartPointer<Cleaner> New() { return new Cleaner; }
81
82 private:
83 // I would prefer to have a smart pointer to DataSet but DataSet does not
84 // derive from Object...
86 struct impl;
87 // PIMPL idiom
88 impl *pimpl;
89};
90
91} // end namespace gdcm
92
93#endif // GDCMCLEANER_H
Cleaner.
Definition gdcmCleaner.h:30
void RemoveAllMissingPrivateCreator(bool remove)
bool Scrub(DPath const &dpath)
bool Empty(DPath const &dpath)
static SmartPointer< Cleaner > New()
for wrapped language: instantiate a reference counted object
Definition gdcmCleaner.h:80
bool Remove(PrivateTag const &pt)
bool Scrub(PrivateTag const &pt)
bool Clean()
main loop
bool Scrub(VR const &vr)
bool Scrub(Tag const &t)
Clean digital tash (typically SIEMENS CSA header):
void SetFile(const File &f)
Set/Get File.
Definition gdcmCleaner.h:75
void EmptyWhenScrubFails(bool empty)
Should I empty instead of scrub upon failure.
bool RemoveMissingPrivateCreator(Tag const &t)
~Cleaner() override
bool Empty(VR const &vr)
void RemoveAllGroupLength(bool remove)
Should I remove all group length (deprecated). Default: true.
bool Preserve(DPath const &dpath)
bool Remove(DPath const &dpath)
bool Empty(PrivateTag const &pt)
bool Remove(VR const &vr)
void RemoveAllIllegal(bool remove)
Should I remove all illegal attribute. Default: true.
File & GetFile()
Definition gdcmCleaner.h:77
bool Empty(Tag const &t)
bool Remove(Tag const &t)
class to handle a DICOM path While supp 118 did introduced a notion of XPath for XML Native model thi...
Definition gdcmDPath.h:28
a DICOM File
Definition gdcmFile.h:34
Class to represent a Private DICOM Data Element (Attribute) Tag (Group, Element, Owner)
Definition gdcmPrivateTag.h:39
Class for Smart Pointer.
Definition gdcmSmartPointer.h:40
Subject.
Definition gdcmSubject.h:29
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element).
Definition gdcmTag.h:39
VR class.
Definition gdcmVR.h:55
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21