]> Creatis software - gdcm.git/blobdiff - Doc/Website/News.html
Avoid JPEG2000 writting to be confused by odd lengthes
[gdcm.git] / Doc / Website / News.html
index f17bb7b97616d8656f50eaae426ad6c6389af056..4958c06bb6402f1dc0c55323472da0478acaeadf 100644 (file)
@@ -33,14 +33,6 @@ Any contribution is welcome.
           (LOw COmplexity LOssless COmpression for Images) 
           developed at Hewlett-Packard Laboratories] 
      </UL>
-     <LI> gdcm doesn't read yet all <TT>JPEG2000</TT> encoded files.
-     <UL>
-         But we are working on it (a lot of troubles with Jasper).
-         Update: as of Oct 10 2005, we are currently investigating another library:
-         openjpeg. The problem still exist for this library but one of the author
-         is currently working on it:
-            http://www.openjpeg.org/forum/viewtopic.php?t=18
-      </UL>
       <LI> gdcm doesn't read yet <TT>MPEG2</TT> encoded files.
 
    </UL>
@@ -63,8 +55,6 @@ Any contribution is welcome.
            <TT>SeqEntry</TT> (if any) 
       <LI> Allow user to tell the Writer he doesn't want to write down
            <TT>Shadow groups</TT> (if any)
-      <LI> Allow user to tell the Writer which compression mode he wants<br>
-           (Right now, no one is available)
       <LI> Allow user to tell the Writer he wants to split a
            <TT>Multiframe</TT> image into a serie of 
            <TT>Single frame</TT> images.
@@ -103,12 +93,14 @@ Any contribution is welcome.
    <UL>
       <LI> 16-bits-LUT full Management
       <LI> User friendly management of <TT>Rescale Slope</TT> and
-           <TT>Rescale Intercept</TT>
+           <TT>Rescale Intercept</TT>.<br>
+           (Well... Maybe it's up to the application to deal with it, not to
+           gdcm ?)
       <LI> Allow manual adjunction / automatic recognition (pfff!...)
            of the private <TT>Dicom Dictionary</TT>
            to be used to parse <TT>Shadow groups</TT> against.
       <LI> User friendly way of anonymizing image when Patient's name is
-           carved in the Pixels :-(
+           burnt-in within the Pixels :-(
    </UL>
 </UL>
 <!#######################################################################>
@@ -124,17 +116,67 @@ Any contribution is welcome.
    <LI>State of the art
    <UL>    
       <LI>
-         <a href="uml-gdcm.pdf">gdcm UML Class Diagram</a> current version.
-      <LI> <a href= "Doc1.2/html.user/index.html">User Documentation</a>
-      <LI> <a href= "Doc1.2/html.developper/index.html">Developper
+         <a href="uml-gdcmV1.2.pdf">gdcm UML Class Diagram</a> current version.
+      <LI> <a href= "DocCVS/html.user/index.html">User Documentation</a>
+      <LI> <a href= "DocCVS/html.developper/index.html">Developper
          Documentation</a> 
    <LI> New Features
+   
    <UL>
+      <LI> To be able to use gdcm1.3.x and ITK, developer is now allowed to
+      choose his own namespace for gdcm at CMake time : see GDCM_NAME_SPACE
+      option.
+      <LI> JPEG and JPEG2000 compression writting are now available.
+       see Examples/WriteDicomAsJPEG.cxx and Examples/WriteDicomAsJPEG2000.cxx
+      <LI> To <i>try to</i> make gdcm images PACS usable, user is now allowed to
+           gdcm what kind of image he wants to write, using :  <br>
+   <TT>void FileHelper::SetContentType (ImageContentType c);</TT> <br>
+   Four different types are identify (probabely more will be added) :
+      <UL> 
+         <LI>
+      1) user created ex nihilo his own image and wants to write it as a Dicom image.<br>
+          c : <TT>USER_OWN_IMAGE</TT>
+         <LI>
+      2) user modified the pixels of an existing image, using mathematical operations.<br>
+          c : <TT>FILTERED_IMAGE</TT>
+         <LI>
+      3) user created a new image, using existing images (eg MIP, MPR, cartography image)<br>
+          c : <TT>CREATED_IMAGE</TT>
+         <LI>
+       4) user modified/added some tags *without processing* the pixels (anonymization, etc)<br>
+         c : <TT>UNMODIFIED_PIXELS_IMAGE</TT> 
+      </UL>
       <LI> Stupid difference between <TT>gdcm::ValEntry</TT> 
            and <TT>gdcm::BinEntry</TT> removed. <br>
            Only <TT>gdcm::DataEntry</TT> exist, now. 
            Should have been considered as a 'Bug Fix'.<br>
            Actually, it's an API breaking modification ...
