Program: gdcm
Module: $RCSfile: gdcmDataEntry.cxx,v $
Language: C++
- Date: $Date: 2005/11/21 12:15:06 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2005/11/29 12:48:45 $
+ Version: $Revision: 1.24 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
return StrArea;
}
+
/**
- * \brief Copies all the attributes from an other DocEntry
+ * \brief Copies all the attributes from an other DocEntry
* @param doc entry to copy from
+ * @remarks The content BinArea is copied too
*/
void DataEntry::Copy(DocEntry *doc)
{
CopyBinArea(entry->BinArea,entry->GetLength());
}
}
+
/**
* \brief Writes the 'value' area of a DataEntry
* @param fp already open ofstream pointer
Program: gdcm
Module: $RCSfile: gdcmDataEntry.h,v $
Language: C++
- Date: $Date: 2005/11/21 09:46:25 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2005/11/29 12:48:45 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// \brief true id Entry is a Pixel Data entry
bool IsPixelData() { return (Flag &FLAG_PIXELDATA) != 0; }
- void Copy(DocEntry *doc);
+ virtual void Copy(DocEntry *doc);
/// \brief returns the size threshold above which an element value
/// will NOT be *printed* in order no to polute the screen output
Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/11/28 16:31:23 $
- Version: $Revision: 1.175 $
+ Date: $Date: 2005/11/29 12:48:45 $
+ Version: $Revision: 1.176 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* \brief Constructor : creates an empty DicomDir
*/
DicomDir::DicomDir()
- :Document( )
{
Initialize(); // sets all private fields to NULL
ParseDir = false;
return true;
}
+/**
+ * \brief Copies all the attributes from an other DocEntrySet
+ * @param set entry to copy from
+ * @remarks The contained DocEntries a not copied, only referenced
+ */
+void DicomDir::Copy(DocEntrySet *set)
+{
+ // Remove all previous childs
+ ClearPatient();
+
+ Document::Copy(set);
+
+ DicomDir *dd = dynamic_cast<DicomDir *>(set);
+ if( dd )
+ {
+ if(MetaElems)
+ MetaElems->Unregister();
+ MetaElems = dd->MetaElems;
+ if(MetaElems)
+ MetaElems->Register();
+
+ Patients = dd->Patients;
+ for(ItPatient = Patients.begin();ItPatient != Patients.end();++ItPatient)
+ (*ItPatient)->Register();
+ }
+}
+
//-----------------------------------------------------------------------------
// Protected
/**
continue;
}
if ( si )
- si->MoveObject(tmpSI); // New code : Copies the List
+ si->Copy(tmpSI);
tmpSI=s->GetNextSQItem();
}
Program: gdcm
Module: $RCSfile: gdcmDicomDir.h,v $
Language: C++
- Date: $Date: 2005/11/28 15:20:32 $
- Version: $Revision: 1.71 $
+ Date: $Date: 2005/11/29 12:48:46 $
+ Version: $Revision: 1.72 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bool Anonymize();
+ virtual void Copy(DocEntrySet *set);
+
/// Types of the DicomDirObject within the DicomDir
typedef enum
{
Program: gdcm
Module: $RCSfile: gdcmDicomDirPatient.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:33 $
- Version: $Revision: 1.39 $
+ Date: $Date: 2005/11/29 12:48:46 $
+ Version: $Revision: 1.40 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return NULL;
}
+/**
+ * \brief Copies all the attributes from an other DocEntrySet
+ * @param set entry to copy from
+ * @remarks The contained DocEntries a not copied, only referenced
+ */
+void DicomDirPatient::Copy(DocEntrySet *set)
+{
+ // Remove all previous childs
+ ClearStudy();
+
+ DicomDirObject::Copy(set);
+
+ DicomDirPatient *ddEntry = dynamic_cast<DicomDirPatient *>(set);
+ if( ddEntry )
+ {
+ Studies = ddEntry->Studies;
+ for(ItStudy = Studies.begin();ItStudy != Studies.end();++ItStudy)
+ (*ItStudy)->Register();
+ }
+}
+
//-----------------------------------------------------------------------------
// Protected
Program: gdcm
Module: $RCSfile: gdcmDicomDirPatient.h,v $
Language: C++
- Date: $Date: 2005/11/21 09:46:25 $
- Version: $Revision: 1.29 $
+ Date: $Date: 2005/11/29 12:48:46 $
+ Version: $Revision: 1.30 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
DicomDirStudy *GetNextStudy();
DicomDirStudy *GetLastStudy();
+ virtual void Copy(DocEntrySet *set);
+
protected:
DicomDirPatient(bool empty=false);
~DicomDirPatient();
Program: gdcm
Module: $RCSfile: gdcmDicomDirSerie.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:33 $
- Version: $Revision: 1.39 $
+ Date: $Date: 2005/11/29 12:48:46 $
+ Version: $Revision: 1.40 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return NULL;
}
+/**
+ * \brief Copies all the attributes from an other DocEntrySet
+ * @param set entry to copy from
+ * @remarks The contained DocEntries a not copied, only referenced
+ */
+void DicomDirSerie::Copy(DocEntrySet *set)
+{
+ // Remove all previous childs
+ ClearImage();
+
+ DicomDirObject::Copy(set);
+
+ DicomDirSerie *ddEntry = dynamic_cast<DicomDirSerie *>(set);
+ if( ddEntry )
+ {
+ Images = ddEntry->Images;
+ for(ItImage = Images.begin();ItImage != Images.end();++ItImage)
+ (*ItImage)->Register();
+ }
+}
+
//-----------------------------------------------------------------------------
// Protected
Program: gdcm
Module: $RCSfile: gdcmDicomDirSerie.h,v $
Language: C++
- Date: $Date: 2005/11/21 09:46:25 $
- Version: $Revision: 1.31 $
+ Date: $Date: 2005/11/29 12:48:46 $
+ Version: $Revision: 1.32 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
DicomDirImage *GetFirstImage();
DicomDirImage *GetNextImage();
+ virtual void Copy(DocEntrySet *set);
+
protected:
DicomDirSerie(bool empty=false);
~DicomDirSerie();
Program: gdcm
Module: $RCSfile: gdcmDicomDirStudy.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:33 $
- Version: $Revision: 1.41 $
+ Date: $Date: 2005/11/29 12:48:46 $
+ Version: $Revision: 1.42 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return NULL;
}
+/**
+ * \brief Copies all the attributes from an other DocEntrySet
+ * @param set entry to copy from
+ * @remarks The contained DocEntries a not copied, only referenced
+ */
+void DicomDirStudy::Copy(DocEntrySet *set)
+{
+ // Remove all previous childs
+ ClearSerie();
+ ClearVisit();
+
+ DicomDirObject::Copy(set);
+
+ DicomDirStudy *ddEntry = dynamic_cast<DicomDirStudy *>(set);
+ if( ddEntry )
+ {
+ Series = ddEntry->Series;
+ for(ItSerie = Series.begin();ItSerie != Series.end();++ItSerie)
+ (*ItSerie)->Register();
+
+ Visits = ddEntry->Visits;
+ for(ItVisit = Visits.begin();ItVisit != Visits.end();++ItVisit)
+ (*ItVisit)->Register();
+ }
+}
+
//-----------------------------------------------------------------------------
// Protected
Program: gdcm
Module: $RCSfile: gdcmDicomDirStudy.h,v $
Language: C++
- Date: $Date: 2005/11/21 09:46:25 $
- Version: $Revision: 1.31 $
+ Date: $Date: 2005/11/29 12:48:46 $
+ Version: $Revision: 1.32 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
DicomDirStudyComponent *GetLastStudyComponent();
*/
+ virtual void Copy(DocEntrySet *set);
+
protected:
DicomDirStudy(bool empty=false);
~DicomDirStudy();
Program: gdcm
Module: $RCSfile: gdcmDocEntry.cxx,v $
Language: C++
- Date: $Date: 2005/11/21 12:15:06 $
- Version: $Revision: 1.78 $
+ Date: $Date: 2005/11/29 12:48:46 $
+ Version: $Revision: 1.79 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
/**
- * \brief Copies all the attributes from an other DocEntry
+ * \brief Copies all the attributes from an other DocEntry
* @param doc entry to copy from
*/
void DocEntry::Copy(DocEntry *doc)
Program: gdcm
Module: $RCSfile: gdcmDocEntry.h,v $
Language: C++
- Date: $Date: 2005/11/28 16:31:23 $
- Version: $Revision: 1.58 $
+ Date: $Date: 2005/11/29 12:48:46 $
+ Version: $Revision: 1.59 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bool IsItemDelimitor();
bool IsItemStarter();
bool IsSequenceDelimitor();
-
- virtual void Copy(DocEntry *e);
+
+ virtual void Copy(DocEntry *doc);
protected:
DocEntry(DictEntry*);
Program: gdcm
Module: $RCSfile: gdcmDocEntrySet.h,v $
Language: C++
- Date: $Date: 2005/11/28 16:31:23 $
- Version: $Revision: 1.65 $
+ Date: $Date: 2005/11/29 12:48:47 $
+ Version: $Revision: 1.66 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
VRKey const &vr = GDCM_VRUNKNOWN);
SeqEntry *NewSeqEntry(uint16_t group, uint16_t elem);
+ virtual void Copy(DocEntrySet *set) {};
+
protected:
/// Canonical Constructor
DocEntrySet();
Program: gdcm
Module: $RCSfile: gdcmElementSet.cxx,v $
Language: C++
- Date: $Date: 2005/10/27 11:39:34 $
- Version: $Revision: 1.70 $
+ Date: $Date: 2005/11/29 12:48:47 $
+ Version: $Revision: 1.71 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return NULL;
}
+/**
+ * \brief Copies all the attributes from an other DocEntrySet
+ * @param set entry to copy from
+ * @remarks The contained DocEntries a not copied, only referenced
+ */
+void ElementSet::Copy(DocEntrySet *set)
+{
+ // Remove all previous entries
+ ClearEntry();
+
+ DocEntrySet::Copy(set);
+
+ ElementSet *eltSet = dynamic_cast<ElementSet *>(set);
+ if( eltSet )
+ {
+ TagHT = eltSet->TagHT;
+ for(ItTagHT = TagHT.begin();ItTagHT != TagHT.end();++ItTagHT)
+ {
+ (ItTagHT->second)->Register();
+ }
+ }
+}
+
//-----------------------------------------------------------------------------
// Protected
Program: gdcm
Module: $RCSfile: gdcmElementSet.h,v $
Language: C++
- Date: $Date: 2005/11/22 20:27:58 $
- Version: $Revision: 1.52 $
+ Date: $Date: 2005/11/29 12:48:47 $
+ Version: $Revision: 1.53 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// Tells us if the ElementSet contains no entry
bool IsEmpty() { return TagHT.empty(); }
+ virtual void Copy(DocEntrySet *set);
+
protected:
ElementSet();
~ElementSet();
Program: gdcm
Module: $RCSfile: gdcmSQItem.cxx,v $
Language: C++
- Date: $Date: 2005/11/21 09:46:27 $
- Version: $Revision: 1.80 $
+ Date: $Date: 2005/11/29 12:48:47 $
+ Version: $Revision: 1.81 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
DocEntries.clear();
}
-/**
- * \brief Move all the entries from a given Sequence Item
- */
-void SQItem::MoveObject(SQItem *source)
-{
- DocEntries = source->DocEntries;
- source->DocEntries.clear();
-}
-
/**
* \brief Get the first Dicom entry while visiting the SQItem
* \return The first DocEntry if found, otherwhise 0
return NULL;
}
+/**
+ * \brief Copies all the attributes from an other DocEntrySet
+ * @param set entry to copy from
+ * @remarks The contained DocEntries a not copied, only referenced
+ */
+void SQItem::Copy(DocEntrySet *set)
+{
+ // Remove all previous entries
+ ClearEntry();
+
+ DocEntrySet::Copy(set);
+
+ SQItem *sq = dynamic_cast<SQItem *>(set);
+ if( sq )
+ {
+ SQDepthLevel = sq->SQDepthLevel;
+ SQItemNumber = sq->SQItemNumber;
+
+ DocEntries = sq->DocEntries;
+ for(ItDocEntries = DocEntries.begin();ItDocEntries != DocEntries.end();++ItDocEntries)
+ (*ItDocEntries)->Register();
+ }
+}
+
//-----------------------------------------------------------------------------
// Protected
Program: gdcm
Module: $RCSfile: gdcmSQItem.h,v $
Language: C++
- Date: $Date: 2005/11/07 09:46:37 $
- Version: $Revision: 1.48 $
+ Date: $Date: 2005/11/29 12:48:47 $
+ Version: $Revision: 1.49 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bool AddEntry(DocEntry *Entry); // add to the List
bool RemoveEntry(DocEntry *EntryToRemove);
void ClearEntry();
- void MoveObject(SQItem *source);
DocEntry *GetFirstEntry();
DocEntry *GetNextEntry();
/// \brief Accessor on \ref SQDepthLevel.
void SetDepthLevel(int depth) { SQDepthLevel = depth; }
+ virtual void Copy(DocEntrySet *set);
+
protected:
SQItem(int depthLevel);
~SQItem();
ListDocEntry DocEntries;
/// Iterator, used to visit the entries
ListDocEntry::iterator ItDocEntries;
- /// Iterator, used to visit the Val Entries (for Python users)
- ListDocEntry::iterator ItValEntries;
private:
/// \brief Sequences can be nested. This \ref SQDepthLevel represents
Program: gdcm
Module: $RCSfile: gdcmSeqEntry.cxx,v $
Language: C++
- Date: $Date: 2005/11/07 09:46:36 $
- Version: $Revision: 1.62 $
+ Date: $Date: 2005/11/29 12:48:47 $
+ Version: $Revision: 1.63 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
}
+/**
+ * \brief Copies all the attributes from an other DocEntry
+ * @param doc entry to copy from
+ * @remarks The contained SQItems a not copied, only referenced
+ */
+void SeqEntry::Copy(DocEntry *doc)
+{
+ // Delete previous SQ items
+ ClearSQItem();
+
+ DocEntry::Copy(doc);
+ SeqEntry *entry = dynamic_cast<SeqEntry *>(doc);
+ if ( entry )
+ {
+ DelimitorMode = entry->DelimitorMode;
+ SQDepthLevel = entry->SQDepthLevel;
+
+ SeqTerm = entry->SeqTerm;
+ if(SeqTerm)
+ SeqTerm->Register();
+ Items = entry->Items;
+ for(ItSQItem = Items.begin();ItSQItem != Items.end(); ++ItSQItem)
+ {
+ (*ItSQItem)->Register();
+ }
+ }
+}
+
//-----------------------------------------------------------------------------
// Protected
-
//-----------------------------------------------------------------------------
// Private
Program: gdcm
Module: $RCSfile: gdcmSeqEntry.h,v $
Language: C++
- Date: $Date: 2005/11/21 09:46:27 $
- Version: $Revision: 1.38 $
+ Date: $Date: 2005/11/29 12:48:47 $
+ Version: $Revision: 1.39 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// Sets the delimitor mode
void SetDelimitorMode(bool dm) { DelimitorMode = dm; }
-
-
void SetDelimitationItem(DocEntry *e);
-
/// Gets the Sequence Delimitation Item
- DocEntry *GetDelimitationItem() { return SeqTerm;}
+ DocEntry *GetDelimitationItem() { return SeqTerm;}
/// Gets the depth level
int GetDepthLevel() const { return SQDepthLevel; }
/// Sets the depth level of a Sequence Entry embedded in a SeQuence
void SetDepthLevel(int depth) { SQDepthLevel = depth; }
+ virtual void Copy(DocEntry *doc);
+
protected:
private: