+2004-11-26 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+ * Remove some useless methods in gdcm::Document, gdcm::Header and gdcm::File
+ * Rename gdcmHeaderHelper.[h|cxx] to gdcmSerieHeader.[h|cxx] to be coherent
+ between the class name and the file name
+
2004-11-25 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
- * src/ : fix compilation warnings for the Write method (2 different
+ * src/ : fix compilation warnings for the Write method (2 different
proto). So Rename 'Write(ifstream* fp' into 'WriteContent(ifstream* fp'
fix compilation warnings for the gdcm::Document::TransferSyntaxStrings
variable... create a static method in gdcm::Document to access to
2004-11-25 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
* src/gdcmDocument.[h|cxx] : set the Transfert Syntax values to the header
file, to be accessed by other files (like gdcmFile). Remove commented
- code. Move the change of the header to the gdcmFile, using the
+ code. Move the change of the header to the gdcmFile, using the
DocEntryArchive
* src/gdcmHeader.[h|cxx] : the write is completely made in the Header.
To be sure of that (and simplify calls), the Write of the header now
Program: gdcm
Module: $RCSfile: WriteDicom.cxx,v $
Language: C++
- Date: $Date: 2004/11/16 04:26:18 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2004/11/26 10:55:03 $
+ Version: $Revision: 1.8 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// TODO : Shouldn't we merge those two functions ?
f1->SetImageData( imageData, dataSize);
- f1->GetHeader()->SetImageDataSize( dataSize );
f1->GetHeader()->Print();
Program: gdcm
Module: $RCSfile: TestChangeHeader.cxx,v $
Language: C++
- Date: $Date: 2004/11/16 04:28:20 $
- Version: $Revision: 1.26 $
+ Date: $Date: 2004/11/26 10:55:03 $
+ Version: $Revision: 1.27 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// TODO : Why don't we merge theese 2 functions ?
f1->SetImageData(imageData,dataSize);
- f1->GetHeader()->SetImageDataSize(dataSize);
f1->GetHeader()->Print();
Program: gdcm
Module: $RCSfile: TestCopyDicom.cxx,v $
Language: C++
- Date: $Date: 2004/11/25 10:24:33 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2004/11/26 10:55:03 $
+ Version: $Revision: 1.23 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Useless to set the image datas, because it's already made when
// copying the corresponding BinEntry that contains the pixel datas
copy->SetImageData(imageData, dataSize);
-// copy->GetImageData();
-// original->GetHeader()->SetImageDataSize(dataSize);
//////////////// Step 3:
std::cout << "3...";
gdcmFile.cxx
gdcmGlobal.cxx
gdcmHeader.cxx
- gdcmHeaderHelper.cxx
gdcmJPEGFragment.cxx
gdcmJPEGFragmentsInfo.cxx
gdcmJpeg8.cxx
gdcmRLEFrame.cxx
gdcmRLEFramesInfo.cxx
gdcmSeqEntry.cxx
+ gdcmSerieHeader.cxx
gdcmSQItem.cxx
gdcmTS.cxx
gdcmUtil.cxx
Program: gdcm
Module: $RCSfile: gdcm.h,v $
Language: C++
- Date: $Date: 2004/09/27 08:39:05 $
- Version: $Revision: 1.49 $
+ Date: $Date: 2004/11/26 10:55:04 $
+ Version: $Revision: 1.50 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmDocument.h"
#include "gdcmHeader.h"
-#include "gdcmHeaderHelper.h"
+#include "gdcmSerieHeader.h"
#include "gdcmFile.h"
#include "gdcmUtil.h"
Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2004/11/25 16:35:16 $
- Version: $Revision: 1.141 $
+ Date: $Date: 2004/11/26 10:55:04 $
+ Version: $Revision: 1.142 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* @param element element number of the Entry to modify
* @return true on success, false otherwise.
*/
-bool Document::SetEntryLengthByNumber(uint32_t l,
+/*bool Document::SetEntryLengthByNumber(uint32_t l,
uint16_t group, uint16_t element)
{
/// \todo use map methods, instead of multimap JPR
( ((TagHT.equal_range(key)).first)->second )->SetLength(l);
return true ;
-}
+}*/
/**
* \brief Gets (from Header) the offset of a 'non string' element value
* @param elem element number of the Entry
* @return File Offset of the Element Value
*/
-size_t Document::GetEntryOffsetByNumber(uint16_t group, uint16_t elem)
+/*size_t Document::GetEntryOffsetByNumber(uint16_t group, uint16_t elem)
{
DocEntry* entry = GetDocEntryByNumber(group, elem);
if (!entry)
return 0;
}
return entry->GetOffset();
-}
+}*/
/**
* \brief Gets (from Header) a 'non string' element value
return;
LoadEntryBinArea(binElement);
-/* size_t o =(size_t)docElement->GetOffset();
- Fp->seekg( o, std::ios_base::beg);
- size_t l = docElement->GetLength();
- uint8_t* a = new uint8_t[l];
- if(!a)
- {
- dbg.Verbose(0, "Document::LoadEntryBinArea cannot allocate a");
- return;
- }
-
- // Read the value
- Fp->read((char*)a, l);
- if( Fp->fail() || Fp->eof() )//Fp->gcount() == 1
- {
- delete[] a;
- return;
- }
-
- // Set the value to the DocEntry
- if( !SetEntryBinAreaByNumber( a, group, elem ) )
- {
- delete[] a;
- dbg.Verbose(0, "Document::LoadEntryBinArea setting failed.");
- }*/
}
/**
* @param element Element number of the searched Dicom Element
* @return
*/
-bool Document::SetEntryBinAreaByNumber(uint8_t* area,
+/*bool Document::SetEntryBinAreaByNumber(uint8_t* area,
uint16_t group, uint16_t element)
{
DocEntry* currentEntry = GetDocEntryByNumber(group, element);
}
return false;
-}
+}*/
/**
* \brief Update the entries with the shadow dictionary.
Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2004/11/25 16:35:17 $
- Version: $Revision: 1.65 $
+ Date: $Date: 2004/11/26 10:55:04 $
+ 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
virtual std::string GetEntryVRByNumber(uint16_t group, uint16_t elem);
virtual int GetEntryLengthByNumber(uint16_t group, uint16_t elem);
//protected:
- virtual bool SetEntryByName ( std::string const & content,
- TagName const & tagName );
+ virtual bool SetEntryByName (std::string const & content,
+ TagName const & tagName );
virtual bool SetEntryByNumber(std::string const & content,
uint16_t group, uint16_t element);
virtual bool SetEntryByNumber(uint8_t* content, int lgth,
uint16_t group, uint16_t element);
- virtual bool SetEntryLengthByNumber(uint32_t length,
- uint16_t group, uint16_t element);
-
- virtual size_t GetEntryOffsetByNumber(uint16_t group, uint16_t elem);
+ // FIXME
+ // Verify the usefull of this method... otherwise remove it
+ // It's body is commented in the .xx
+ //virtual bool SetEntryLengthByNumber(uint32_t length,
+ // uint16_t group, uint16_t element);
+
+ // FIXME
+ // Verify the usefull of this method... otherwise remove it
+ // It's body is commented in the .xx
+ // virtual size_t GetEntryOffsetByNumber(uint16_t group, uint16_t elem);
virtual void* GetEntryBinAreaByNumber(uint16_t group, uint16_t elem);
- virtual bool SetEntryBinAreaByNumber(uint8_t* a, uint16_t group,
- uint16_t elem);
+ // FIXME
+ // Verify the usefull of this method... otherwise remove it
+ // It's body is commented in the .xx
+ //virtual bool SetEntryBinAreaByNumber(uint8_t* a, uint16_t group,
+ // uint16_t elem);
virtual void UpdateShaEntries();
Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2004/11/25 16:35:17 $
- Version: $Revision: 1.165 $
+ Date: $Date: 2004/11/26 10:55:04 $
+ Version: $Revision: 1.166 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//-----------------------------------------------------------------------------
// Private
-/**
- * \brief Set the pixel datas in the good entry of the Header
- */
-void File::SetPixelData(uint8_t* data)
-{
- GetHeader()->SetEntryByNumber( GDCM_BINLOADED,
- GetHeader()->GetGrPixel(), GetHeader()->GetNumPixel());
-
- // Will be 7fe0, 0010 in standard case
- DocEntry* currentEntry = GetHeader()->GetDocEntryByNumber(GetHeader()->GetGrPixel(), GetHeader()->GetNumPixel());
- if ( currentEntry )
- {
- if ( BinEntry* binEntry = dynamic_cast<BinEntry *>(currentEntry) )
- // Flag is to false because datas are kept in the gdcmPixelConvert
- binEntry->SetBinArea( data, false );
- }
-}
//-----------------------------------------------------------------------------
} // end namespace gdcm
Program: gdcm
Module: $RCSfile: gdcmFile.h,v $
Language: C++
- Date: $Date: 2004/11/25 13:12:02 $
- Version: $Revision: 1.77 $
+ Date: $Date: 2004/11/26 10:55:04 $
+ Version: $Revision: 1.78 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
uint8_t* GetImageDataRaw();
size_t GetImageDataIntoVector(void* destination, size_t maxSize);
- // see also Header::SetImageDataSize ?!?
bool SetImageData (uint8_t* data, size_t expectedSize);
// Write pixels of ONE image on hard drive
uint8_t* GetDecompressed();
int ComputeDecompressedPixelDataSizeFromHeader();
- void SetPixelData(uint8_t* data);
-
private:
// members variables:
Program: gdcm
Module: $RCSfile: gdcmHeader.cxx,v $
Language: C++
- Date: $Date: 2004/11/25 15:46:11 $
- Version: $Revision: 1.207 $
+ Date: $Date: 2004/11/26 10:55:04 $
+ Version: $Revision: 1.208 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return tsName;
}
-/**
- * \brief Sets the Pixel Area size in the Header
- * --> not-for-rats function
- * @param ImageDataSize new Pixel Area Size
- * warning : nothing else is checked
- */
-void Header::SetImageDataSize(size_t ImageDataSize)
-{
- ///FIXME I don't understand this code why do we set two times 'car' ?
- std::string car = Util::Format("%d", ImageDataSize);
-
- DocEntry *a = GetDocEntryByNumber(GrPixel, NumPixel);
- a->SetLength(ImageDataSize);
-
- // Change the value of the BinEntry, not the BinArea !!!
- ImageDataSize += 8;
- car = Util::Format("%d", ImageDataSize);
- car = Util::DicomString( car.c_str() );
-
- SetEntryByNumber(car, GrPixel, NumPixel);
-}
-
//-----------------------------------------------------------------------------
// Protected
Program: gdcm
Module: $RCSfile: gdcmHeader.h,v $
Language: C++
- Date: $Date: 2004/11/25 13:12:02 $
- Version: $Revision: 1.94 $
+ Date: $Date: 2004/11/26 10:55:04 $
+ Version: $Revision: 1.95 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// Accessor to \ref Header::NumPixel
uint16_t GetNumPixel() { return NumPixel; }
- /// Read (used in File)
- void SetImageDataSize(size_t expectedSize);
-
bool Write(std::string fileName, FileType filetype);
/// Initialize DICOM header when none
/*=========================================================================
Program: gdcm
- Module: $RCSfile: gdcmHeaderHelper.cxx,v $
+ Module: $RCSfile: gdcmSerieHeader.cxx,v $
Language: C++
- Date: $Date: 2004/11/16 18:33:33 $
- Version: $Revision: 1.45 $
+ Date: $Date: 2004/11/26 10:55:04 $
+ Version: $Revision: 1.1 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
-#include "gdcmHeaderHelper.h"
+#include "gdcmSerieHeader.h"
#include "gdcmDirList.h"
#include "gdcmDebug.h"
/*=========================================================================
Program: gdcm
- Module: $RCSfile: gdcmHeaderHelper.h,v $
+ Module: $RCSfile: gdcmSerieHeader.h,v $
Language: C++
- Date: $Date: 2004/10/12 04:35:46 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2004/11/26 10:55:04 $
+ Version: $Revision: 1.1 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
-#ifndef GDCMHEADERHELPER_H
-#define GDCMHEADERHELPER_H
+#ifndef GDCMSERIEHEADER_H
+#define GDCMSERIEHEADER_H
#include "gdcmHeader.h"
* \brief
*
* - This class should be used for a stack of 2D dicom images.
- * - For a multiframe dicom image better use directly HeaderHelper
+ * - For a multiframe dicom image better use directly SerieHeader
*/
class GDCM_EXPORT SerieHeader
{