Scanner 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 <gdcmScanner.h>
List of all members.
Detailed Description
Scanner 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 gdcm::StringFilter
- Warning:
- IMPORTANT In case of file where tags are not ordered (illegal as per DICOM specification), the output will be missing information
- Note:
- implementation details. All values are stored in a std::set of std::string. Then the address of the cstring underlying the std::string is used in the std::map.
This class implement the Subject/Observer pattern trigger the following events:
- Examples:
-
DumpToSQLITE3.cxx, SimpleScanner.cxx, SortImage.cxx, and VolumeSorter.cxx.
Member Typedef Documentation
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)
Constructor & Destructor Documentation
gdcm::Scanner::Scanner |
( |
) |
[inline] |
gdcm::Scanner::~Scanner |
( |
) |
|
Member Function Documentation
void gdcm::Scanner::AddPrivateTag |
( |
PrivateTag const & |
t ) |
|
void gdcm::Scanner::AddSkipTag |
( |
Tag const & |
t ) |
|
Add a tag that will need to be skipped. Those are root level skip tags.
void gdcm::Scanner::AddTag |
( |
Tag const & |
t ) |
|
void gdcm::Scanner::ClearSkipTags |
( |
) |
|
void gdcm::Scanner::ClearTags |
( |
) |
|
const char* gdcm::Scanner::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'
Return the list of filename that are key in the internal map, which means those filename were properly parsed
- Examples:
- VolumeSorter.cxx.
TagToValue const& gdcm::Scanner::GetMapping |
( |
const char * |
filename ) |
const |
TagToValue const& gdcm::Scanner::GetMappingFromTagToValue |
( |
Tag const & |
t, |
|
|
const char * |
value |
|
) |
| const |
MappingType const& gdcm::Scanner::GetMappings |
( |
) |
const [inline] |
Mappings are the mapping from a particular tag to the map, mapping filename to value:
const char* gdcm::Scanner::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.
- Warning:
- Tag 't' should have been added via AddTag() prior to the Scan() call !
ValuesType const& gdcm::Scanner::GetValues |
( |
) |
const [inline] |
Get all the values found (in lexicographic order) associated with Tag 't'.
bool gdcm::Scanner::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
- Examples:
- DumpToSQLITE3.cxx, and SimpleScanner.cxx.
for wrapped language: instanciate a reference counted object
void gdcm::Scanner::Print |
( |
std::ostream & |
os ) |
const [virtual] |
void gdcm::Scanner::ProcessPublicTag |
( |
StringFilter & |
sf, |
|
|
const char * |
filename |
|
) |
| [protected] |
Friends And Related Function Documentation
std::ostream& operator<< |
( |
std::ostream & |
_os, |
|
|
const Scanner & |
s |
|
) |
| [friend] |
The documentation for this class was generated from the following file: