gdcmCleaner.h
Go to the documentation of this file.
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html 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 GDCMCLEANER_H
#define GDCMCLEANER_H
#include "gdcmDPath.h"
#include "gdcmFile.h"
#include "gdcmSmartPointer.h"
#include "gdcmSubject.h"
namespace gdcm {
class GDCM_EXPORT Cleaner : public Subject {
public:
Cleaner();
~Cleaner() override;
bool Empty(Tag const &t);
bool Empty(PrivateTag const &pt);
bool Empty(DPath const &dpath);
bool Empty(VR const &vr);
bool Remove(Tag const &t);
bool Remove(PrivateTag const &pt);
bool Remove(DPath const &dpath);
bool Remove(VR const &vr);
bool Scrub(Tag const &t);
bool Scrub(PrivateTag const &pt);
bool Scrub(DPath const &dpath);
bool Scrub(VR const &vr);
bool Preserve(DPath const &dpath);
void RemoveAllMissingPrivateCreator(bool remove);
bool RemoveMissingPrivateCreator(Tag const &t);
void RemoveAllGroupLength(bool remove);
void RemoveAllIllegal(bool remove);
void EmptyWhenScrubFails(bool empty);
bool Clean();
void SetFile(const File &f) { F = f; }
// const File &GetFile() const { return *F; }
File &GetFile() { return *F; }
static SmartPointer<Cleaner> New() { return new Cleaner; }
private:
// I would prefer to have a smart pointer to DataSet but DataSet does not
// derive from Object...
SmartPointer<File> F;
struct impl;
// PIMPL idiom
impl *pimpl;
};
} // end namespace gdcm
#endif // GDCMCLEANER_H
gdcm::Cleaner::Cleaner
Cleaner()
gdcm::Cleaner::RemoveAllMissingPrivateCreator
void RemoveAllMissingPrivateCreator(bool remove)
gdcm::Cleaner::Scrub
bool Scrub(DPath const &dpath)
gdcm::Cleaner::Empty
bool Empty(DPath const &dpath)
gdcm::Cleaner::New
static SmartPointer< Cleaner > New()
for wrapped language: instantiate a reference counted object
Definition gdcmCleaner.h:80
gdcm::Cleaner::Remove
bool Remove(PrivateTag const &pt)
gdcm::Cleaner::Scrub
bool Scrub(PrivateTag const &pt)
gdcm::Cleaner::Clean
bool Clean()
main loop
gdcm::Cleaner::Scrub
bool Scrub(VR const &vr)
gdcm::Cleaner::Scrub
bool Scrub(Tag const &t)
Clean digital tash (typically SIEMENS CSA header):
gdcm::Cleaner::SetFile
void SetFile(const File &f)
Set/Get File.
Definition gdcmCleaner.h:75
gdcm::Cleaner::EmptyWhenScrubFails
void EmptyWhenScrubFails(bool empty)
Should I empty instead of scrub upon failure.
gdcm::Cleaner::RemoveMissingPrivateCreator
bool RemoveMissingPrivateCreator(Tag const &t)
gdcm::Cleaner::~Cleaner
~Cleaner() override
gdcm::Cleaner::Empty
bool Empty(VR const &vr)
gdcm::Cleaner::RemoveAllGroupLength
void RemoveAllGroupLength(bool remove)
Should I remove all group length (deprecated). Default: true.
gdcm::Cleaner::Preserve
bool Preserve(DPath const &dpath)
gdcm::Cleaner::Remove
bool Remove(DPath const &dpath)
gdcm::Cleaner::Empty
bool Empty(PrivateTag const &pt)
gdcm::Cleaner::Remove
bool Remove(VR const &vr)
gdcm::Cleaner::RemoveAllIllegal
void RemoveAllIllegal(bool remove)
Should I remove all illegal attribute. Default: true.
gdcm::Cleaner::GetFile
File & GetFile()
Definition gdcmCleaner.h:77
gdcm::Cleaner::Empty
bool Empty(Tag const &t)
gdcm::Cleaner::Remove
bool Remove(Tag const &t)
gdcm::DPath
class to handle a DICOM path While supp 118 did introduced a notion of XPath for XML Native model thi...
Definition gdcmDPath.h:28
gdcm::File
a DICOM File
Definition gdcmFile.h:34
gdcm::PrivateTag
Class to represent a Private DICOM Data Element (Attribute) Tag (Group, Element, Owner).
Definition gdcmPrivateTag.h:39
gdcm::SmartPointer
Class for Smart Pointer.
Definition gdcmSmartPointer.h:40
gdcm::Subject::Subject
Subject()
gdcm::Tag
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element).
Definition gdcmTag.h:39
gdcm::VR
VR class.
Definition gdcmVR.h:55
gdcmDPath.h
gdcmFile.h
gdcmSmartPointer.h
gdcmSubject.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21