gdcmAnonymizer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __gdcmAnonymizer_h
00016 #define __gdcmAnonymizer_h
00017
00018 #include "gdcmFile.h"
00019 #include "gdcmSubject.h"
00020 #include "gdcmEvent.h"
00021 #include "gdcmSmartPointer.h"
00022
00023 namespace gdcm
00024 {
00025 class TagPath;
00026 class CryptographicMessageSyntax;
00027
00063 class GDCM_EXPORT Anonymizer : public Subject
00064 {
00065 public:
00066 Anonymizer():F(new File),CMS(NULL) {}
00067 ~Anonymizer();
00068
00071 bool Empty( Tag const &t );
00072
00073
00074
00076 bool Remove( Tag const &t );
00077
00078
00079
00082 bool Replace( Tag const &t, const char *value );
00083
00086 bool Replace( Tag const &t, const char *value, VL const & vl );
00087
00088
00089
00091 bool RemovePrivateTags();
00092
00094 bool RemoveGroupLength();
00095
00097 bool RemoveRetired();
00098
00099
00100
00101
00103 void SetFile(const File& f) { F = f; }
00104
00105 File &GetFile() { return *F; }
00106
00111 bool BasicApplicationLevelConfidentialityProfile(bool deidentify = true);
00112
00114 void SetCryptographicMessageSyntax( CryptographicMessageSyntax *cms );
00115 const CryptographicMessageSyntax *GetCryptographicMessageSyntax() const;
00116
00118 static SmartPointer<Anonymizer> New() { return new Anonymizer; }
00119
00120 protected:
00121
00122 bool BALCPProtect(DataSet &ds, Tag const & tag);
00123 bool CanEmptyTag(Tag const &tag);
00124 void RecurseDataSet( DataSet & ds );
00125
00126 private:
00127 bool BasicApplicationLevelConfidentialityProfile1();
00128 bool BasicApplicationLevelConfidentialityProfile2();
00129
00130 private:
00131
00132 SmartPointer<File> F;
00133 CryptographicMessageSyntax *CMS;
00134 };
00135
00142 }
00143
00144 #endif //__gdcmAnonymizer_h