]> Creatis software - gdcm.git/commitdiff
add example
authorjpr <jpr>
Tue, 29 May 2007 12:41:33 +0000 (12:41 +0000)
committerjpr <jpr>
Tue, 29 May 2007 12:41:33 +0000 (12:41 +0000)
Doc/Website/News.html

index 97ce724411f263eb76548d6151b5387d5c9155a2..9b8e5fba7c19939da00f1d6dbcc71c11a31b71de 100644 (file)
@@ -240,6 +240,24 @@ Any contribution is welcome.
    void ValEntry::CopyValEntry(uint16_t gr, uint16_t el);
 -->void DataEntry::CopyDataEntry(uint16_t gr, uint16_t el, VRKey const &vr);
 </pre>
+
+<pre>
+Example :
+
+old way :
+        DocEntry *p3 = item2->GetDocEntry(0x0018,0x0050);
+        if( !p3 ) return false;
+        ContentEntry *entry2 = dynamic_cast<ContentEntry *>(p3);
+        std::string thickness = entry2->GetValue();
+
+new way :
+        DocEntry *p3 = item2->GetDocEntry(0x0018,0x0050);
+        if( !p3 ) return false;
+        DataEntry *entry2 = dynamic_cast<DataEntry *>(p3);
+        std::string thickness = entry2->GetString();
+
+</pre>
+
 <LI> Avoid tons of CPU time consuming accesses to DICOM Dictionnary
 <pre>
    DataEntry *FileHelper::CopyDataEntry(uint16_t group, uint16_t elem);