+      <UL>
+         <LI>
+            <TT>std::string const &DataEntry::GetString() const</TT><br>
+            returns as a string (when possible) the value of the DataEntry
+         <LI>
+            <TT>void DataEntry::SetString(std::string const &value)</TT><br>
+             Sets the 'value' of a DataEntry, passed as a std::string 
+         <LI>
+            <TT>void DataEntry::SetBinArea( uint8_t *area, bool self ) </TT><br>
+             Sets the value (non string) of the current Dicom DataEntry
+         <LI>
+              <TT>void DataEntry::CopyBinArea( uint8_t *area, uint32_t length )</TT><br>
+               Inserts the value (non string) into the current DataEntry 
+         <LI>
+               <TT>void DataEntry::SetValue(const uint32_t &id, const double
+ &val)</TT><br>
+               Inserts the elementary (non string) value into the current
+               (multivaluated) DataEntry, at the <TT>id></TT> position.
+         <LI>
+               <TT>double DataEntry::GetValue(const uint32_t &id) const </TT><br>
+               returns, as a double one of the values (when entry is 
+               multivaluated), identified by its index <TT>id</TT>. 
+      </UL>
+      <LI> 
+   <TT>DocEntrySet::GetEntryValue()</TT> replaced by
+           <TT>DocEntrySet::GetEntryString()</TT> <br>
       <LI> SerieHelper : <br>     
            Add some methods, to split a 'SingleSerieUID' Fileset into 
            'Extra Coherent'  FileSets. <br>
@@ -142,14 +184,28 @@ Any contribution is welcome.
            of gdcm::File*)<br>
            The key is the 'Orientation', the 'Position' 
            or the value of a user choosen 'Tag' <br>
-           -  XCoherentFileSetmap SplitOnOrientation(FileList *fileSet); <br>
-           -  XCoherentFileSetmap SplitOnPosition(FileList *fileSet); <br>
-           -  XCoherentFileSetmap SplitOnTagValue(FileList *fileSet,
-                                       uint16_t group, uint16_t element); <br>
+           -  <TT>XCoherentFileSetmap SplitOnOrientation(FileList *fileSet);
+              </TT><br>
+           -  <TT>XCoherentFileSetmap SplitOnPosition(FileList *fileSet);
+              </TT> <br>
+           -  <TT>XCoherentFileSetmap SplitOnTagValue(FileList *fileSet,
+                                       uint16_t group, uint16_t element);
+              </TT><br>
            These methods must be called by user, depending on what he wants 
            to do, at application time.- *he* only  knows what his Series 
            contain !-
-      <LI>
+      <LI> To avoid memory leaks and seg faults the user intended classes
+           use now a Reference Counter.<br>
+      <UL>
+         <LI> <TT>new()</TT> and <TT>delete()</TT> are replaced by
+              <TT>New()</TT> and <TT>Delete()</TT>
+         <LI> <TT>Register()</TT> and <TT>Unregister()</TT> methods are 
+         available.
+         <LI> --> Well ... People from ITK don't seem to agree too much with 
+             that feature.<br>
+          They demand to be allowed to allocate gdcm objects in the stack as
+          well, not only in the heap.
+      </UL>
       <LI>
    </UL>
 
@@ -158,8 +214,102 @@ Any contribution is welcome.
       <LI> Stupid difference between <TT>gdcm::ValEntry</TT> 
            and <TT>gdcm::BinEntry</TT> removed. <br>
            Only <TT>gdcm::DataEntry</TT> exist, now. <br>  
