* split class gdcmHeader into gdcmParser and gdcmHeader, with gdcmHeader
inheriting from gdcmParser. This split is to prepare the integration
of dicom dir parsing
+ * bug fix under python
2004-01-16 Jean-Pierre Roux
* removal of class gdcmHeaderEntrySet
raise ImportError, "gdcm extension not imported."
### Expose only the necessary stuff
+gdcmGlobal = gdcm.gdcmGlobal
gdcmDictSet = gdcm.gdcmDictSet
gdcmHeader = gdcm.gdcmHeader
gdcmHeaderHelper = gdcm.gdcmHeaderHelper
////////////////////////////////////////////////////////////////////////////
// Deals with function returning a C++ string.
-%typemap(out) string {
- $result = PyString_FromString(($1).c_str());
-}
-%typemap(out) std::string {
+%typemap(out) string, std::string {
$result = PyString_FromString(($1).c_str());
}
+%typemap(python, in) const std::string, std::string
+{
+ $1 = PyString_AsString($input);
+}
////////////////////////////////////////////////////////////////////////////
%include "gdcmCommon.h"
%include "gdcmDictEntry.h"
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\src\gdcmHeaderEntrySet.cxx\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=..\..\src\gdcmHeaderHelper.cxx\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\src\gdcmParse.cxx\r
+SOURCE=..\..\src\gdcmParsePixels.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\gdcmParser.cxx\r
# End Source File\r
# Begin Source File\r
\r
# Begin Special Build Tool\r
ProjDir=.\r
SOURCE="$(InputPath)"\r
-PostBuild_Cmds=move $(ProjDir)\gdcm.py $(ProjDir)\..\ \r
+PostBuild_Cmds=move $(ProjDir)\gdcm.py $(ProjDir)\..\ \r
# End Special Build Tool\r
# Begin Target\r
\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\src\gdcmHeaderEntrySet.cxx\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=..\..\src\gdcmHeaderHelper.cxx\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\src\gdcmParse.cxx\r
+SOURCE=..\..\src\gdcmParsePixels.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\gdcmParser.cxx\r
# End Source File\r
# Begin Source File\r
\r
if ( EntryToDelete )
delete EntryToDelete;
}
- KeyHt.clear();
+
// Since AddNewEntry adds symetrical in both KeyHt and NameHT we can
// assume all the pointed gdcmDictEntries are already cleaned-up when
// we cleaned KeyHt.
+ KeyHt.clear();
NameHt.clear();
}
* Entries will be sorted by tag i.e. the couple (group, element).
* @param os The output stream to be written to.
*/
-void gdcmDict::Print(std::ostream& os) {
+void gdcmDict::Print(std::ostream &os) {
PrintByKey(os);
}
* Entries will be sorted by tag i.e. the couple (group, element).
* @param os The output stream to be written to.
*/
-void gdcmDict::PrintByKey(std::ostream& os) {
+void gdcmDict::PrintByKey(std::ostream &os) {
std::ostringstream s;
for (TagKeyHT::iterator tag = KeyHt.begin(); tag != KeyHt.end(); ++tag){
* @param NewEntry
* @return false if Dicom Element already existed
*/
- bool gdcmDict::AddNewEntry(gdcmDictEntry* NewEntry) {
+bool gdcmDict::AddNewEntry(gdcmDictEntry *NewEntry)
+{
TagKey key;
key = NewEntry->GetKey();
- if(KeyHt.count(key) == 1) {
+ if(KeyHt.count(key) == 1)
+ {
dbg.Verbose(1, "gdcmDict::AddNewEntry already present", key.c_str());
return(false);
- } else {
+ }
+ else
+ {
KeyHt[NewEntry->GetKey()] = NewEntry;
+ NameHt[NewEntry->GetName()] = NewEntry;
return(true);
}
}
* @param NewEntry
* @return false if Dicom Element doesn't exist
*/
-bool gdcmDict::ReplaceEntry(gdcmDictEntry* NewEntry) {
+bool gdcmDict::ReplaceEntry(gdcmDictEntry *NewEntry) {
if ( RemoveEntry(NewEntry->gdcmDictEntry::GetKey()) ) {
- KeyHt[ NewEntry->GetKey()] = NewEntry;
+ KeyHt[NewEntry->GetKey()] = NewEntry;
+ NameHt[NewEntry->GetName()] = NewEntry;
return (true);
}
return (false);
* @param key (group|element)
* @return false if Dicom Dictionary Entry doesn't exist
*/
-bool gdcmDict::RemoveEntry(TagKey key) {
- if(KeyHt.count(key) == 1) {
+bool gdcmDict::RemoveEntry(TagKey key)
+{
+ if(KeyHt.count(key) == 1)
+ {
gdcmDictEntry* EntryToDelete = KeyHt.find(key)->second;
+
if ( EntryToDelete )
+ {
+ NameHt.erase(EntryToDelete->GetName());
delete EntryToDelete;
+ }
+
KeyHt.erase(key);
return (true);
- } else {
+ }
+ else
+ {
dbg.Verbose(1, "gdcmDict::RemoveEntry unfound entry", key.c_str());
return (false);
}
return( RemoveEntry(gdcmDictEntry::TranslateToKey(group, element)) );
}
+/**
+ * \ingroup gdcmDict
+ * \brief Get the dictionnary entry identified by it's name.
+ * @param name element of the ElVal to modify
+ * \warning : NEVER use it !
+ * the 'name' IS NOT an identifier within the Dicom Dicom Dictionary
+ * the name MAY CHANGE between two versions !
+ * @return the corresponding dictionnary entry when existing, NULL otherwise
+ */
+gdcmDictEntry *gdcmDict::GetTagByName(TagName name) {
+ if ( ! NameHt.count(name))
+ return NULL;
+ return NameHt.find(name)->second;
+}
+
/**
* \ingroup gdcmDict
* \brief Get the dictionnary entry identified by a given tag (group,element)
* @param element element of the entry to be found
* @return the corresponding dictionnary entry when existing, NULL otherwise
*/
-gdcmDictEntry * gdcmDict::GetTagByNumber(guint16 group, guint16 element) {
+gdcmDictEntry *gdcmDict::GetTagByNumber(guint16 group, guint16 element) {
TagKey key = gdcmDictEntry::TranslateToKey(group, element);
if ( ! KeyHt.count(key))
- return (gdcmDictEntry*)0;
+ return NULL;
return KeyHt.find(key)->second;
}
-/**
+/**
* \ingroup gdcmDict
- * \brief Get the dictionnary entry identified by it's name.
- * @param name element of the ElVal to modify
- * \warning : NEVER use it !
- * the 'name' IS NOT an identifier within the Dicom Dicom Dictionary
- * the name MAY CHANGE between two versions !
- * @return the corresponding dictionnary entry when existing, NULL otherwise
+ * \brief Consider all the entries of the public dicom dictionnary.
+ * Build all list of all the tag names of all those entries.
+ * \sa gdcmDictSet::GetPubDictTagNamesByCategory
+ * @return A list of all entries of the public dicom dictionnary.
*/
-gdcmDictEntry * gdcmDict::GetTagByName(TagName name) {
- if ( ! NameHt.count(name))
- return (gdcmDictEntry*)0;
- return NameHt.find(name)->second;
+std::list<std::string> *gdcmDict::GetTagNames(void)
+{
+ std::list<std::string> *Result = new std::list<std::string>;
+ for (TagKeyHT::iterator tag = KeyHt.begin(); tag != KeyHt.end(); ++tag)
+ {
+ Result->push_back( tag->second->GetName() );
+ }
+ return Result;
+}
+
+/**
+ * \ingroup gdcmDict
+ * \brief Consider all the entries of the public dicom dictionnary.
+ * Build an hashtable whose keys are the names of the groups
+ * (fourth field in each line of dictionary) and whose corresponding
+ * values are lists of all the dictionnary entries among that
+ * group. Note that apparently the Dicom standard doesn't explicitely
+ * define a name (as a string) for each group.
+ * A typical usage of this method would be to enable a dynamic
+ * configuration of a Dicom file browser: the admin/user can
+ * select in the interface which Dicom tags should be displayed.
+ * \warning Dicom *doesn't* define any name for any 'categorie'
+ * (the dictionnary fourth field was formerly NIH defined
+ * - and no longer he is-
+ * and will be removed when Dicom provides us a text file
+ * with the 'official' Dictionnary, that would be more friendly
+ * than asking us to perform a line by line check of the dictionnary
+ * at the beginning of each year to -try to- guess the changes)
+ * Therefore : please NEVER use that fourth field :-(
+ * *
+ * @return An hashtable: whose keys are the names of the groups and whose
+ * corresponding values are lists of all the dictionnary entries
+ * among that group.
+ */
+std::map<std::string, std::list<std::string> > *gdcmDict::GetTagNamesByCategory(void)
+{
+ std::map<std::string, std::list<std::string> > *Result = new std::map<std::string, std::list<std::string> >;
+
+ for (TagKeyHT::iterator tag = KeyHt.begin(); tag != KeyHt.end(); ++tag)
+ {
+ (*Result)[tag->second->GetFourth()].push_back(tag->second->GetName());
+ }
+ return Result;
}
//-----------------------------------------------------------------------------
#include "gdcmCommon.h"
#include "gdcmDictEntry.h"
+
+#include <iostream>
+#include <list>
#include <map>
//-----------------------------------------------------------------------------
gdcmDict(std::string & FileName);
~gdcmDict();
- void Print(std::ostream&);
- void PrintByKey(std::ostream&);
- void PrintByName(std::ostream&);
+// Print
+ void Print(std::ostream &os = std::cout);
+ void PrintByKey(std::ostream &os = std::cout);
+ void PrintByName(std::ostream &os = std::cout);
- bool AddNewEntry (gdcmDictEntry* NewEntry);
- bool ReplaceEntry(gdcmDictEntry* NewEntry);
+// Entries
+ bool AddNewEntry (gdcmDictEntry *NewEntry);
+ bool ReplaceEntry(gdcmDictEntry *NewEntry);
bool RemoveEntry (TagKey key);
bool RemoveEntry (guint16 group, guint16 element);
- gdcmDictEntry * GetTagByNumber(guint16 group, guint16 element);
+// Tag
gdcmDictEntry * GetTagByName(TagName name);
+ gdcmDictEntry * GetTagByNumber(guint16 group, guint16 element);
+
+ std::list<std::string> *GetTagNames(void);
+ std::map<std::string, std::list<std::string> > *
+ GetTagNamesByCategory(void);
/**
* \ingroup gdcmDict
* \brief returns a ref to the Dicom Dictionary H table (map)
* return the Dicom Dictionary H table
*/
- inline TagKeyHT & gdcmDict::GetEntries(void) {
- return KeyHt;
- }
+ inline TagKeyHT & gdcmDict::GetEntries(void) { return KeyHt; }
private:
std::string name;
std::string filename;
+
/// Access through TagKey (see alternate access with NameHt)
TagKeyHT KeyHt;
/// Access through TagName (see alternate access with KeyHt)
TagNameHT NameHt;
-
};
//-----------------------------------------------------------------------------
* is unset then overwrite it.
* @param NewVr New V(alue) R(epresentation) to be set.
*/
-void gdcmDictEntry::SetVR(std::string NewVr) {
+void gdcmDictEntry::SetVR(std::string NewVr)
+{
if ( IsVRUnknown() )
vr = NewVr;
- else {
+ else
+ {
dbg.Error(true, "gdcmDictEntry::SetVR",
"Overwriting vr might compromise a dictionary");
}
* - the owner group
* - etc.
*/
-class GDCM_EXPORT gdcmDictEntry {
+class GDCM_EXPORT gdcmDictEntry
+{
public:
gdcmDictEntry(guint16 group,
guint16 element,
std::string name = "Unknown");
static TagKey TranslateToKey(guint16 group, guint16 element);
+
void SetVR(std::string);
/**
*
* @return
*/
- inline bool gdcmDictEntry::IsVRUnknown() {
- if ( vr == "Unknown" )
- return true;
- return false;
- }
+ inline bool IsVRUnknown() {return vr == "Unknown"; }
/**
* \ingroup gdcmDictEntry
* \brief returns the Dicom Group Number of the current gdcmDictEntry
* return the Dicom Group Number
*/
- inline guint16 gdcmDictEntry::GetGroup(void) {
- return group;
- }
+ inline guint16 GetGroup(void) { return group; }
/**
* \ingroup gdcmDictEntry
* \brief returns the Dicom Element Number of the current gdcmDictEntry
* return the Dicom Element Number
*/
- inline guint16 gdcmDictEntry::GetElement(void) {
- return element;
- }
+ inline guint16 GetElement(void) { return element; }
/**
* \ingroup gdcmDictEntry
* \brief returns the Dicom Value Representation of the current gdcmDictEntry
* return the Dicom Value Representation
*/
- inline std::string gdcmDictEntry::GetVR(void) {
- return vr;
- }
+ inline std::string GetVR(void) { return vr; }
/**
* \ingroup gdcmDictEntry
* \brief sets the key of the current gdcmDictEntry
* @param k New key to be set.
*/
- inline void gdcmDictEntry::SetKey(std::string k) {
- key = k;
- }
+ inline void SetKey(std::string k) { key = k; }
/**
* \ingroup gdcmDictEntry
* \ NEVER use it
* return the Fourth field
*/
- inline std::string gdcmDictEntry::GetFourth(void) {
- return fourth;
- }
+ inline std::string GetFourth(void) { return fourth; }
/**
* \ingroup gdcmDictEntry
* \ e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010)
* return the Dicom Name
*/
- inline std::string gdcmDictEntry::GetName(void) {
- return name;
- }
+ inline std::string GetName(void) { return name; }
/**
* \ingroup gdcmDictEntry
* \brief Gets the key of the current gdcmDictEntry
* @return the key .
*/
- inline std::string gdcmDictEntry::GetKey(void) {
- return key;
- }
+ inline std::string GetKey(void) { return key; }
private:
// FIXME : were are the group and element used except from building up
// a TagKey. If the answer is nowhere then there is no need
// to store the group and element independently.
- guint16 group; // e.g. 0x0010
- guint16 element; // e.g. 0x0103
- std::string vr; // Value Representation i.e. some clue about the nature
+ guint16 group; // e.g. 0x0010
+ guint16 element; // e.g. 0x0103
+ std::string vr; // Value Representation i.e. some clue about the nature
// of the data represented e.g. "FD" short for
// "Floating Point Double"
// CLEANME: find the official dicom name for this field !
- std::string fourth; // Fourth field containing some semantics.
- //(Group Name abbr.)
- std::string name; // e.g. "Patient_Name"
- TagKey key; // Redundant with (group, element) but we add it
- // on efficiency purposes.
+ std::string fourth; // Fourth field containing some semantics.
+ //(Group Name abbr.)
+ std::string name; // e.g. "Patient_Name"
+ TagKey key; // Redundant with (group, element) but we add it
+ // on efficiency purposes.
// DCMTK has many fields for handling a DictEntry (see below). What are the
// relevant ones for gdcmlib ?
*/
std::list<std::string> *gdcmDictSet::GetPubDictTagNames(void)
{
- std::list<std::string> *Result = new std::list<std::string>;
- TagKeyHT entries = GetDefaultPubDict()->GetEntries();
-
- for (TagKeyHT::iterator tag = entries.begin(); tag != entries.end(); ++tag)
- {
- Result->push_back( tag->second->GetName() );
- }
- return Result;
+ return(GetDefaultPubDict()->GetTagNames());
}
/**
*/
std::map<std::string, std::list<std::string> > *gdcmDictSet::GetPubDictTagNamesByCategory(void)
{
- std::map<std::string, std::list<std::string> > *Result = new std::map<std::string, std::list<std::string> >;
- TagKeyHT entries = GetDefaultPubDict()->GetEntries();
-
- for (TagKeyHT::iterator tag = entries.begin(); tag != entries.end(); ++tag)
- {
- (*Result)[tag->second->GetFourth()].push_back(tag->second->GetName());
- }
- return Result;
+ return(GetDefaultPubDict()->GetTagNamesByCategory());
}
/**
void Print(std::ostream& os);
- std::list<std::string> * GetPubDictTagNames(void);
- std::map<std::string, std::list<std::string> >*
+ std::list<std::string> *GetPubDictTagNames(void);
+ std::map<std::string, std::list<std::string> > *
GetPubDictTagNamesByCategory(void);
void LoadDictFromFile(std::string FileName, DictKey Name);
gdcmDict *GetDefaultPubDict(void);
gdcmDictEntry *NewVirtualDictEntry(guint16 group, guint16 element,
- std::string vr = "Unknown",
+ std::string vr = "Unknown",
std::string fourth = "Unknown",
std::string name = "Unknown");
*/
gdcmParser::~gdcmParser (void)
{
- dicom_vr = (gdcmVR*)0;
- Dicts = (gdcmDictSet*)0;
- RefPubDict = (gdcmDict*)0;
- RefShaDict = (gdcmDict*)0;
+ RefPubDict = NULL;
+ RefShaDict = NULL;
}
//-----------------------------------------------------------------------------
{
std::ostringstream s;
-// guint32 lgth;
-// char greltag[10]; //group element tag
-
s << "------------ using listEntries ----------------" << std::endl;
-
-// char st[20];
for (ListTag::iterator i = listEntries.begin();
i != listEntries.end();
++i)
//-----------------------------------------------------------------------------
// Public
+/**
+ * \ingroup gdcmParser
+ * \brief Get the public dictionary used
+ */
+gdcmDict *gdcmParser::GetPubDict(void)
+{
+ return(RefPubDict);
+}
+
+/**
+ * \ingroup gdcmParser
+ * \brief Get the shadow dictionary used
+ */
+gdcmDict *gdcmParser::GetShaDict(void)
+{
+ return(RefShaDict);
+}
+
+/**
+ * \ingroup gdcmParser
+ * \brief Set the shadow dictionary used
+ * \param dict dictionary to use in shadow
+ */
+bool gdcmParser::SetShaDict(gdcmDict *dict)
+{
+ RefShaDict=dict;
+ return(!RefShaDict);
+}
+
+/**
+ * \ingroup gdcmParser
+ * \brief Set the shadow dictionary used
+ * \param dictName name of the dictionary to use in shadow
+ */
+bool gdcmParser::SetShaDict(DictKey dictName)
+{
+ RefShaDict=gdcmGlobal::GetDicts()->GetDict(dictName);
+ return(!RefShaDict);
+}
+
/**
* \ingroup gdcmParser
* \brief This predicate, based on hopefully reasonable heuristics,
return(SetEntryByNumber(content,dictEntry->GetGroup(),
dictEntry->GetElement()));
-/* TagKey key = gdcmDictEntry::TranslateToKey(dictEntry->GetGroup(),
- dictEntry->GetElement());
- if ( GetPubEntry().count(key) == 0 )
- return false;
-
- int l = content.length();
- if(l%2) // Odd length are padded with a space (020H).
- {
- l++;
- content = content + '\0';
- }
-
- //tagHt[key]->SetValue(content);
- gdcmHeaderEntry * a;
- IterHT p;
- TagHeaderEntryHT::iterator p2;
- // DO NOT remove the following lines : they explain how the stuff works
- //p= tagHt.equal_range(key); // get a pair of iterators first-last synonym
- //p2=p.first; // iterator on the first synonym
- //a=p2->second; // H Table target column (2-nd col)
- // or, easier :
- a = ((GetPubEntry().equal_range(key)).first)->second;
- a-> SetValue(content);
- std::string vr = a->GetVR();
-
- guint32 lgr;
- if( (vr == "US") || (vr == "SS") )
- lgr = 2;
- else if( (vr == "UL") || (vr == "SL") )
- lgr = 4;
- else
- lgr = l;
- a->SetLength(lgr);
- return true;*/
}
/**
if (!NewTag)
{
// This correct tag is not in the dictionary. Create a new one.
- NewTag = Dicts->NewVirtualDictEntry(CorrectGroup, CorrectElem);
+ NewTag = NewVirtualDictEntry(CorrectGroup, CorrectElem);
}
// FIXME this can create a memory leaks on the old entry that be
// left unreferenced.
// CLEANME searching the dicom_vr at each occurence is expensive.
// PostPone this test in an optional integrity check at the end
// of parsing or only in debug mode.
- if ( RealExplicit && !dicom_vr->Count(vr) )
+ if ( RealExplicit && !gdcmGlobal::GetVR()->Count(vr) )
RealExplicit= false;
if ( RealExplicit )
// be unwise to overwrite the VR of a dictionary (since it would
// compromise it's next user), we need to clone the actual DictEntry
// and change the VR for the read one.
- gdcmDictEntry* NewTag = Dicts->NewVirtualDictEntry(ElVal->GetGroup(),
+ gdcmDictEntry* NewTag = NewVirtualDictEntry(ElVal->GetGroup(),
ElVal->GetElement(),
vr,
"FIXME",
*/
void gdcmParser::Initialise(void)
{
- dicom_vr = gdcmGlobal::GetVR();
- dicom_ts = gdcmGlobal::GetTS();
- Dicts = gdcmGlobal::GetDicts();
- RefPubDict = Dicts->GetDefaultPubDict();
+ RefPubDict = gdcmGlobal::GetDicts()->GetDefaultPubDict();
RefShaDict = (gdcmDict*)0;
}
{
gdcmDictEntry *NewTag = GetDictEntryByName(Name);
if (!NewTag)
- NewTag = Dicts->NewVirtualDictEntry(0xffff, 0xffff, "LO", "Unknown", Name);
+ NewTag = NewVirtualDictEntry(0xffff, 0xffff, "LO", "Unknown", Name);
gdcmHeaderEntry* NewElVal = new gdcmHeaderEntry(NewTag);
if (!NewElVal)
return NewElVal;
}
+/**
+ * \ingroup gdcmParser
+ * \brief Request a new virtual dict entry to the dict set
+ * @param Group group of the underlying DictEntry
+ * @param Elem element of the underlying DictEntry
+ * @param VR VR of the underlying DictEntry
+ * @param Fourth owner group
+ * @param Name english name
+ */
+gdcmDictEntry *gdcmParser::NewVirtualDictEntry(guint16 group, guint16 element,
+ std::string vr,
+ std::string fourth,
+ std::string name)
+{
+ return gdcmGlobal::GetDicts()->NewVirtualDictEntry(group,element,vr,fourth,name);
+}
+
/**
* \ingroup gdcmParser
* \brief Build a new Element Value from all the low level arguments.
// Find out if the tag we encountered is in the dictionaries:
gdcmDictEntry *NewTag = GetDictEntryByNumber(Group, Elem);
if (!NewTag)
- NewTag = Dicts->NewVirtualDictEntry(Group, Elem);
+ NewTag = NewVirtualDictEntry(Group, Elem);
gdcmHeaderEntry* NewElVal = new gdcmHeaderEntry(NewTag);
if (!NewElVal)
return NULL;
}
- NewEntry = Dicts->NewVirtualDictEntry(StuffGroup, FreeElem,
+ NewEntry = NewVirtualDictEntry(StuffGroup, FreeElem,
VR, "GDCM", NewTagName);
NewElVal = new gdcmHeaderEntry(NewEntry);
AddHeaderEntry(NewElVal);
* \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy
*/
void SetPrintLevel(int level) { printLevel = level; };
- virtual void PrintPubEntry(std::ostream & os = std::cout);
- virtual void PrintPubDict (std::ostream & os = std::cout);
- virtual void PrintShaDict (std::ostream & os = std::cout);
+ virtual void PrintPubEntry(std::ostream &os = std::cout);
+ virtual void PrintPubDict (std::ostream &os = std::cout);
+ virtual void PrintShaDict (std::ostream &os = std::cout);
-// Standard values and informations contained in the header
+// Standard values
inline std::string GetFileName(void) {return filename;}
+// Dictionnaries
+ gdcmDict *GetPubDict(void);
+ gdcmDict *GetShaDict(void);
+ bool SetShaDict(gdcmDict *dict);
+ bool SetShaDict(DictKey dictName);
+
+// Informations contained in the parser
bool IsReadable(void);
bool IsImplicitVRLittleEndianTransferSyntax(void);
bool IsExplicitVRLittleEndianTransferSyntax(void);
gdcmHeaderEntry *ReadNextHeaderEntry (void);
gdcmHeaderEntry *NewHeaderEntryByNumber(guint16 group, guint16 element);
gdcmHeaderEntry *NewHeaderEntryByName (std::string Name);
+ gdcmDictEntry *NewVirtualDictEntry(guint16 group, guint16 element,
+ std::string vr = "Unknown",
+ std::string fourth = "Unknown",
+ std::string name = "Unknown");
// Deprecated (Not used)
gdcmHeaderEntry *NewManualHeaderEntryToPubDict(std::string NewTagName,
// Refering underlying filename.
std::string filename;
- // Pointer to the Value Representation Hash Table which contains all
- // the VR of the DICOM version3 public dictionary.
- gdcmVR *dicom_vr; // Not a class member for thread-safety reasons
-
- // Pointer to the Transfert Syntax Hash Table which contains all
- // the TS of the DICOM version3 public dictionary.
- gdcmTS *dicom_ts; // Not a class member for thread-safety reasons
-
- // Pointer to global dictionary container
- gdcmDictSet *Dicts; // Not a class member for thread-safety reasons
-
// Public dictionary used to parse this header
gdcmDict *RefPubDict;
-
- // Optional "shadow dictionary" (private elements) used to parse this
- // header
+ // Optional "shadow dictionary" (private elements) used to parse this header
gdcmDict *RefShaDict;
TagHeaderEntryHT tagHT; // H Table (multimap), to provide fast access
ListTag listEntries; // chained list, to keep the 'spacial' ordering
+ int enableSequences;
// true if a gdcmHeaderEntry was added post parsing
int wasUpdated;
- // for PrintHeader
- int printLevel;
-
- int enableSequences;
// Swap code e.g. little, big, bad-big, bad-little endian). Warning:
// this code is not fixed during header parsing.
// this upper bound is fixed to 1024 bytes (which might look reasonable
// when one considers the definition of the various VR contents).
guint32 MaxSizeLoadEntry;
+
+ // for PrintHeader
+ int printLevel;
};
//-----------------------------------------------------------------------------
# Begin Special Build Tool\r
SOURCE="$(InputPath)"\r
PostBuild_Desc=Copy for test\r
-PostBuild_Cmds=copy ..\..\lib\gdcmdll.dll ..\..\gdcmPython\ copy ..\..\lib\gdcmdll.dll ..\..\test\ copy Release\gdcmdll.lib ..\..\lib\ \r
+PostBuild_Cmds=copy ..\..\lib\gdcmdll.dll ..\..\gdcmPython\ copy ..\..\lib\gdcmdll.dll ..\..\test\ copy Release\gdcmdll.lib ..\..\lib\ \r
# End Special Build Tool\r
\r
!ELSEIF "$(CFG)" == "gdcmdll - Win32 Debug"\r
# Begin Special Build Tool\r
SOURCE="$(InputPath)"\r
PostBuild_Desc=Copy for test\r
-PostBuild_Cmds=copy ..\..\lib\gdcmdll.dll ..\..\gdcmPython\ copy ..\..\lib\gdcmdll.dll ..\..\test\ copy Debug\gdcmdll.lib ..\..\lib\ \r
+PostBuild_Cmds=copy ..\..\lib\gdcmdll.dll ..\..\gdcmPython\ copy ..\..\lib\gdcmdll.dll ..\..\test\ copy Debug\gdcmdll.lib ..\..\lib\ \r
# End Special Build Tool\r
\r
!ENDIF \r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\gdcmHeaderEntrySet.cxx\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=..\gdcmHeaderHelper.cxx\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\gdcmParse.cxx\r
+SOURCE=..\gdcmParsePixels.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\gdcmParser.cxx\r
# End Source File\r
# Begin Source File\r
\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\gdcmHeaderEntrySet.h\r
+SOURCE=..\gdcmHeaderHelper.h\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\gdcmHeaderHelper.h\r
+SOURCE=..\gdcmParser.h\r
# End Source File\r
# Begin Source File\r
\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\src\gdcmHeaderEntrySet.cxx\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=..\..\src\gdcmHeaderHelper.cxx\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\src\gdcmParse.cxx\r
+SOURCE=..\..\src\gdcmParsePixels.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\gdcmParser.cxx\r
# End Source File\r
# Begin Source File\r
\r