GDCM
2.4.5
|
StrictScanner This filter is meant for quickly browsing a FileSet (a set of files on disk). Special consideration are taken so as to read the mimimum amount of information in each file in order to retrieve the user specified set of DICOM Attribute. More...
#include <gdcmStrictScanner.h>
Classes | |
struct | ltstr |
Public Types | |
typedef MappingType::const_iterator | ConstIterator |
typedef std::map< const char *, TagToValue, ltstr > | MappingType |
typedef std::map< Tag, const char * > | TagToValue |
typedef TagToValue::value_type | TagToValueValueType |
typedef std::set< std::string > | ValuesType |
Public Member Functions | |
StrictScanner () | |
~StrictScanner () | |
void | AddPrivateTag (PrivateTag const &t) |
void | AddSkipTag (Tag const &t) |
Add a tag that will need to be skipped. Those are root level skip tags. More... | |
void | AddTag (Tag const &t) |
Add a tag that will need to be read. Those are root level skip tags. More... | |
ConstIterator | Begin () const |
void | ClearSkipTags () |
void | ClearTags () |
ConstIterator | End () const |
Directory::FilenamesType | GetAllFilenamesFromTagToValue (Tag const &t, const char *valueref) const |
const char * | GetFilenameFromTagToValue (Tag const &t, const char *valueref) const |
Directory::FilenamesType const & | GetFilenames () const |
Directory::FilenamesType | GetKeys () const |
TagToValue const & | GetMapping (const char *filename) const |
Get the std::map mapping filenames to value for file 'filename'. More... | |
TagToValue const & | GetMappingFromTagToValue (Tag const &t, const char *value) const |
See GetFilenameFromTagToValue(). This is simply GetFilenameFromTagToValue followed. More... | |
MappingType const & | GetMappings () const |
Mappings are the mapping from a particular tag to the map, mapping filename to value: More... | |
Directory::FilenamesType | GetOrderedValues (Tag const &t) const |
const char * | GetValue (const char *filename, Tag const &t) const |
ValuesType const & | GetValues () const |
Get all the values found (in lexicographic order) More... | |
ValuesType | GetValues (Tag const &t) const |
Get all the values found (in lexicographic order) associated with Tag 't'. More... | |
bool | IsKey (const char *filename) const |
void | Print (std::ostream &os) const |
Print result. More... | |
bool | Scan (Directory::FilenamesType const &filenames) |
Start the scan ! More... | |
![]() | |
Subject () | |
~Subject () | |
unsigned long | AddObserver (const Event &event, Command *) |
unsigned long | AddObserver (const Event &event, Command *) const |
Command * | GetCommand (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) |
![]() | |
Object () | |
Object (const Object &) | |
Special requirement for copy/cstor, assignment operator. More... | |
virtual | ~Object () |
void | operator= (const Object &) |
Static Public Member Functions | |
static SmartPointer< StrictScanner > | New () |
for wrapped language: instanciate a reference counted object More... | |
Protected Member Functions | |
void | ProcessPublicTag (StringFilter &sf, const char *filename) |
![]() | |
void | Register () |
void | UnRegister () |
Friends | |
std::ostream & | operator<< (std::ostream &_os, const StrictScanner &s) |
StrictScanner This filter is meant for quickly browsing a FileSet (a set of files on disk). Special consideration are taken so as to read the mimimum amount of information in each file in order to retrieve the user specified set of DICOM Attribute.
This filter is dealing with both VRASCII and VRBINARY element, thanks to the help of StringFilter
This class implement the Subject/Observer pattern trigger the following events:
typedef MappingType::const_iterator gdcm::StrictScanner::ConstIterator |
typedef std::map<const char *,TagToValue, ltstr> gdcm::StrictScanner::MappingType |
typedef std::map<Tag, const char*> gdcm::StrictScanner::TagToValue |
struct to map a filename to a value Implementation note: all std::map in this class will be using const char * and not std::string since we are pointing to existing std::string (hold in a std::vector) this avoid an extra copy of the byte array. Tag are used as Tag class since sizeof(tag) <= sizeof(pointer)
typedef TagToValue::value_type gdcm::StrictScanner::TagToValueValueType |
typedef std::set< std::string > gdcm::StrictScanner::ValuesType |
|
inline |
gdcm::StrictScanner::~StrictScanner | ( | ) |
void gdcm::StrictScanner::AddPrivateTag | ( | PrivateTag const & | t | ) |
void gdcm::StrictScanner::AddSkipTag | ( | Tag const & | t | ) |
Add a tag that will need to be skipped. Those are root level skip tags.
void gdcm::StrictScanner::AddTag | ( | Tag const & | t | ) |
Add a tag that will need to be read. Those are root level skip tags.
|
inline |
void gdcm::StrictScanner::ClearSkipTags | ( | ) |
void gdcm::StrictScanner::ClearTags | ( | ) |
|
inline |
Directory::FilenamesType gdcm::StrictScanner::GetAllFilenamesFromTagToValue | ( | Tag const & | t, |
const char * | valueref | ||
) | const |
Will loop over all files and return a vector of std::strings of filenames where value match the reference value 'valueref'
const char* gdcm::StrictScanner::GetFilenameFromTagToValue | ( | Tag const & | t, |
const char * | valueref | ||
) | const |
Will loop over all files and return the first file where value match the reference value 'valueref'
|
inline |
Directory::FilenamesType gdcm::StrictScanner::GetKeys | ( | ) | const |
Return the list of filename that are key in the internal map, which means those filename were properly parsed
TagToValue const& gdcm::StrictScanner::GetMapping | ( | const char * | filename | ) | const |
Get the std::map mapping filenames to value for file 'filename'.
TagToValue const& gdcm::StrictScanner::GetMappingFromTagToValue | ( | Tag const & | t, |
const char * | value | ||
) | const |
See GetFilenameFromTagToValue(). This is simply GetFilenameFromTagToValue followed.
|
inline |
Mappings are the mapping from a particular tag to the map, mapping filename to value:
Directory::FilenamesType gdcm::StrictScanner::GetOrderedValues | ( | Tag const & | t | ) | const |
Get all the values found (in a vector) associated with Tag 't' This function is identical to GetValues, but is accessible from the wrapped layer (python, C#, java)
const char* gdcm::StrictScanner::GetValue | ( | const char * | filename, |
Tag const & | t | ||
) | const |
Retrieve the value found for tag: t associated with file: filename This is meant for a single short call. If multiple calls (multiple tags) should be done, prefer the GetMapping function, and then reuse the TagToValue hash table.
|
inline |
Get all the values found (in lexicographic order)
ValuesType gdcm::StrictScanner::GetValues | ( | Tag const & | t | ) | const |
Get all the values found (in lexicographic order) associated with Tag 't'.
bool gdcm::StrictScanner::IsKey | ( | const char * | filename | ) | const |
Check if filename is a key in the Mapping table. returns true only of file can be found, which means the file was indeed a DICOM file that could be processed
|
inlinestatic |
for wrapped language: instanciate a reference counted object
|
virtual |
|
protected |
bool gdcm::StrictScanner::Scan | ( | Directory::FilenamesType const & | filenames | ) |
Start the scan !
|
friend |