-      <LI>
-      <LI>
+   <pre>
+   ValEntry(DictEntry *e);
+   BinEntry(DictEntry *e);
+-->DataEntry *New(uint16_t group,uint16_t elem, VRKey const &vr);
+
+   std::string const &ValEntry::GetValue() const;
+   std::string const &BinEntry::GetValue() const;
+-->std::string const &DataEntry::GetString() const;
+
+   uint8_t *BinEntry::GetBinArea();
+-->uint8_t *DataEntry::GetBinArea();
+
+   void ValEntry::SetValue(std::string const &value);
+   void BinEntry::SetValue(std::string const &value);   
+-->void DataEntry::SetString(std::string const &value);
+
+   void BinEntry::SetBinArea( uint8_t *area, bool self = true );
+-->void DataEntry::SetBinArea( uint8_t *area, bool self = true );
+
+   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);
+-->DataEntry *FileHelper::CopyDataEntry(uint16_t group, uint16_t elem, 
+                                        const VRKey &vr = GDCM_VRUNKNOWN);
+
+   void FileHelper::CheckMandatoryEntry(uint16_t group, uint16_t elem, std::string value);
+-->void FileHelper::CheckMandatoryEntry(uint16_t group, uint16_t elem, std::string value,
+                                        const VRKey &vr = GDCM_VRUNKNOWN);
+      
+   void FileHelper::SetMandatoryEntry(uint16_t group, uint16_t elem, std::string value);       
+-->void FileHelper::SetMandatoryEntry(uint16_t group, uint16_t elem, std::string value,
+                                      const VRKey &vr = GDCM_VRUNKNOWN);
+
+   void FileHelper::CopyMandatoryEntry(uint16_t group, uint16_t elem, std::string value);      
+-->void FileHelper::CopyMandatoryEntry(uint16_t group, uint16_t elem, std::string value,
+                                       const VRKey &vr = GDCM_VRUNKNOWN);
+</pre>
+<LI> New features :
+<pre>
+For multivaluated numeric DataEntries
+-->void DataEntry::SetValue(const uint32_t &id,const double &val);
+-->double DataEntry::GetValue(const uint32_t &id) const;
+-->uint32_t DataEntry::GetValueCount() const;
+
+For converting 'Decimal String'
+-->bool GetDSValue(std::vector &lt;double&gt; &valueVector);  
+</pre>
+
+<LI> Avoid too many source file modifications from gdcm1.2 to gdcm1.3
+<pre>
+use :
+
+#define ValEntry                      DataEntry
+#define BinEntry                      DataEntry
+
+#define GetEntryValue(g,e)            GetEntryString(g,e)
+#define GetEntryForcedAsciiValue(g,e) GetEntryString(g,e)
+
+#define GetValEntry(g,e)              GetDataEntry(g,e)
+#define GetBinEntry(g,e)              GetDataEntry(g,e)
+#define GetValue()                    GetString()
+
+#define InsertValEntry(v,g,e,vr)      InsertEntryString(v,g,e,vr) // warning mind the VR!
+#define InsertBinEntry(b,l,g,e,vr)    InsertEntryBinArea(b,l,g,e,vr)
+
+#define SetValEntry(c,g,e)            SetEntryString(c,g,e)  | !!
+#define SetValEntry(c,en)             SetEntryString(c,en)   | !!
+
+#define SetBinEntry(c,l,en)           SetEntryBinArea(c,l,en)   | !!
+#define SetBinEntry(c,l,g,e)          SetEntryBinArea(c,l,g,e)  | !!
+
+#define NewValEntry(g,e,vr)           NewDataEntry(g,e,vr)
+#define NewBinEntry(g,e,vr)           NewDataEntry(g,e,vr)       
+
+</pre>
    </UL> 
       
    <LI> Bug fixes
@@ -190,6 +340,9 @@ Any contribution is welcome.
 
   
 <!#######################################################################>
+<A CLASS="anchor" NAME="NewsPreviousVersions">
+<!#######################################################################>
+
 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
 <H2>
    <A CLASS="anchor" NAME="NewsVersion1_1">