GDCM
2.2.3
|
#include <gdcmFileAnonymizer.h>
Public Member Functions | |
FileAnonymizer () | |
~FileAnonymizer () | |
void | Empty (Tag const &t) |
void | Remove (Tag const &t) |
remove a tag (even a SQ can be removed) | |
void | Replace (Tag const &t, const char *value) |
void | Replace (Tag const &t, const char *value, VL const &vl) |
void | SetInputFileName (const char *filename_native) |
Set input filename. | |
void | SetOutputFileName (const char *filename_native) |
Set output filename. | |
bool | Write () |
Write the output file. |
This Anonymizer is a file-based Anonymizer. It requires a valid DICOM file and will use the Value Length to skip over any information.
It will not load the data into memory and should consume much less memory than gdcm::Anonymizer
caveats: This class will NOT work with unordered attributes in a DICOM File.
This class does neither recompute nor update the Group Length element.
This class currently does not update the File Meta Information header
void gdcm::FileAnonymizer::Empty | ( | Tag const & | t | ) |
Make Tag t empty Warning: does not handle SQ element
void gdcm::FileAnonymizer::Remove | ( | Tag const & | t | ) |
remove a tag (even a SQ can be removed)
void gdcm::FileAnonymizer::Replace | ( | Tag const & | t, |
const char * | value | ||
) |
Replace tag with another value, if tag is not found it will be created: WARNING: this function can only execute if tag is a VRASCII WARNING: Do not ever try to write a value in a SQ Data Element !
void gdcm::FileAnonymizer::Replace | ( | Tag const & | t, |
const char * | value, | ||
VL const & | vl | ||
) |
when the value contains \0, it is a good idea to specify the length. This function is required when dealing with VRBINARY tag
void gdcm::FileAnonymizer::SetInputFileName | ( | const char * | filename_native | ) |
Set input filename.
void gdcm::FileAnonymizer::SetOutputFileName | ( | const char * | filename_native | ) |
Set output filename.
bool gdcm::FileAnonymizer::Write | ( | ) |
Write the output file.