Program: gdcm
Module: $RCSfile: gdcmDocEntry.h,v $
Language: C++
- Date: $Date: 2004/10/07 21:05:39 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2004/10/08 04:52:55 $
+ Version: $Revision: 1.24 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmDictEntry.h"
#include <iostream>
-#include <stdio.h>
class gdcmHeader;
class gdcmValEntry;
Program: gdcm
Module: $RCSfile: gdcmException.cxx,v $
Language: C++
- Date: $Date: 2004/09/27 08:39:07 $
- Version: $Revision: 1.18 $
+ Date: $Date: 2004/10/08 04:52:55 $
+ Version: $Revision: 1.19 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmException.h"
#include <typeinfo>
-#include <stdio.h>
//-----------------------------------------------------------------------------
// gdcmException
Program: gdcm
Module: $RCSfile: gdcmGlobal.cxx,v $
Language: C++
- Date: $Date: 2004/09/27 08:39:07 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2004/10/08 04:52:55 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmGlobal.h"
#include "gdcmDebug.h"
-#include <stdio.h>
-#include <ctype.h> // For isspace
-#include <string.h> // CLEANME: could this be only string ? Related to Win32 ?
/**
* \ingroup Globals
* \ingroup gdcmGlobal
* \brief constructor : populates the various H Tables
*/
-gdcmGlobal::gdcmGlobal(void) {
+gdcmGlobal::gdcmGlobal()
+{
if (VR || TS || Dicts || ddElem)
+ {
dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts already allocated");
+ }
Dicts = new gdcmDictSet();
VR = new gdcmVR();
TS = new gdcmTS();
* \ingroup gdcmGlobal
* \brief canonical destructor
*/
-gdcmGlobal::~gdcmGlobal() {
+gdcmGlobal::~gdcmGlobal()
+{
delete Dicts;
delete VR;
delete TS;
* \ingroup gdcmGlobal
* \brief returns a pointer to the 'Value Representation Table'
*/
-gdcmVR *gdcmGlobal::GetVR(void) {
+gdcmVR *gdcmGlobal::GetVR()
+{
return VR;
}
/**
* \ingroup gdcmGlobal
* \brief returns a pointer to the 'Transfert Syntax Table'
*/
-gdcmTS *gdcmGlobal::GetTS(void) {
+gdcmTS *gdcmGlobal::GetTS()
+{
return TS;
}
/**
* \ingroup gdcmGlobal
* \brief returns a pointer to Dictionaries Table
*/
-gdcmDictSet *gdcmGlobal::GetDicts(void) {
+gdcmDictSet *gdcmGlobal::GetDicts()
+{
return Dicts;
}
/**
* \ingroup gdcmGlobal
* \brief returns a pointer to the DicomDir related elements Table
*/
-gdcmDicomDirElement *gdcmGlobal::GetDicomDirElements(void) {
+gdcmDicomDirElement *gdcmGlobal::GetDicomDirElements()
+{
return ddElem;
}
-// gdcmJpeg12.cxx
-//-----------------------------------------------------------------------------
-#include <stdio.h>
-#include "gdcmFile.h"
+/*=========================================================================
+
+ Program: gdcm
+ Module: $RCSfile: gdcmJpeg12.cxx,v $
+ Language: C++
+ Date: $Date: 2004/10/08 04:52:55 $
+ Version: $Revision: 1.17 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
-#define BITS_IN_JSAMPLE 12
-
-#ifdef GDCM_DEBUG
-#define GDCM_jpr_DEBUG 0
-#endif //GDCM_DEBUG
+#include "gdcmFile.h"
/*
* <setjmp.h> is used for the optional error recovery mechanism shown in
*/
extern "C" {
+#include <stdio.h>
#include "src/jpeg/libijg12/jconfig.h"
#include "src/jpeg/libijg12/jpeglib.h"
//#include "jconfig12.h"
-// gdcmJpeg2000.cxx
+/*=========================================================================
+
+ Program: gdcm
+ Module: $RCSfile: gdcmJpeg2000.cxx,v $
+ Language: C++
+ Date: $Date: 2004/10/08 04:52:55 $
+ Version: $Revision: 1.10 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
//-----------------------------------------------------------------------------
-#include <stdio.h>
#include "gdcmFile.h"
//-----------------------------------------------------------------------------
bool gdcmFile::gdcm_read_JPEG2000_file (FILE* fp,void* image_buffer) {
(void)fp; //FIXME
(void)image_buffer; //FIXME
- printf("Sorry JPEG 2000 File not yet taken into account\n");
+ std::cout << "Sorry JPEG 2000 File not yet taken into account" << std::endl;
return false;
}
-// gdcmJpeg.cxx
-//-----------------------------------------------------------------------------
-#include <stdio.h>
+/*=========================================================================
+
+ Program: gdcm
+ Module: $RCSfile: gdcmJpeg8.cxx,v $
+ Language: C++
+ Date: $Date: 2004/10/08 04:52:55 $
+ Version: $Revision: 1.2 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
#include "gdcmFile.h"
-#define BITS_IN_JSAMPLE 8
-
-#ifdef GDCM_DEBUG
-#define GDCM_jpr_DEBUG 0
-#endif //GDCM_DEBUG
-
/*
DICOM provides a mechanism for supporting the use of JPEG Image Compression
through the Encapsulated Format (see PS 3.3 of the DICOM Standard).
*/
extern "C" {
-//#include "jpeglib.h"
+//#include "stdio.h"
#include "src/jpeg/libijg8/jconfig.h"
#include "src/jpeg/libijg8/jpeglib.h"
Program: gdcm
Module: $RCSfile: gdcmRLE.cxx,v $
Language: C++
- Date: $Date: 2004/10/06 22:31:31 $
- Version: $Revision: 1.24 $
+ Date: $Date: 2004/10/08 04:52:55 $
+ Version: $Revision: 1.25 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
-#include <stdio.h>
#include "gdcmFile.h"
-#include <ctype.h> // For isprint()
#define str2num(str, typeNum) *((typeNum *)(str))
* at which the pixel data should be copied
* @return Boolean
*/
-bool gdcmFile::gdcm_read_RLE_file (FILE* fp,void* image_buffer) {
+bool gdcmFile::gdcm_read_RLE_file (FILE* fp,void* image_buffer)
+{
char * im = (char *)image_buffer;
long uncompressedSegmentSize = Header->GetXSize() * Header->GetYSize();
}
}
- if (Header->GetBitsAllocated()==16) { // try to deal with RLE 16 Bits
+ if (Header->GetBitsAllocated()==16)
+ {
+ // try to deal with RLE 16 Bits
im = (char *)image_buffer;
// need to make 16 Bits Pixels from Low Byte and Hight Byte 'Planes'
char * a = (char *)image_buffer;
char * b = a + l;
- for (int i=0;i<nbFrames;i++) {
- for (int j=0;j<l; j++) {
+ for (int i=0;i<nbFrames;i++)
+ {
+ for (int j=0;j<l; j++)
+ {
*(x++) = *(a++);
*(x++) = *(b++);
}
// ----------------------------------------------------------------------------
// RLE LossLess Fragment
int gdcmFile::gdcm_read_RLE_fragment(char** areaToRead, long lengthToDecode,
- long uncompressedSegmentSize, FILE* fp) {
+ long uncompressedSegmentSize, FILE* fp)
+{
(void)lengthToDecode; //FIXME
int count;
long numberOfOutputBytes=0;
{
fread(&n,sizeof(char),1,fp);
count=n;
- if (count >= 0 && count <= 127) {
+ if (count >= 0 && count <= 127)
+ {
fread(*areaToRead,(count+1)*sizeof(char),1,fp);
*areaToRead+=count+1;
numberOfOutputBytes+=count+1;
- } else {
- if (count <= -1 && count >= -127) {
+ }
+ else
+ {
+ if (count <= -1 && count >= -127)
+ {
fread(&car,sizeof(char),1,fp);
- for(int i=0; i<-count+1; i++) {
+ for(int i=0; i<-count+1; i++)
+ {
(*areaToRead)[i]=car;
}
*areaToRead+=(-count+1);