GDCM  2.2.6
Public Member Functions | List of all members
gdcm::FileAnonymizer Class Reference

FileAnonymizer. More...

#include <gdcmFileAnonymizer.h>

Inheritance diagram for gdcm::FileAnonymizer:
Inheritance graph
[legend]
Collaboration diagram for gdcm::FileAnonymizer:
Collaboration graph
[legend]

Public Member Functions

 FileAnonymizer ()
 
 ~FileAnonymizer ()
 
void Empty (Tag const &t)
 
void Remove (Tag const &t)
 remove a tag (even a SQ can be removed) More...
 
void Replace (Tag const &t, const char *value_str)
 
void Replace (Tag const &t, const char *value_data, VL const &vl)
 
void SetInputFileName (const char *filename_native)
 Set input filename. More...
 
void SetOutputFileName (const char *filename_native)
 Set output filename. More...
 
bool Write ()
 Write the output file. More...
 
- Public Member Functions inherited from gdcm::Subject
 Subject ()
 
 ~Subject ()
 
unsigned long AddObserver (const Event &event, Command *)
 
unsigned long AddObserver (const Event &event, Command *) const
 
CommandGetCommand (unsigned long tag)
 
bool HasObserver (const Event &event) const
 
void InvokeEvent (const Event &)
 
void InvokeEvent (const Event &) const
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
- Public Member Functions inherited from gdcm::Object
 Object ()
 
 Object (const Object &)
 Special requirement for copy/cstor, assigment operator. More...
 
virtual ~Object ()
 
void operator= (const Object &)
 
virtual void Print (std::ostream &) const
 

Additional Inherited Members

- Protected Member Functions inherited from gdcm::Object
void Register ()
 
void UnRegister ()
 

Detailed Description

FileAnonymizer.

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 DICOM dataset taken from SetInputFileName() into memory and should consume much less memory than gdcm::Anonymizer.

Warning
: Each time you call Replace() with a value. This value will copied, and stored in memory. The behavior is not ideal for extremely large data (larger than memory size). This class is really meant to take a large DICOM input file and then only changed some small attribute.

caveats:

Examples:
FileAnonymize.cs, and FileChangeTS.cs.

Constructor & Destructor Documentation

gdcm::FileAnonymizer::FileAnonymizer ( )
gdcm::FileAnonymizer::~FileAnonymizer ( )

Member Function Documentation

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_str 
)

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_data,
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.


The documentation for this class was generated from the following file:

Generated on Sat Dec 21 2013 05:56:21 for GDCM by doxygen 1.8.5
SourceForge.net Logo