clean target.
* src/gdcm*.[cxx|h] :
- to allow compilation with gcc 3.x
-- clean up of STL usage (added explicit usage of std::)
-- small fixes on exceptions.
Note: linking not tested !
- clean of doxygen comments to avoid warnings at documentation
building stage.
* vtk/vtkGdcmReader.cxx: g++ warning message clean up (platform
dependent convertion).
+2003-07-01 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
+ * gdcmPython/Makefile.am now avoids calling the wrappers for the
+ clean target.
+ * src/gdcm*.[cxx|h] :
+ - to allow compilation with gcc 3.x
+ -- clean up of STL usage (added explicit usage of std::)
+ -- small fixes on exceptions.
+ Note: linking not tested !
+ - clean of doxygen comments to avoid warnings at documentation
+ building stage.
+ * vtk/vtkGdcmReader.cxx: g++ warning message clean up (platform
+ dependent convertion).
+
2003-06-20 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
* Clean up of previous JPR garbage commit (not even commented in the
Changelog):
############ Automake general usage classics:
MOSTLYCLEANFILES = $(pygdcm_la_SOURCES) $(vtkgdcmPython_la_SOURCES)
BUILT_SOURCES = $(pygdcm_la_SOURCES) $(vtkgdcmPython_la_SOURCES)
-CLEANFILES = gdcm_wrap.cxx gdcm.py gdcm.pyc vtkWrapPythonInit
+CLEANFILES = gdcm_wrap.cxx gdcm.py gdcm.pyc $(PYTHON_WRAPPER_INIT)
dist-hook:
rm -f $(distdir)/gdcm_wrap.cxx
/**
* \ingroup gdcmDict
* \brief
- * @param
- * @return
*/
- gdcmDict::~gdcmDict() {
+gdcmDict::~gdcmDict() {
for (TagKeyHT::iterator tag = KeyHt.begin(); tag != KeyHt.end(); ++tag) {
gdcmDictEntry* EntryToDelete = tag->second;
if ( EntryToDelete )
/**
* \ingroup gdcmDict
* \brief
- * @param
- * @return
+ * @param os
*/
void gdcmDict::Print(std::ostream& os) {
PrintByKey(os);
/**
* \ingroup gdcmDict
* \brief
- * @param
+ * @param NewEntry
* @return
*/
int gdcmDict::ReplaceEntry(gdcmDictEntry* NewEntry) {
/**
* \ingroup gdcmDict
* \brief
- * @param
+ * @param NewEntry
* @return
*/
int gdcmDict::AddNewEntry(gdcmDictEntry* NewEntry) {
/**
* \ingroup gdcmDict
* \brief
- * @param
+ * @param key
* @return
*/
int gdcmDict::RemoveEntry(TagKey key) {
/**
* \ingroup gdcmDict
* \brief
- * @param
+ * @param group
+ * @param element
* @return
*/
int gdcmDict::RemoveEntry (guint16 group, guint16 element) {
/**
* \ingroup gdcmElValSet
* \brief
- * @param
+ * @param newElValue
* @return
*/
void gdcmElValSet::Add(gdcmElValue * newElValue) {
* \ingroup gdcmElValSet
* \brief Checks if a given Dicom element exists
* \ within a ElValSet
- * @param
+ * @param Group
+ * @param Elem
* @return
*/
int gdcmElValSet::CheckIfExistByNumber(guint16 Group, guint16 Elem ) {
/**
* \ingroup gdcmElValSet
* \brief
- * @param
- * @return
*/
- void gdcmElValSet::Print(ostream & os) {
+void gdcmElValSet::Print(ostream & os) {
size_t o;
short int g, e;
/**
* \ingroup gdcmElValSet
* \brief
- * @param
- * @return
*/
- void gdcmElValSet::PrintByName(ostream & os) {
+void gdcmElValSet::PrintByName(ostream & os) {
for (TagElValueNameHT::iterator tag = NameHt.begin();
tag != NameHt.end();
++tag){
/**
* \ingroup gdcmElValSet
* \brief
- * @param
+ * @param group
+ * @param element
* @return
*/
gdcmElValue* gdcmElValSet::GetElementByNumber(guint16 group, guint16 element) {
/**
* \ingroup gdcmElValSet
* \brief
- * @param
* @return
*/
gdcmElValue* gdcmElValSet::GetElementByName(string TagName) {
/**
* \ingroup gdcmElValSet
* \brief
- * @param
+ * @param group
+ * @param element
* @return
*/
string gdcmElValSet::GetElValueByNumber(guint16 group, guint16 element) {
/**
* \ingroup gdcmElValSet
* \brief
- * @param
* @return
*/
string gdcmElValSet::GetElValueByName(string TagName) {
/**
* \ingroup gdcmElValSet
* \brief
- * @param
+ * @param content
+ * @param group
+ * @param element
* @return
*/
int gdcmElValSet::SetElValueByNumber(string content,
/**
* \ingroup gdcmElValSet
* \brief
- * @param
+ * @param content
+ * @param TagName
* @return
*/
int gdcmElValSet::SetElValueByName(string content, string TagName) {
/**
* \ingroup gdcmElValSet
* \brief
- * @param
+ * @param length
+ * @param group
+ * @param element
* @return
*/
int gdcmElValSet::SetElValueLengthByNumber(guint32 length,
/**
* \ingroup gdcmElValSet
* \brief
- * @param
+ * @param length
+ * @param TagName
* @return
*/
int gdcmElValSet::SetElValueLengthByName(guint32 length, string TagName) {
return 1 ;
}
-
-// re-computes the length of a ACR-NEMA/Dicom group
-// from a DcmHeader
-
/**
* \ingroup gdcmElValSet
- * \brief
- * @param
- * @return
+ * \brief Re-computes the length of a ACR-NEMA/Dicom group from a DcmHeader
+ * @param SkipSequence
+ * @param type
*/
void gdcmElValSet::UpdateGroupLength(bool SkipSequence, FileType type) {
guint16 gr, el;
/**
* \ingroup gdcmElValSet
* \brief
- * @param
+ * @param type
+ * @param _fp
* @return
*/
void gdcmElValSet::WriteElements(FileType type, FILE * _fp) {
/**
* \ingroup gdcmElValSet
* \brief
- * @param
+ * @param _fp
+ * @param type
* @return
*/
int gdcmElValSet::Write(FILE * _fp, FileType type) {
-// gdcmExeption.h
-
-// gdcmlib Intro:
-// * gdcmlib is a library dedicated to reading and writing dicom files.
-// * LGPL for the license
-// * lightweigth as opposed to CTN or DCMTK which come bundled which try
-// to implement the full DICOM standard (networking...). gdcmlib concentrates
-// on reading and writing
-// * Formats: this lib should be able to read ACR-NEMA v1 and v2, Dicom v3 (as
-// stated in part10). [cf dcmtk/dcmdata/docs/datadict.txt]
-// * Targeted plateforms: Un*xes and Win32/VC++6.0
-//
-//
-
#ifndef GDCM_EXCEPTION_H
#define GDCM_EXCEPTION_H
/**
* Any exception thrown in the gdcm library
*/
-class GDCM_EXPORT gdcmException : public exception {
+class GDCM_EXPORT gdcmException : public std::exception {
protected:
/// error message
std::string from;
/**
* virtual destructor makes this class dynamic
*/
- virtual ~gdcmException() {
+ virtual ~gdcmException() throw() {
}
/// returns error message
// la ligne commentee ci-dessous fait passer l'exec de 0.15 sec a 5.5 sec
// pour la meme image 512*512 ...
// optimiseur pas mis en oeuvre (?)
- //for (int i=0; i<GetXSize() * GetYSize() * GetZSize(); i++) {
+ //for (int i=0; i<GetXSize() * GetYSize() * GetZSize(); i++)
for (int i=0; i<taille; i++) {
*((unsigned short *)dest+i) = *(dataJpg +i);
/**
* \ingroup gdcmFile
*
- * @param nomFichier TODO JPR
+ * @param FileName TODO JPR
* @param type TODO JPR
*
* @return TODO JPR
*/
-int gdcmFile::WriteBase (string nomFichier, FileType type) {
+int gdcmFile::WriteBase (string FileName, FileType type) {
FILE * fp1;
- fp1 = fopen(nomFichier.c_str(),"wb");
+ fp1 = fopen(FileName.c_str(),"wb");
if (fp1 == NULL) {
- printf("Echec ouverture (ecriture) Fichier [%s] \n",nomFichier.c_str());
+ printf("Echec ouverture (ecriture) Fichier [%s] \n",FileName.c_str());
return (0);
}
-// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.72 2003/07/01 09:29:56 jpr Exp $
+// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.73 2003/07/01 10:04:36 frog Exp $
#include <stdio.h>
#include <cerrno>
/**
* \ingroup gdcmHeader
* \brief
- * @param none
- * @return
*/
- void gdcmHeader::Initialise(void) {
+void gdcmHeader::Initialise(void) {
dicom_vr = gdcmGlobal::GetVR();
dicom_ts = gdcmGlobal::GetTS();
Dicts = gdcmGlobal::GetDicts();
/**
* \ingroup gdcmHeader
* \brief
- * @param
- * @return
+ * @param InFilename
+ * @param exception_on_error
*/
gdcmHeader::gdcmHeader(const char *InFilename, bool exception_on_error) {
SetMaxSizeLoadElementValue(_MaxSizeLoadElementValue_);
/**
* \ingroup gdcmHeader
* \brief
- * @param
- * @return
+ * @param exception_on_error
*/
- gdcmHeader::gdcmHeader(bool exception_on_error) {
+gdcmHeader::gdcmHeader(bool exception_on_error) {
SetMaxSizeLoadElementValue(_MaxSizeLoadElementValue_);
Initialise();
}
/**
* \ingroup gdcmHeader
* \brief
- * @param
+ * @param exception_on_error
* @return
*/
bool gdcmHeader::OpenFile(bool exception_on_error)
/**
* \ingroup gdcmHeader
* \brief
- * @param
* @return
*/
- bool gdcmHeader::CloseFile(void) {
+bool gdcmHeader::CloseFile(void) {
int closed = fclose(fp);
fp = (FILE *)0;
if (! closed)
/**
* \ingroup gdcmHeader
- * \brief
- * @param
- * @return
+ * \brief Canonical destructor.
*/
- gdcmHeader::~gdcmHeader (void) {
+gdcmHeader::~gdcmHeader (void) {
dicom_vr = (gdcmVR*)0;
Dicts = (gdcmDictSet*)0;
RefPubDict = (gdcmDict*)0;
/**
* \ingroup gdcmHeader
* \brief
- * @param
- * @return
*/
- void gdcmHeader::SwitchSwapToBigEndian(void) {
+void gdcmHeader::SwitchSwapToBigEndian(void) {
dbg.Verbose(1, "gdcmHeader::SwitchSwapToBigEndian",
"Switching to BigEndian mode.");
if ( sw == 0 ) {
* \brief Accesses an existing gdcmElValue in the ShaElValSet of this instance
* through tag name and modifies it's content with the given value.
* @param content new value to substitute with
- * @param TagName name of the tag to be modified
+ * @param ShadowTagName name of the tag to be modified
*/
-int gdcmHeader::SetShaElValByName(string content, string TagName) {
- return ( ShaElValSet.SetElValueByName (content, TagName) );
+int gdcmHeader::SetShaElValByName(string content, string ShadowTagName) {
+ return ( ShaElValSet.SetElValueByName (content, ShadowTagName) );
}
/**
if( sscanf( StrImPos.c_str(), "%f\\%f\\%f", &xImPos, &yImPos, &zImPos) != 3)
// How to tell the caller a wrong number of values was found?
return 0.;
- //else
return yImPos;
}
return ts.count(key);
}
-string gdcmTS::GetValue(TSKey key) {
+std::string gdcmTS::GetValue(TSKey key) {
return ts[key];
}
gdcmTS(void);
~gdcmTS();
int Count(TSKey key);
- string GetValue(TSKey key);
+ std::string GetValue(TSKey key);
};
#endif
-// $Header: /cvs/public/gdcm/src/gdcmUtil.cxx,v 1.13 2003/06/26 13:07:01 jpr Exp $
+// $Header: /cvs/public/gdcm/src/gdcmUtil.cxx,v 1.14 2003/07/01 10:04:36 frog Exp $
#include <stdio.h>
#include <ctype.h> // For isspace
void gdcmDebug::Verbose(int Level, const char * Msg1, const char * Msg2) {
if (Level > DebugLevel)
return ;
- cerr << Msg1 << ' ' << Msg2 << '\n';
-}
-
-/*
-void gdcmDebug::Verbose(int Level, char * Msg1, char * Msg2) {
- if (Level > DebugLevel)
- return ;
- cerr << Msg1 << ' ' << Msg2 << '\n';
+ std::cerr << Msg1 << ' ' << Msg2 << '\n';
}
-*/
void gdcmDebug::Assert(int Level, bool Test,
const char * Msg1, const char * Msg2) {
if (Level > DebugLevel)
return ;
if (!Test)
- cerr << Msg1 << ' ' << Msg2 << '\n';
+ std::cerr << Msg1 << ' ' << Msg2 << '\n';
}
void gdcmDebug::Error( bool Test, const char * Msg1, const char * Msg2) {
-// $Header: /cvs/public/gdcm/src/gdcmUtil.h,v 1.12 2003/06/26 13:07:01 jpr Exp $
+// $Header: /cvs/public/gdcm/src/gdcmUtil.h,v 1.13 2003/07/01 10:04:36 frog Exp $
#ifndef GDCMUTIL_H
#define GDCMUTIL_H
extern gdcmDebug dbg;
char * _cleanString(char *v);
-char * _CreateCleanString(string s);
+char * _CreateCleanString(std::string s);
std::string TranslateToKey(guint16 group, guint16 element);
-#include <stdio.h>
-#include <string.h>
+#include <stdio.h> // for FILE
+#include <string>
#define BOOL int
-// $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.cxx,v 1.12 2003/06/17 08:07:23 regrain Exp $
-//CLEANME#include <vtkByteSwap.h>
+// $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.cxx,v 1.13 2003/07/01 10:04:37 frog Exp $
#include <stdio.h>
#include <vtkObjectFactory.h>
#include <vtkImageData.h>
// Variables for the UpdateProgress. We shall use 50 steps to signify
// the advance of the process:
- unsigned long UpdateProgressTarget = (unsigned long) this->NumLines
+ unsigned long UpdateProgressTarget = (unsigned long) ceil (this->NumLines
* this->TotalNumberOfPlanes
- / 50.0;
+ / 50.0);
// The actual advance measure:
unsigned long UpdateProgressCount = 0;