#include <gdcmDicomDirStudy.h>
Inheritance diagram for GDCM_NAME_SPACE::DicomDirStudy:
Public Member Functions | |
void | Print (std::ostream &os=std::cout, std::string const &indent="") |
Prints the Object. | |
void | WriteContent (std::ofstream *fp, FileType t, bool insideMetaElements) |
Writes the Object. | |
DicomDirSerie * | NewSerie () |
adds a new Serie at the beginning of the SerieList of a partially created DICOMDIR | |
void | AddSerie (DicomDirSerie *obj) |
Adds a gdcm::DicomDirSerie to a gdcm::DicomDirStudy. | |
void | ClearSerie () |
Remove all series in the study. | |
DicomDirSerie * | GetFirstSerie () |
Get the first entry while visiting the DicomDirSeries. | |
DicomDirSerie * | GetNextSerie () |
Get the next entry while visiting the DicomDirSeries. | |
DicomDirSerie * | GetLastSerie () |
Get the last entry while visiting the DicomDirSeries. | |
int | GetNumberOfSeries () |
returns the number of Series currently held in the gdcm::DicomDirStudy | |
DicomDirVisit * | NewVisit () |
adds a new Visit at the beginning of the VisitList of a partially created DICOMDIR | |
void | AddVisit (DicomDirVisit *obj) |
Adds a gdcm::DicomDirVisit to a gdcm::DicomDirStudy. | |
void | ClearVisit () |
Remove all visits in the study. | |
DicomDirVisit * | GetFirstVisit () |
Get the first entry while visiting the DicomDirVisit. | |
DicomDirVisit * | GetNextVisit () |
Get the next entry while visiting the DicomDirVisit. | |
DicomDirVisit * | GetLastVisit () |
Get the last entry while visiting the DicomDirVisit. | |
int | GetNumberOfVisits () |
returns the number of Visit currently held in the gdcm::DicomDirStudy | |
virtual void | Copy (DocEntrySet *set) |
Copies all the attributes from an other DocEntrySet. | |
uint32_t | ComputeFullLength () |
Compute the full length of the SQItem (not only value length) depending on the VR. | |
bool | AddEntry (DocEntry *Entry) |
Inserts *in the right place* any Entry (Dicom Element) into the Sequence Item. | |
bool | RemoveEntry (DocEntry *EntryToRemove) |
Clear the std::list from given entry AND delete the entry. | |
void | ClearEntry () |
Remove all entry in the Sequence Item. | |
DocEntry * | GetFirstEntry () |
Get the first Dicom entry while visiting the SQItem. | |
DocEntry * | GetNextEntry () |
Get the next Dicom entry while visiting the SQItem. | |
DocEntry * | GetDocEntry (uint16_t group, uint16_t elem) |
Gets a Dicom Element inside a SQ Item Entry. | |
bool | IsEmpty () |
Tells us if the set contains no entry. | |
int | GetSQItemNumber () |
returns the ordinal position of a given SQItem | |
void | SetSQItemNumber (int itemNumber) |
Sets the ordinal position of a given SQItem. | |
int | GetDepthLevel () |
Accessor on SQDepthLevel. | |
void | SetDepthLevel (int depth) |
Accessor on SQDepthLevel. | |
virtual std::string | GetEntryString (uint16_t group, uint16_t elem) |
Get the "std::string representable" value of the Dicom entry. | |
virtual void * | GetEntryBinArea (uint16_t group, uint16_t elem) |
Gets (from Header) a 'non string' element value. | |
virtual int | GetEntryLength (uint16_t group, uint16_t elem) |
Searches within the DocEntrySet for the value length of a given tag.. | |
DataEntry * | GetDataEntry (uint16_t group, uint16_t elem) |
Same as Document::GetDocEntry except it returns a result only when the corresponding entry is of type DataEntry. | |
SeqEntry * | GetSeqEntry (uint16_t group, uint16_t elem) |
Same as Document::GetDocEntry except it returns a result only when the corresponding entry is of type SeqEntry. | |
bool | SetEntryString (std::string const &content, uint16_t group, uint16_t elem) |
Accesses an existing DocEntry (i.e. a Dicom Element) through its (group, element) and modifies its content with the given value. | |
bool | SetEntryString (std::string const &content, DataEntry *entry) |
Accesses an existing DocEntry (i.e. a Dicom Element) and modifies its content with the given value. | |
bool | SetEntryBinArea (uint8_t *content, int lgth, uint16_t group, uint16_t elem) |
Accesses an existing DocEntry (i.e. a Dicom Element) through its (group, element) and modifies its content with the given value. | |
bool | SetEntryBinArea (uint8_t *content, int lgth, DataEntry *entry) |
Accesses an existing DataEntry (i.e. a Dicom Element) and modifies its content with the given value. | |
DataEntry * | InsertEntryString (std::string const &value, uint16_t group, uint16_t elem, VRKey const &vr=GDCM_VRUNKNOWN) |
Modifies the value of a given Doc Entry (Dicom Element) when it exists. Creates it with the given value when unexistant. | |
DataEntry * | InsertEntryBinArea (uint8_t *binArea, int lgth, uint16_t group, uint16_t elem, VRKey const &vr=GDCM_VRUNKNOWN) |
Modifies the value of a given Header Entry (Dicom Element) when it exists. Create it with the given value when unexistant. A copy of the binArea is made to be kept in the Document. | |
SeqEntry * | InsertSeqEntry (uint16_t group, uint16_t elem) |
Creates a new gdcm::SeqEntry and adds it to the current DocEntrySet. (remove any existing entry with same group,elem). | |
virtual bool | CheckIfEntryExist (uint16_t group, uint16_t elem) |
Checks if a given Dicom Element exists within the DocEntrySet. | |
DataEntry * | NewDataEntry (uint16_t group, uint16_t elem, VRKey const &vr=GDCM_VRUNKNOWN) |
Build a new DataEntry from all the low level arguments. | |
SeqEntry * | NewSeqEntry (uint16_t group, uint16_t elem) |
Build a new SeqEntry from all the low level arguments. | |
void | Delete () |
Delete the object. | |
void | Register () |
Register the object. | |
void | Unregister () |
Unregister the object. | |
const unsigned long & | GetRefCount () const |
Get the reference counting. | |
void | SetPrintLevel (int level) |
Sets the print level for the Dicom Header Elements. | |
int | GetPrintLevel () |
Gets the print level for the Dicom Entries. | |
Static Public Member Functions | |
static DicomDirStudy * | New (bool empty=false) |
Constructs a DicomDirStudy with a RefCounter. | |
static SQItem * | New (int depthLevel) |
Protected Member Functions | |
DicomDirStudy (bool empty=false) | |
Constructor. | |
~DicomDirStudy () | |
Canonical destructor. | |
void | FillObject (ListDicomDirMetaElem const &elemList) |
add the 'Object' related Dicom Elements to the listEntries of a partially created DICOMDIR | |
DictEntry * | GetDictEntry (uint16_t group, uint16_t elem) |
Searches [both] the public [and the shadow dictionary (when they exist)] for the presence of the DictEntry with given group and element. The public dictionary has precedence on the shadow one(s), if any. | |
Protected Attributes | |
ListDocEntry | DocEntries |
Chained list of Doc Entries. | |
ListDocEntry::iterator | ItDocEntries |
Iterator, used to visit the entries. | |
DocEntry * | PreviousDocEntry |
To be able to backtrack (Private Sequence, Implicit VR related pb). | |
int | PrintLevel |
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level. | |
Private Member Functions | |
gdcmTypeMacro (DicomDirStudy) | |
Private Attributes | |
ListDicomDirSerie | Series |
chained list of DicomDirSeries (to be exploited hierarchicaly) | |
ListDicomDirSerie::iterator | ItSerie |
iterator on the DicomDirSeries of the current DicomDirStudy | |
ListDicomDirVisit | Visits |
chained list of DicomDirVisits(single level) | |
ListDicomDirVisit::iterator | ItVisit |
iterator on the DicomDirVisits of the current DicomDirStudy |
Definition at line 43 of file gdcmDicomDirStudy.h.
|
Constructor.
Definition at line 34 of file gdcmDicomDirStudy.cxx. References GDCM_NAME_SPACE::DicomDirObject::FillObject(), GDCM_NAME_SPACE::Global::GetDicomDirElements(), and GDCM_NAME_SPACE::DicomDirElement::GetDicomDirStudyElements(). 00035 :DicomDirObject() 00036 { 00037 if ( !empty ) 00038 { 00039 ListDicomDirStudyElem const &elemList = 00040 Global::GetDicomDirElements()->GetDicomDirStudyElements(); 00041 FillObject(elemList); 00042 } 00043 }
|
|
Canonical destructor.
Definition at line 48 of file gdcmDicomDirStudy.cxx. References ClearSerie(). 00049 { 00050 ClearSerie(); 00051 }
|
|
Inserts *in the right place* any Entry (Dicom Element) into the Sequence Item.
Implements GDCM_NAME_SPACE::DocEntrySet. Definition at line 132 of file gdcmSQItem.cxx. References GDCM_NAME_SPACE::SQItem::DocEntries, and GDCM_NAME_SPACE::RefCounter::Register(). Referenced by GDCM_NAME_SPACE::FileHelper::CheckMandatoryElements(), GDCM_NAME_SPACE::DicomDirObject::FillObject(), and GDCM_NAME_SPACE::DicomDir::NewMeta(). 00133 { 00134 if (DocEntries.empty() ) 00135 { 00136 DocEntries.push_back(entry); 00137 entry->Register(); 00138 return true; 00139 } 00140 00141 ListDocEntry::iterator insertSpot; 00142 ListDocEntry::iterator it = DocEntries.end(); 00143 do 00144 { 00145 it--; 00146 00147 if ( (*it)->IsItemDelimitor() ) 00148 { 00149 continue; 00150 } 00151 if ( (*it)->GetGroup() < entry->GetGroup() ) 00152 break; 00153 else 00154 if ( (*it)->GetGroup() == entry->GetGroup() && 00155 (*it)->GetElement() < entry->GetElement() ) 00156 break; 00157 } while (it != DocEntries.begin() ); 00158 00159 ++it; 00160 insertSpot = it; 00161 DocEntries.insert(insertSpot, entry); 00162 entry->Register(); 00163 return true; 00164 }
|
|
Adds a gdcm::DicomDirSerie to a gdcm::DicomDirStudy.
Definition at line 57 of file gdcmDicomDirStudy.h. Referenced by GDCM_NAME_SPACE::DicomDir::AddSerieToEnd(). 00057 { Series.push_back(obj); }
|
|
Adds a gdcm::DicomDirVisit to a gdcm::DicomDirStudy.
Definition at line 68 of file gdcmDicomDirStudy.h. Referenced by GDCM_NAME_SPACE::DicomDir::AddVisitToEnd(). 00068 { Visits.push_back(obj); }
|
|
Checks if a given Dicom Element exists within the DocEntrySet.
Definition at line 412 of file gdcmDocEntrySet.cxx. References GDCM_NAME_SPACE::DocEntrySet::GetDocEntry(). 00413 { 00414 return GetDocEntry(group,elem)!=NULL; 00415 }
|
|
Remove all entry in the Sequence Item.
Implements GDCM_NAME_SPACE::DocEntrySet. Definition at line 192 of file gdcmSQItem.cxx. References GDCM_NAME_SPACE::SQItem::DocEntries. Referenced by GDCM_NAME_SPACE::SQItem::Copy(), and GDCM_NAME_SPACE::SQItem::~SQItem(). 00193 { 00194 for(ListDocEntry::iterator cc = DocEntries.begin(); 00195 cc != DocEntries.end(); 00196 ++cc) 00197 { 00198 (*cc)->Unregister(); 00199 } 00200 DocEntries.clear(); 00201 }
|
|
Remove all series in the study.
Definition at line 94 of file gdcmDicomDirStudy.cxx. References Series. Referenced by Copy(), and ~DicomDirStudy(). 00095 { 00096 for(ListDicomDirSerie::iterator cc = Series.begin(); 00097 cc != Series.end(); 00098 ++cc ) 00099 { 00100 (*cc)->Delete(); 00101 } 00102 Series.clear(); 00103 }
|
|
Remove all visits in the study.
Definition at line 163 of file gdcmDicomDirStudy.cxx. References Visits. Referenced by Copy(). 00164 { 00165 for(ListDicomDirVisit::iterator cc = Visits.begin(); 00166 cc != Visits.end(); 00167 ++cc ) 00168 { 00169 (*cc)->Delete(); 00170 } 00171 Visits.clear(); 00172 }
|
|
Compute the full length of the SQItem (not only value length) depending on the VR.
Definition at line 107 of file gdcmSQItem.cxx. References GDCM_NAME_SPACE::SQItem::DocEntries. 00108 { 00109 uint32_t l = 8; // Item Starter length 00110 for (ListDocEntry::iterator it = DocEntries.begin(); 00111 it != DocEntries.end(); 00112 ++it) 00113 { 00114 // we skip delimitors (start and end one) because 00115 // we force them as 'no length' 00116 if ( (*it)->GetGroup() == 0xfffe ) 00117 { 00118 continue; 00119 } 00120 l += (*it)->ComputeFullLength(); 00121 } 00122 l += 8; // 'Item Delimitation' item 00123 return l; 00124 }
|
|
Copies all the attributes from an other DocEntrySet.
Reimplemented from GDCM_NAME_SPACE::SQItem. Definition at line 221 of file gdcmDicomDirStudy.cxx. References ClearSerie(), ClearVisit(), GDCM_NAME_SPACE::SQItem::Copy(), ItSerie, ItVisit, Series, and Visits. 00222 { 00223 // Remove all previous childs 00224 ClearSerie(); 00225 ClearVisit(); 00226 00227 DicomDirObject::Copy(set); 00228 00229 DicomDirStudy *ddEntry = dynamic_cast<DicomDirStudy *>(set); 00230 if( ddEntry ) 00231 { 00232 Series = ddEntry->Series; 00233 for(ItSerie = Series.begin();ItSerie != Series.end();++ItSerie) 00234 (*ItSerie)->Register(); 00235 00236 Visits = ddEntry->Visits; 00237 for(ItVisit = Visits.begin();ItVisit != Visits.end();++ItVisit) 00238 (*ItVisit)->Register(); 00239 } 00240 }
|
|
|
add the 'Object' related Dicom Elements to the listEntries of a partially created DICOMDIR
Definition at line 56 of file gdcmDicomDirObject.cxx. References GDCM_NAME_SPACE::SQItem::AddEntry(), GDCM_NAME_SPACE::RefCounter::Delete(), GDCM_NAME_SPACE::DataEntry::New(), GDCM_NAME_SPACE::DocEntry::SetOffset(), and GDCM_NAME_SPACE::DataEntry::SetString(). Referenced by GDCM_NAME_SPACE::DicomDirImage::DicomDirImage(), GDCM_NAME_SPACE::DicomDirMeta::DicomDirMeta(), GDCM_NAME_SPACE::DicomDirPatient::DicomDirPatient(), GDCM_NAME_SPACE::DicomDirPrivate::DicomDirPrivate(), GDCM_NAME_SPACE::DicomDirSerie::DicomDirSerie(), DicomDirStudy(), and GDCM_NAME_SPACE::DicomDirVisit::DicomDirVisit(). 00057 { 00058 // FillObject fills up the SQItem that will be connected to the right place 00059 ListDicomDirMetaElem::const_iterator it; 00060 //uint16_t tmpGr,tmpEl; 00061 //DictEntry *dictEntry; 00062 DataEntry *entry; 00063 00064 // for all the Elements found in they own part of the DicomDir dict. 00065 for(it = elemList.begin(); it != elemList.end(); ++it) 00066 { 00067 //tmpGr = it->Group; 00068 //tmpEl = it->Elem; 00069 //dictEntry = Global::GetDicts()->GetDefaultPubDict()->GetEntry(tmpGr,tmpEl); 00070 //entry = DataEntry::New(dictEntry); 00071 entry = DataEntry::New(it->Group, it->Elem, it->VR ); 00072 entry->SetOffset(0); // just to avoid further missprinting 00073 entry->SetString(it->Value); 00074 00075 AddEntry(entry); 00076 entry->Delete(); 00077 } 00078 }
|
|
|
|
|
Accessor on SQDepthLevel.
Definition at line 70 of file gdcmSQItem.h. 00070 { return SQDepthLevel; }
|
|
Searches [both] the public [and the shadow dictionary (when they exist)] for the presence of the DictEntry with given group and element. The public dictionary has precedence on the shadow one(s), if any.
Definition at line 473 of file gdcmDocEntrySet.cxx. References gdcmWarningMacro, GDCM_NAME_SPACE::DictSet::GetDefaultPubDict(), GDCM_NAME_SPACE::Global::GetDicts(), GDCM_NAME_SPACE::Dict::GetEntry(), and GDCM_NAME_SPACE::RefCounter::Register(). Referenced by GDCM_NAME_SPACE::Document::ReadNextDocEntry(). 00474 { 00475 DictEntry *found = 0; 00478 Dict *pubDict = Global::GetDicts()->GetDefaultPubDict(); 00479 if (!pubDict) 00480 { 00481 gdcmWarningMacro( "We SHOULD have a default dictionary"); 00482 } 00483 else 00484 { 00485 found = pubDict->GetEntry(group, elem); 00486 if( found ) 00487 found->Register(); 00488 } 00489 return found; 00490 }
|
|
Gets a Dicom Element inside a SQ Item Entry.
Implements GDCM_NAME_SPACE::DocEntrySet. Definition at line 233 of file gdcmSQItem.cxx. References GDCM_NAME_SPACE::SQItem::DocEntries. Referenced by GDCM_NAME_SPACE::DicomDir::CreateDicomDir(), GDCM_NAME_SPACE::File::GetRescaleSlopeIntercept(), and GDCM_NAME_SPACE::File::GetSpacing(). 00234 { 00235 for(ListDocEntry::iterator i = DocEntries.begin(); 00236 i != DocEntries.end(); 00237 ++i) 00238 { 00239 if ( (*i)->GetGroup() == group && (*i)->GetElement() == elem ) 00240 return *i; 00241 } 00242 return NULL; 00243 }
|
|
Gets (from Header) a 'non string' element value.
Definition at line 73 of file gdcmDocEntrySet.cxx. References GDCM_NAME_SPACE::DataEntry::GetBinArea(), and GDCM_NAME_SPACE::DocEntrySet::GetDataEntry(). 00074 { 00075 DataEntry *entry = GetDataEntry(group, elem); 00076 if ( entry ) 00077 return entry->GetBinArea(); 00078 return 0; 00079 }
|
|
Searches within the DocEntrySet for the value length of a given tag..
Definition at line 88 of file gdcmDocEntrySet.cxx. References GDCM_NAME_SPACE::DocEntrySet::GetDocEntry(), and GDCM_NAME_SPACE::DocEntry::GetLength(). Referenced by GDCM_NAME_SPACE::DicomDir::SetElement(), and GDCM_NAME_SPACE::File::Write(). 00089 { 00090 DocEntry *entry = GetDocEntry(group, elem); 00091 if ( entry ) 00092 return entry->GetLength(); 00093 return -1; 00094 }
|
|
Get the "std::string representable" value of the Dicom entry.
Definition at line 51 of file gdcmDocEntrySet.cxx. References GDCM_NAME_SPACE::GDCM_NOTLOADED, GDCM_NAME_SPACE::GDCM_UNFOUND, GDCM_NAME_SPACE::GDCM_UNREAD, GDCM_NAME_SPACE::DocEntrySet::GetDocEntry(), GDCM_NAME_SPACE::DataEntry::GetString(), GDCM_NAME_SPACE::DataEntry::IsNotLoaded(), GDCM_NAME_SPACE::DataEntry::IsUnfound(), and GDCM_NAME_SPACE::DataEntry::IsUnread(). Referenced by GDCM_NAME_SPACE::SerieHelper::AddFile(), GDCM_NAME_SPACE::File::AnonymizeFile(), GDCM_NAME_SPACE::FileHelper::CheckMandatoryElements(), GDCM_NAME_SPACE::SerieHelper::CreateUniqueSeriesIdentifier(), GDCM_NAME_SPACE::SerieHelper::CreateUserDefinedFileIdentifier(), GDCM_NAME_SPACE::Document::DoTheLoadingDocumentJob(), GDCM_NAME_SPACE::File::DoTheLoadingJob(), GDCM_NAME_SPACE::DirList::Explore(), GDCM_NAME_SPACE::File::GetImageNumber(), GDCM_NAME_SPACE::File::GetImageOrientationPatient(), GDCM_NAME_SPACE::File::GetImagePositionPatient(), GDCM_NAME_SPACE::File::GetLUTNbits(), GDCM_NAME_SPACE::File::GetModality(), GDCM_NAME_SPACE::File::GetNumberOfScalarComponents(), GDCM_NAME_SPACE::File::GetNumberOfScalarComponentsRaw(), GDCM_NAME_SPACE::File::GetPixelSize(), GDCM_NAME_SPACE::File::GetPixelType(), GDCM_NAME_SPACE::File::GetRescaleSlope(), GDCM_NAME_SPACE::File::GetRescaleSlopeIntercept(), GDCM_NAME_SPACE::File::GetSpacing(), GDCM_NAME_SPACE::Document::GetTransferSyntaxName(), GDCM_NAME_SPACE::File::GetXSpacing(), GDCM_NAME_SPACE::File::GetYSpacing(), GDCM_NAME_SPACE::File::IsMonochrome(), GDCM_NAME_SPACE::File::IsMonochrome1(), GDCM_NAME_SPACE::File::IsPaletteColor(), GDCM_NAME_SPACE::File::IsReadable(), GDCM_NAME_SPACE::File::IsYBRFull(), GDCM_NAME_SPACE::Document::operator<(), and GDCM_NAME_SPACE::DicomDir::SetElement(). 00052 { 00053 DataEntry *entry = dynamic_cast<DataEntry *>(GetDocEntry(group,elem)); 00054 if ( entry ) 00055 { 00056 if( entry->IsNotLoaded() ) 00057 return GDCM_NOTLOADED; 00058 if( entry->IsUnfound() ) 00059 return GDCM_UNFOUND; 00060 if( entry->IsUnread() ) 00061 return GDCM_UNREAD; 00062 return entry->GetString(); 00063 } 00064 return GDCM_UNFOUND; 00065 }
|
|
Get the first Dicom entry while visiting the SQItem.
Implements GDCM_NAME_SPACE::DocEntrySet. Definition at line 207 of file gdcmSQItem.cxx. References GDCM_NAME_SPACE::SQItem::DocEntries, and GDCM_NAME_SPACE::SQItem::ItDocEntries. Referenced by GDCM_NAME_SPACE::DicomDirMeta::ComputeGroup0002Length(). 00208 { 00209 ItDocEntries = DocEntries.begin(); 00210 if ( ItDocEntries != DocEntries.end() ) 00211 return *ItDocEntries; 00212 return 0; 00213 }
|
|
Get the first entry while visiting the DicomDirSeries.
Definition at line 109 of file gdcmDicomDirStudy.cxx. References ItSerie, and Series. 00110 { 00111 ItSerie = Series.begin(); 00112 if (ItSerie != Series.end()) 00113 return *ItSerie; 00114 return NULL; 00115 }
|
|
Get the first entry while visiting the DicomDirVisit.
Definition at line 178 of file gdcmDicomDirStudy.cxx. References ItVisit, and Visits. 00179 { 00180 ItVisit = Visits.begin(); 00181 if (ItVisit != Visits.end()) 00182 return *ItVisit; 00183 return NULL; 00184 }
|
|
Get the last entry while visiting the DicomDirSeries.
Definition at line 136 of file gdcmDicomDirStudy.cxx. References ItSerie, and Series. Referenced by GDCM_NAME_SPACE::DicomDir::AddImageToEnd(), and GDCM_NAME_SPACE::DicomDir::AddPrivateToEnd(). 00137 { 00138 ItSerie = Series.end(); 00139 if (ItSerie != Series.begin()) 00140 { 00141 --ItSerie; 00142 return *ItSerie; 00143 } 00144 return NULL; 00145 }
|
|
Get the last entry while visiting the DicomDirVisit.
Definition at line 205 of file gdcmDicomDirStudy.cxx. References ItVisit, and Visits. 00206 { 00207 ItVisit = Visits.end(); 00208 if (ItVisit != Visits.begin()) 00209 { 00210 --ItVisit; 00211 return *ItVisit; 00212 } 00213 return NULL; 00214 }
|
|
Get the next Dicom entry while visiting the SQItem.
Implements GDCM_NAME_SPACE::DocEntrySet. Definition at line 219 of file gdcmSQItem.cxx. References GDCM_NAME_SPACE::SQItem::DocEntries, and GDCM_NAME_SPACE::SQItem::ItDocEntries. Referenced by GDCM_NAME_SPACE::DicomDirMeta::ComputeGroup0002Length(). 00220 { 00221 ++ItDocEntries; 00222 if ( ItDocEntries != DocEntries.end() ) 00223 return *ItDocEntries; 00224 return NULL; 00225 }
|
|
Get the next entry while visiting the DicomDirSeries.
Definition at line 122 of file gdcmDicomDirStudy.cxx. References gdcmAssertMacro, ItSerie, and Series. 00123 { 00124 gdcmAssertMacro (ItSerie != Series.end()); 00125 00126 ++ItSerie; 00127 if (ItSerie != Series.end()) 00128 return *ItSerie; 00129 return NULL; 00130 }
|
|
Get the next entry while visiting the DicomDirVisit.
Definition at line 191 of file gdcmDicomDirStudy.cxx. References gdcmAssertMacro, ItVisit, and Visits. 00192 { 00193 gdcmAssertMacro (ItVisit != Visits.end()); 00194 00195 ++ItVisit; 00196 if (ItVisit != Visits.end()) 00197 return *ItVisit; 00198 return NULL; 00199 }
|
|
returns the number of Series currently held in the gdcm::DicomDirStudy
Definition at line 63 of file gdcmDicomDirStudy.h. 00063 { return Series.size();}
|
|
returns the number of Visit currently held in the gdcm::DicomDirStudy
Definition at line 74 of file gdcmDicomDirStudy.h. 00074 { return Visits.size();}
|
|
Gets the print level for the Dicom Entries.
Definition at line 50 of file gdcmBase.h. 00050 { return PrintLevel; }
|
|
Get the reference counting.
Definition at line 59 of file gdcmRefCounter.h. 00060 { 00061 return RefCount; 00062 }
|
|
Same as Document::GetDocEntry except it returns a result only when the corresponding entry is of type SeqEntry.
Definition at line 119 of file gdcmDocEntrySet.cxx. References GDCM_NAME_SPACE::DocEntrySet::GetDocEntry(). Referenced by GDCM_NAME_SPACE::Document::DoTheLoadingDocumentJob(), GDCM_NAME_SPACE::File::GetRescaleSlopeIntercept(), and GDCM_NAME_SPACE::File::GetSpacing(). 00120 { 00121 DocEntry *currentEntry = GetDocEntry(group, elem); 00122 if ( !currentEntry ) 00123 return NULL; 00124 00125 return dynamic_cast<SeqEntry*>(currentEntry); 00126 }
|
|
returns the ordinal position of a given SQItem
Definition at line 65 of file gdcmSQItem.h. 00065 { return SQItemNumber; }
|
|
Modifies the value of a given Header Entry (Dicom Element) when it exists. Create it with the given value when unexistant. A copy of the binArea is made to be kept in the Document.
Definition at line 290 of file gdcmDocEntrySet.cxx. References GDCM_NAME_SPACE::DocEntrySet::AddEntry(), GDCM_NAME_SPACE::RefCounter::Delete(), gdcmWarningMacro, GDCM_NAME_SPACE::DocEntrySet::GetDocEntry(), GDCM_NAME_SPACE::DocEntry::GetVR(), GDCM_NAME_SPACE::DocEntrySet::NewDataEntry(), GDCM_NAME_SPACE::DocEntrySet::RemoveEntry(), and GDCM_NAME_SPACE::DocEntrySet::SetEntryBinArea(). Referenced by GDCM_NAME_SPACE::FileHelper::InsertEntryBinArea(). 00293 { 00294 DataEntry *dataEntry = 0; 00295 DocEntry *currentEntry = GetDocEntry( group, elem ); 00296 00297 // Verify the currentEntry 00298 if (currentEntry) 00299 { 00300 dataEntry = dynamic_cast<DataEntry *>(currentEntry); 00301 00302 // Verify the VR 00303 if ( dataEntry ) 00304 if ( dataEntry->GetVR()!=vr ) 00305 dataEntry = NULL; 00306 00307 // if currentEntry doesn't correspond to the requested dataEntry 00308 if ( !dataEntry) 00309 { 00310 if ( !RemoveEntry(currentEntry) ) 00311 { 00312 gdcmWarningMacro( "Removal of previous DocEntry failed."); 00313 return NULL; 00314 } 00315 } 00316 } 00317 00318 // Create a new dataEntry if necessary 00319 if ( !dataEntry) 00320 { 00321 dataEntry = NewDataEntry(group, elem, vr); 00322 00323 if ( !AddEntry(dataEntry) ) 00324 { 00325 gdcmWarningMacro( "AddEntry failed although this is a creation."); 00326 dataEntry->Delete(); 00327 return NULL; 00328 } 00329 dataEntry->Delete(); 00330 } 00331 00332 // Set the dataEntry value 00333 uint8_t *tmpArea; 00334 if ( lgth>0 && binArea ) 00335 { 00336 tmpArea = new uint8_t[lgth]; 00337 memcpy(tmpArea,binArea,lgth); 00338 } 00339 else 00340 { 00341 tmpArea = 0; 00342 } 00343 if ( !SetEntryBinArea(tmpArea,lgth,dataEntry) ) 00344 { 00345 if ( tmpArea ) 00346 { 00347 delete[] tmpArea; 00348 } 00349 } 00350 return dataEntry; 00351 }
|
|
Modifies the value of a given Doc Entry (Dicom Element) when it exists. Creates it with the given value when unexistant.
Definition at line 216 of file gdcmDocEntrySet.cxx. References GDCM_NAME_SPACE::DocEntrySet::AddEntry(), GDCM_NAME_SPACE::RefCounter::Delete(), GDCM_NAME_SPACE::GDCM_VRUNKNOWN, gdcmWarningMacro, GDCM_NAME_SPACE::DictSet::GetDefaultPubDict(), GDCM_NAME_SPACE::Global::GetDicts(), GDCM_NAME_SPACE::DocEntrySet::GetDocEntry(), GDCM_NAME_SPACE::Dict::GetEntry(), GDCM_NAME_SPACE::DocEntry::GetKey(), GDCM_NAME_SPACE::DictEntry::GetVR(), GDCM_NAME_SPACE::DocEntry::GetVR(), GDCM_NAME_SPACE::DocEntrySet::NewDataEntry(), GDCM_NAME_SPACE::RefCounter::Register(), GDCM_NAME_SPACE::DocEntrySet::RemoveEntry(), and GDCM_NAME_SPACE::DocEntrySet::SetEntryString(). Referenced by GDCM_NAME_SPACE::FileHelper::InsertEntryString(), GDCM_NAME_SPACE::FileHelper::Write(), and GDCM_NAME_SPACE::File::Write(). 00219 { 00220 DataEntry *dataEntry = 0; 00221 DocEntry *currentEntry = GetDocEntry( group, elem ); 00222 VRKey localVR = vr; 00223 if (currentEntry) 00224 { 00225 dataEntry = dynamic_cast<DataEntry *>(currentEntry); 00226 00227 // Verify the VR 00228 if ( dataEntry ) 00229 if ( dataEntry->GetVR()!=vr ) 00230 dataEntry = NULL; 00231 00232 // if currentEntry doesn't correspond to the requested dataEntry 00233 if ( !dataEntry) 00234 { 00235 if ( !RemoveEntry(currentEntry) ) 00236 { 00237 gdcmWarningMacro( "Removal of previous DocEntry failed."); 00238 return NULL; 00239 } 00240 } 00241 } 00242 00243 else // the 'currentEntry' was not found 00244 { 00245 if ( vr == GDCM_VRUNKNOWN ) // user didn't specify a VR. 00246 // Probabely he trusts the Dicom Dict ! 00247 { 00248 DictEntry *e = 00249 Global::GetDicts()->GetDefaultPubDict()->GetEntry(group, elem); 00250 if ( e ) 00251 { 00252 localVR = e->GetVR(); 00253 e->Register(); // ?? JPRx 00254 } 00255 } 00256 } 00257 00258 // Create a new dataEntry if necessary 00259 if ( !dataEntry ) 00260 { 00261 dataEntry = NewDataEntry( group, elem, localVR ); 00262 00263 if ( !AddEntry(dataEntry) ) 00264 { 00265 gdcmWarningMacro("AddEntry " << dataEntry->GetKey() 00266 << " failed although this is a creation."); 00267 dataEntry->Delete(); 00268 return NULL; 00269 } 00270 dataEntry->Delete(); // ?!? JPRx 00271 } 00272 00273 // Set the dataEntry value 00274 SetEntryString(value, dataEntry); // The std::string value 00275 return dataEntry; 00276 }
|
|
Creates a new gdcm::SeqEntry and adds it to the current DocEntrySet. (remove any existing entry with same group,elem).
Definition at line 361 of file gdcmDocEntrySet.cxx. References GDCM_NAME_SPACE::DocEntrySet::AddEntry(), GDCM_NAME_SPACE::RefCounter::Delete(), gdcmWarningMacro, GDCM_NAME_SPACE::DocEntrySet::GetDocEntry(), GDCM_NAME_SPACE::DocEntrySet::NewSeqEntry(), and GDCM_NAME_SPACE::DocEntrySet::RemoveEntry(). Referenced by GDCM_NAME_SPACE::FileHelper::InsertSeqEntry(). 00362 { 00363 SeqEntry *seqEntry = 0; 00364 DocEntry *currentEntry = GetDocEntry( group, elem ); 00365 00366 // Verify the currentEntry 00367 if ( currentEntry ) 00368 { 00369 seqEntry = dynamic_cast<SeqEntry *>(currentEntry); 00370 00371 // Verify the VR 00372 if ( seqEntry ) 00373 seqEntry = NULL; 00374 00375 // if currentEntry doesn't correspond to the requested seqEntry 00376 if ( !seqEntry ) 00377 { 00378 if (!RemoveEntry(currentEntry)) 00379 { 00380 gdcmWarningMacro( "Removal of previous DocEntry failed for (" 00381 <<std::hex << group << "|" << elem <<")" ); 00382 return NULL; 00383 } 00384 } 00385 } 00386 // Create a new seqEntry if necessary 00387 if ( !seqEntry ) 00388 { 00389 seqEntry = NewSeqEntry(group, elem); 00390 00391 if ( !AddEntry(seqEntry) ) 00392 { 00393 gdcmWarningMacro( "AddEntry failed although this is a creation for (" 00394 <<std::hex << group << "|" << elem <<")" ); 00395 seqEntry->Delete(); 00396 return NULL; 00397 } 00398 seqEntry->Delete(); 00399 } 00400 // Remark : 00401 // SequenceDelimitationItem will be added at the end of the SeqEntry, 00402 // at write time 00403 return seqEntry; 00404 }
|
|
Tells us if the set contains no entry.
Implements GDCM_NAME_SPACE::DocEntrySet. Definition at line 62 of file gdcmSQItem.h. 00062 { return DocEntries.empty(); }
|
|
Definition at line 46 of file gdcmSQItem.h. Referenced by GDCM_NAME_SPACE::FileHelper::CheckMandatoryElements(). 00046 {return new SQItem(depthLevel);}
|
|
Constructs a DicomDirStudy with a RefCounter.
Definition at line 49 of file gdcmDicomDirStudy.h. Referenced by GDCM_NAME_SPACE::DicomDir::CreateDicomDir(), GDCM_NAME_SPACE::DicomDirPatient::NewStudy(), and GDCM_NAME_SPACE::DicomDir::SetElement(). 00049 {return new DicomDirStudy(empty);}
|
|
Build a new DataEntry from all the low level arguments.
Definition at line 425 of file gdcmDocEntrySet.cxx. References gdcmWarningMacro, and GDCM_NAME_SPACE::DataEntry::New(). Referenced by GDCM_NAME_SPACE::FileHelper::CopyDataEntry(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryBinArea(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryString(), and GDCM_NAME_SPACE::Document::ReadNextDocEntry(). 00427 { 00428 00429 DataEntry *newEntry = DataEntry::New(group, elem, vr); 00430 if (!newEntry) 00431 { 00432 gdcmWarningMacro( "Failed to allocate DataEntry for (" 00433 <<std::hex << group << "|" << elem <<")" ); 00434 return 0; 00435 } 00436 return newEntry; 00437 }
|
|
Build a new SeqEntry from all the low level arguments.
Definition at line 445 of file gdcmDocEntrySet.cxx. References gdcmWarningMacro, and GDCM_NAME_SPACE::SeqEntry::New(). Referenced by GDCM_NAME_SPACE::Document::Backtrack(), GDCM_NAME_SPACE::DocEntrySet::InsertSeqEntry(), and GDCM_NAME_SPACE::Document::ReadNextDocEntry(). 00446 { 00447 //DictEntry *dictEntry = GetDictEntry(group, elem, "SQ"); 00448 00449 //SeqEntry *newEntry = SeqEntry::New( dictEntry ); 00450 SeqEntry *newEntry = SeqEntry::New( group, elem ); 00451 //dictEntry->Unregister(); // GetDictEntry register it 00452 if (!newEntry) 00453 { 00454 gdcmWarningMacro( "Failed to allocate SeqEntry for (" 00455 <<std::hex << group << "|" << elem <<")" ); 00456 return 0; 00457 } 00458 return newEntry; 00459 }
|
|
adds a new Serie at the beginning of the SerieList of a partially created DICOMDIR
Definition at line 84 of file gdcmDicomDirStudy.cxx. References GDCM_NAME_SPACE::DicomDirSerie::New(), and Series. 00085 { 00086 DicomDirSerie *dd = DicomDirSerie::New(); 00087 Series.push_back(dd); 00088 return dd; 00089 }
|
|
adds a new Visit at the beginning of the VisitList of a partially created DICOMDIR
Definition at line 152 of file gdcmDicomDirStudy.cxx. References GDCM_NAME_SPACE::RefCounter::Delete(), GDCM_NAME_SPACE::DicomDirVisit::New(), and Visits. 00153 { 00154 DicomDirVisit *dd = DicomDirVisit::New(); 00155 Visits.push_back(dd); 00156 dd->Delete(); 00157 return dd; 00158 }
|
|
Prints the Object.
Reimplemented from GDCM_NAME_SPACE::SQItem. Definition at line 256 of file gdcmDicomDirStudy.cxx. References GDCM_NAME_SPACE::SQItem::Print(), GDCM_NAME_SPACE::Base::PrintLevel, and Series. 00257 { 00258 os << "STUDY" << std::endl; 00259 DicomDirObject::Print(os); 00260 00261 for(ListDicomDirSerie::iterator cc = Series.begin(); 00262 cc != Series.end(); 00263 ++cc) 00264 { 00265 (*cc)->SetPrintLevel(PrintLevel); 00266 (*cc)->Print(os); 00267 } 00268 00269 for(ListDicomDirVisit::iterator cc2 = Visits.begin(); 00270 cc2 != Visits.end(); 00271 ++cc2) 00272 { 00273 (*cc2)->SetPrintLevel(PrintLevel); 00274 (*cc2)->Print(os); 00275 } 00276 00277 }
|
|
Register the object.
Definition at line 46 of file gdcmRefCounter.h. Referenced by GDCM_NAME_SPACE::SQItem::AddEntry(), GDCM_NAME_SPACE::SeqEntry::AddSQItem(), GDCM_NAME_SPACE::SeqEntry::Copy(), GDCM_NAME_SPACE::DicomDir::Copy(), GDCM_NAME_SPACE::FileHelper::FileHelper(), GDCM_NAME_SPACE::DocEntrySet::GetDictEntry(), GDCM_NAME_SPACE::DocEntry::GetName(), GDCM_NAME_SPACE::DocEntry::GetVM(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryString(), GDCM_NAME_SPACE::CommandManager::InSetCommand(), GDCM_NAME_SPACE::DocEntryArchive::Push(), and GDCM_NAME_SPACE::SeqEntry::SetDelimitationItem(). 00046 { RefCount++; }
|
|
Clear the std::list from given entry AND delete the entry.
Implements GDCM_NAME_SPACE::DocEntrySet. Definition at line 171 of file gdcmSQItem.cxx. References GDCM_NAME_SPACE::SQItem::DocEntries, gdcmDebugMacro, GDCM_NAME_SPACE::DocEntry::GetKey(), and GDCM_NAME_SPACE::RefCounter::Unregister(). 00172 { 00173 for(ListDocEntry::iterator it = DocEntries.begin(); 00174 it != DocEntries.end(); 00175 ++it) 00176 { 00177 if ( *it == entryToRemove ) 00178 { 00179 DocEntries.erase(it); 00180 gdcmDebugMacro( "One element erased: " << entryToRemove->GetKey() ); 00181 entryToRemove->Unregister(); 00182 return true; 00183 } 00184 } 00185 gdcmWarningMacro( "Entry not found: " << entryToRemove->GetKey() ); 00186 return false ; 00187 }
|
|
Accessor on SQDepthLevel.
Definition at line 73 of file gdcmSQItem.h. 00073 { SQDepthLevel = depth; }
|
|
Accesses an existing DataEntry (i.e. a Dicom Element) and modifies its content with the given value.
Definition at line 195 of file gdcmDocEntrySet.cxx. References GDCM_NAME_SPACE::DataEntry::SetBinArea(), and GDCM_NAME_SPACE::DocEntry::SetLength(). 00196 { 00197 if (entry) 00198 { 00199 entry->SetLength(lgth); 00200 entry->SetBinArea(content); 00201 return true; 00202 } 00203 return false; 00204 }
|
|
Accesses an existing DocEntry (i.e. a Dicom Element) through its (group, element) and modifies its content with the given value.
Definition at line 158 of file gdcmDocEntrySet.cxx. References gdcmWarningMacro, and GDCM_NAME_SPACE::DocEntrySet::GetDataEntry(). Referenced by GDCM_NAME_SPACE::DocEntrySet::InsertEntryBinArea(), and GDCM_NAME_SPACE::FileHelper::SetEntryBinArea(). 00160 { 00161 DataEntry *entry = GetDataEntry(group, elem); 00162 if (!entry ) 00163 { 00164 gdcmWarningMacro( "No corresponding DataEntry " << std::hex << group << 00165 "," << elem << " element (try promotion first)."); 00166 return false; 00167 } 00168 00169 return SetEntryBinArea(content,lgth,entry); 00170 }
|
|
Accesses an existing DocEntry (i.e. a Dicom Element) and modifies its content with the given value.
Definition at line 178 of file gdcmDocEntrySet.cxx. References GDCM_NAME_SPACE::DataEntry::SetString(). 00179 { 00180 if (entry) 00181 { 00182 entry->SetString(content); 00183 return true; 00184 } 00185 return false; 00186 }
|
|
Accesses an existing DocEntry (i.e. a Dicom Element) through its (group, element) and modifies its content with the given value.
Definition at line 136 of file gdcmDocEntrySet.cxx. References gdcmWarningMacro, and GDCM_NAME_SPACE::DocEntrySet::GetDataEntry(). Referenced by GDCM_NAME_SPACE::File::AnonymizeFile(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryString(), and GDCM_NAME_SPACE::FileHelper::SetEntryString(). 00138 { 00139 DataEntry *entry = GetDataEntry(group, elem); 00140 if (!entry ) 00141 { 00142 gdcmWarningMacro( "No corresponding DataEntry " << std::hex << group << 00143 "," << elem << " element (try promotion first)."); 00144 return false; 00145 } 00146 return SetEntryString(content,entry); 00147 }
|
|
Sets the print level for the Dicom Header Elements.
Definition at line 47 of file gdcmBase.h. Referenced by GDCM_NAME_SPACE::FileHelper::Print(), and GDCM_NAME_SPACE::DicomDir::Print(). 00047 { PrintLevel = level; }
|
|
Sets the ordinal position of a given SQItem.
Definition at line 67 of file gdcmSQItem.h. Referenced by GDCM_NAME_SPACE::SeqEntry::AddSQItem(), and GDCM_NAME_SPACE::DicomDir::NewMeta(). 00067 { SQItemNumber = itemNumber; }
|
|
Unregister the object.
Definition at line 50 of file gdcmRefCounter.h. Referenced by GDCM_NAME_SPACE::Document::ReadNextDocEntry(), GDCM_NAME_SPACE::SQItem::RemoveEntry(), GDCM_NAME_SPACE::ElementSet::RemoveEntry(), and GDCM_NAME_SPACE::FileHelper::~FileHelper(). 00051 { 00052 //std::cout <<"================Unreg " << typeid(*this).name() << std::endl; 00053 RefCount--; 00054 if(RefCount<=0) 00055 delete this; 00056 }
|
|
Writes the Object.
Reimplemented from GDCM_NAME_SPACE::SQItem. Definition at line 61 of file gdcmDicomDirStudy.cxx. References Series, and GDCM_NAME_SPACE::SQItem::WriteContent(). 00062 { 00063 DicomDirObject::WriteContent(fp, t, false); 00064 00065 for(ListDicomDirSerie::iterator cc = Series.begin(); 00066 cc!= Series.end(); 00067 ++cc ) 00068 { 00069 (*cc)->WriteContent( fp, t, false ); 00070 } 00071 00072 for(ListDicomDirVisit::iterator icc = Visits.begin(); 00073 icc!= Visits.end(); 00074 ++icc ) 00075 { 00076 (*icc)->WriteContent( fp, t, false ); 00077 } 00078 }
|
|
Chained list of Doc Entries.
Definition at line 83 of file gdcmSQItem.h. Referenced by GDCM_NAME_SPACE::SQItem::AddEntry(), GDCM_NAME_SPACE::SQItem::ClearEntry(), GDCM_NAME_SPACE::SQItem::ComputeFullLength(), GDCM_NAME_SPACE::SQItem::Copy(), GDCM_NAME_SPACE::SQItem::GetDocEntry(), GDCM_NAME_SPACE::SQItem::GetFirstEntry(), GDCM_NAME_SPACE::SQItem::GetNextEntry(), GDCM_NAME_SPACE::DicomDirVisit::Print(), GDCM_NAME_SPACE::DicomDirPrivate::Print(), GDCM_NAME_SPACE::DicomDirMeta::Print(), GDCM_NAME_SPACE::DicomDirImage::Print(), GDCM_NAME_SPACE::SQItem::RemoveEntry(), and GDCM_NAME_SPACE::DicomDirMeta::WriteContent(). |
|
Iterator, used to visit the entries.
Definition at line 85 of file gdcmSQItem.h. Referenced by GDCM_NAME_SPACE::SQItem::Copy(), GDCM_NAME_SPACE::SQItem::GetFirstEntry(), and GDCM_NAME_SPACE::SQItem::GetNextEntry(). |
|
iterator on the DicomDirSeries of the current DicomDirStudy
Definition at line 97 of file gdcmDicomDirStudy.h. Referenced by Copy(), GetFirstSerie(), GetLastSerie(), and GetNextSerie(). |
|
iterator on the DicomDirVisits of the current DicomDirStudy
Definition at line 102 of file gdcmDicomDirStudy.h. Referenced by Copy(), GetFirstVisit(), GetLastVisit(), and GetNextVisit(). |
|
To be able to backtrack (Private Sequence, Implicit VR related pb).
Definition at line 128 of file gdcmDocEntrySet.h. Referenced by GDCM_NAME_SPACE::Document::Backtrack(), and GDCM_NAME_SPACE::DocEntrySet::DocEntrySet(). |
|
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level.
Definition at line 55 of file gdcmBase.h. Referenced by GDCM_NAME_SPACE::SeqEntry::Print(), GDCM_NAME_SPACE::FileHelper::Print(), GDCM_NAME_SPACE::ElementSet::Print(), GDCM_NAME_SPACE::DocEntry::Print(), GDCM_NAME_SPACE::DictEntry::Print(), Print(), GDCM_NAME_SPACE::DicomDirSerie::Print(), GDCM_NAME_SPACE::DicomDirPatient::Print(), GDCM_NAME_SPACE::DicomDirMeta::Print(), GDCM_NAME_SPACE::DicomDir::Print(), and GDCM_NAME_SPACE::DataEntry::Print(). |
|
chained list of DicomDirSeries (to be exploited hierarchicaly)
Definition at line 95 of file gdcmDicomDirStudy.h. Referenced by ClearSerie(), Copy(), GetFirstSerie(), GetLastSerie(), GetNextSerie(), NewSerie(), Print(), and WriteContent(). |
|
chained list of DicomDirVisits(single level)
Definition at line 100 of file gdcmDicomDirStudy.h. Referenced by ClearVisit(), Copy(), GetFirstVisit(), GetLastVisit(), GetNextVisit(), and NewVisit(). |