SET(TEST_SOURCES
TestBug.cxx
TestHash.cxx
+ TestTS.cxx
+ TestVR.cxx
)
# add tests that require data
--- /dev/null
+#include "gdcmTS.h"
+
+int TestTS(int , char *[])
+{
+ gdcm::TS ts;
+ // There should be 150 entries
+ ts.Print( std::cout );
+
+ return ts.GetValue( "" ) != GDCM_UNFOUND;
+}
--- /dev/null
+#include "gdcmVR.h"
+
+int TestVR(int , char *[])
+{
+ gdcm::VR vr;
+ // There should be 16 entries
+ vr.Print( std::cout );
+ vr.IsVROfGdcmStringRepresentable( "" );
+ vr.IsVROfGdcmBinaryRepresentable( "" );
+
+ return 0;
+}
Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2004/10/24 03:33:41 $
- Version: $Revision: 1.55 $
+ Date: $Date: 2004/10/28 03:10:57 $
+ Version: $Revision: 1.56 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void BuildFlatHashTableRecurse( TagDocEntryHT& builtHT,
DocEntrySet* set );
-
public:
// Accessors:
/// Accessor to \ref PrintLevel
void SetPrintLevel(int level) { PrintLevel = level; }
/// Accessor to \ref Filename
- const std::string &GetFileName() { return Filename; }
+ const std::string &GetFileName() const { return Filename; }
/// Accessor to \ref Filename
void SetFileName(std::string const & fileName) { Filename = fileName; }
Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2004/10/22 13:56:46 $
- Version: $Revision: 1.149 $
+ Date: $Date: 2004/10/28 03:10:58 $
+ Version: $Revision: 1.150 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// - it is not defined (i.e. it's value is 0)
// - it's 12, since we will expand the image to 16 bits (see
// PixelConvert::ConvertDecompress12BitsTo16Bits() )
- if ( ( numberBitsAllocated == 0 ) || ( numberBitsAllocated == 12 ) )
+ if ( numberBitsAllocated == 0 || numberBitsAllocated == 12 )
{
numberBitsAllocated = 16;
}
if ( type == ImplicitVR || type == ExplicitVR )
{
// writing Dicom File Preamble
- uint8_t* filePreamble = new uint8_t[128];
+ uint8_t filePreamble[128];
memset(filePreamble, 0, 128);
fp1->write((char*)filePreamble, 128);
fp1->write("DICM", 4);
-
- delete[] filePreamble;
}
// --------------------------------------------------------------
Program: gdcm
Module: $RCSfile: gdcmFile.h,v $
Language: C++
- Date: $Date: 2004/10/25 04:08:20 $
- Version: $Revision: 1.67 $
+ Date: $Date: 2004/10/28 03:10:58 $
+ Version: $Revision: 1.68 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace gdcm
{
-
//-----------------------------------------------------------------------------
/*
* In addition to Dicom header exploration, this class is designed
Program: gdcm
Module: $RCSfile: gdcmHeader.cxx,v $
Language: C++
- Date: $Date: 2004/10/22 03:05:41 $
- Version: $Revision: 1.195 $
+ Date: $Date: 2004/10/28 03:10:58 $
+ Version: $Revision: 1.196 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace gdcm
{
-
//-----------------------------------------------------------------------------
// Constructor / Destructor
/**
Program: gdcm
Module: $RCSfile: gdcmHeader.h,v $
Language: C++
- Date: $Date: 2004/10/22 03:05:42 $
- Version: $Revision: 1.91 $
+ Date: $Date: 2004/10/28 03:10:58 $
+ Version: $Revision: 1.92 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmCommon.h"
#include "gdcmDocument.h"
+
namespace gdcm
{
-
-
//-----------------------------------------------------------------------------
/**
* \brief
Header();
Header( std::string const & filename );
- virtual ~Header();
+ ~Header();
// Standard values and informations contained in the header
- virtual bool IsReadable();
+ bool IsReadable();
// Some heuristic based accessors, end user intended
int GetBitsStored();
float GetXSpacing();
float GetYSpacing();
float GetZSpacing();
- //void GetSpacing(float &x, float &y, float &z);
// Useful for rescaling graylevel:
float GetRescaleIntercept();
float GetXOrigin();
float GetYOrigin();
float GetZOrigin();
- //void GetOrigin(float &x, float &y, float &z);
bool HasLUT();
int GetLUTNbits();
Program: gdcm
Module: $RCSfile: gdcmSQItem.cxx,v $
Language: C++
- Date: $Date: 2004/10/27 22:31:12 $
- Version: $Revision: 1.32 $
+ Date: $Date: 2004/10/28 03:10:58 $
+ Version: $Revision: 1.33 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace gdcm
{
-
//-----------------------------------------------------------------------------
// Constructor / Destructor
/**
cc != DocEntries.end();
++cc)
{
- delete (*cc);
+ delete *cc;
}
DocEntries.clear();
}
s << " | " ;
}
}
- std::cout << s.str() << " --- SQItem number " << SQItemNumber << std::endl;
+ //std::cout << s.str() << " --- SQItem number " << SQItemNumber << std::endl;
for (ListDocEntry::iterator i = DocEntries.begin();
i != DocEntries.end();
++i)
Program: gdcm
Module: $RCSfile: gdcmSQItem.h,v $
Language: C++
- Date: $Date: 2004/10/25 03:35:20 $
- Version: $Revision: 1.21 $
+ Date: $Date: 2004/10/28 03:10:58 $
+ Version: $Revision: 1.22 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void Write(std::ofstream *fp, FileType filetype);
/// \brief returns the DocEntry chained List for this SQ Item.
- ListDocEntry const &GetDocEntries() const { return DocEntries; };
+ ListDocEntry const & GetDocEntries() const { return DocEntries; };
/// \brief adds the passed DocEntry to the DocEntry chained List for
/// this SQ Item.
// FIXME method to write
//DocEntry *GetDocEntryByName (std::string Name);
- bool SetEntryByNumber(std::string const & val, uint16_t group, uint16_t element);
+ bool SetEntryByNumber(std::string const & val, uint16_t group,
+ uint16_t element);
std::string GetEntryByNumber(uint16_t group, uint16_t element);
void SetDepthLevel(int depth) { SQDepthLevel = depth; }
/// Accessor on \ref BaseTagKey.
- void SetBaseTagKey( BaseTagKey const & key ) { BaseTagKeyNested = key; }
+ void SetBaseTagKey( BaseTagKey const & key ) { BaseTagKeyNested = key; }
/// Accessor on \ref BaseTagKey.
BaseTagKey const & GetBaseTagKey() const { return BaseTagKeyNested; }
Program: gdcm
Module: $RCSfile: gdcmVR.h,v $
Language: C++
- Date: $Date: 2004/10/27 21:28:56 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2004/10/28 03:10:58 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <map>
#include <string>
#include <iostream>
+
namespace gdcm
{
Program: gdcm
Module: $RCSfile: gdcmValEntry.h,v $
Language: C++
- Date: $Date: 2004/10/25 03:03:45 $
- Version: $Revision: 1.28 $
+ Date: $Date: 2004/10/28 03:10:58 $
+ Version: $Revision: 1.29 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
public:
ValEntry(DictEntry* e);
ValEntry(DocEntry* d);
- virtual ~ValEntry();
+ ~ValEntry();
/// \brief Returns the 'Value' (e.g. "Dupond Marcel") converted into a
- /// 'string', if it's stored as an integer in the header of the
+ /// 'string', event if it's stored as an integer in the header of the
/// current Dicom Document Entry
std::string const & GetValue() const { return Value; };