-// gdcmParse.cxx
-//-----------------------------------------------------------------------------
+/*=========================================================================
+
+ Program: gdcm
+ Module: $RCSfile: gdcmParsePixels.cxx,v $
+ Language: C++
+ Date: $Date: 2004/07/17 22:47:01 $
+ Version: $Revision: 1.9 $
+
+ 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.htm 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 "gdcmCommon.h"
#include "gdcmFile.h"
nb = atoi(str_nb.c_str() );
if (nb == 12) nb =16;
}
- //int nBytes= nb/8; //FIXME
+ //int nBytes= nb/8; //FIXME
//int taille = Header->GetXSize() * Header->GetYSize() * Header->GetSamplesPerPixel();
printf ("Checking the Dicom-encapsulated Jpeg/RLE Pixels\n");
- guint16 ItemTagGr,ItemTagEl;
+ uint16_t ItemTagGr,ItemTagEl;
int ln;
long ftellRes;
//char * destination = NULL;
(unsigned)ftellRes,ln,ln);
if (ln != 0) {
// What is it used for ??
- char * BasicOffsetTableItemValue= (char *)malloc(ln+1);
+ char * BasicOffsetTableItemValue= new char[ln+1];
fread(BasicOffsetTableItemValue,ln,1,fp);
- guint32 a;
+ uint32_t a;
for (int i=0;i<ln;i+=4){
- a=str2num(&BasicOffsetTableItemValue[i],guint32);
+ a=str2num(&BasicOffsetTableItemValue[i],uint32_t);
printf(" x(%08x) %d\n",a,a);
}
}
// RLE Image
long RleSegmentLength[15],fragmentLength;
- guint32 nbRleSegments;
- guint32 RleSegmentOffsetTable[15];
+ uint32_t nbRleSegments;
+ uint32_t RleSegmentOffsetTable[15];
ftellRes=ftell(fp);
// Basic Offset Table with Item Value
// Item Tag
(unsigned)ftellRes,ln,ln);
if (ln != 0) {
// What is it used for ??
- char * BasicOffsetTableItemValue= (char *)malloc(ln+1);
+ char * BasicOffsetTableItemValue= new char[ln+1];
fread(BasicOffsetTableItemValue,ln,1,fp);
- guint32 a;
+ uint32_t a;
for (int i=0;i<ln;i+=4){
- a=str2num(&BasicOffsetTableItemValue[i],guint32);
+ a=str2num(&BasicOffsetTableItemValue[i],uint32_t);
printf(" x(%08x) %d\n",a,a);
}
}