case gdcmDicomDir::GDCM_DICOMDIR_IMAGE:
AddDicomDirImageToEnd(begin,end);
break;
+ case gdcmDicomDir::GDCM_DICOMDIR_NONE:
+ AddDicomDirImageToEnd(begin,end); //FIXME
+ break;
}
}
offset += 4; // delimiters don't have a value.
}
}
- bool res=SetEntryLengthByNumber(offset, 0x0004, 0x1220); // Hope there is no dupps.
+ //bool res=SetEntryLengthByNumber(offset, 0x0004, 0x1220); // Hope there is no dupps.
+ SetEntryLengthByNumber(offset, 0x0004, 0x1220); // Hope there is no dupps.
return;
}
std::string GetDirName(void);
- /// Character \
+ /// Character '\'
static const char SEPARATOR_X;
- /// Character /
+ /// Character '/'
static const char SEPARATOR_WIN;
/// depending on the O.S.
static const std::string SEPARATOR;
* failure e.g. MaxSize is lower than necessary.
*/
size_t gdcmFile::GetImageDataIntoVector (void* destination, size_t MaxSize) {
- size_t l = GetImageDataIntoVectorRaw (destination, MaxSize);
+ //size_t l = GetImageDataIntoVectorRaw (destination, MaxSize);
+ GetImageDataIntoVectorRaw (destination, MaxSize);
PixelRead=0 ; // no PixelRaw
if (!Header->HasLUT())
return lgrTotale;
if (v == "4294967295") // to avoid troubles in convertion
sprintf (st," x(ffffffff)");
else
- sprintf(st," x(%x)",(unsigned long)atof(v.c_str()));
+ {
+ //sprintf(st," x(%x)",(unsigned long)atof(v.c_str()));
+ sprintf(st," x(%x)", atoi(v.c_str()));//FIXME
+ }
s << st;
}
s << std::endl;
#define jpeg_read_header jReadHeader
#define jpeg_read_scanlines jReadScanlines
#define jpeg_finish_decompress jFinDecompress
-#define jpeg_create_decompress jCreaDecompress
+//#define jpeg_create_decompress jCreaDecompress //FIXME
// -----------------
#define jpeg_std_error jStdError
*/
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");
return false;
}
// constructor and destructor are protected to avoid end user to instanciate this class.
gdcmObject(ListTag::iterator begin,ListTag::iterator end,
TagHeaderEntryHT *ptagHT, ListTag *plistEntries);
- ~gdcmObject(void);
+ virtual ~gdcmObject(void);
void FillObject(std::list<gdcmElement> elemList);
nb = atoi(str_nb.c_str() );
if (nb == 12) nb =16;
}
- int nBytes= nb/8;
+ //int nBytes= nb/8; //FIXME
- int taille = Header->GetXSize() * Header->GetYSize() * Header->GetSamplesPerPixel();
+ //int taille = Header->GetXSize() * Header->GetYSize() * Header->GetSamplesPerPixel();
printf ("Checking the Dicom-encapsulated Jpeg/RLE Pixels\n");
guint16 ItemTagGr,ItemTagEl;
int ln;
long ftellRes;
- char * destination = NULL;
+ //char * destination = NULL;
// -------------------- for Parsing : Position on begining of Jpeg/RLE Pixels
ItemTagEl=Header->SwapShort(ItemTagEl);
}
printf ("at %x : ItemTag (should be fffe,e000): %04x,%04x\n",
- ftellRes,ItemTagGr,ItemTagEl );
+ (unsigned)ftellRes,ItemTagGr,ItemTagEl );
ftellRes=ftell(fp);
fread(&ln,4,1,fp);
if(Header->GetSwapCode())
ln=Header->SwapLong(ln); // Basic Offset Table Item Length
- printf("at %x : Basic Offset Table Item Length (??) %d x(%08x)\n",
- ftellRes,ln,ln);
+ printf("at %x : Basic Offset Table Item Length (\?\?) %d x(%08x)\n",
+ (unsigned)ftellRes,ln,ln);
if (ln != 0) {
// What is it used for ??
char * BasicOffsetTableItemValue= (char *)malloc(ln+1);
ItemTagEl=Header->SwapShort(ItemTagEl);
}
printf ("at %x : ItemTag (should be fffe,e000 or e0dd): %04x,%04x\n",
- ftellRes,ItemTagGr,ItemTagEl );
+ (unsigned)ftellRes,ItemTagGr,ItemTagEl );
while ( ( ItemTagGr==0xfffe) && (ItemTagEl!=0xe0dd) ) { // Parse fragments
if(Header->GetSwapCode())
ln=Header->SwapLong(ln); // length
printf(" at %x : fragment length %d x(%08x)\n",
- ftellRes, ln,ln);
+ (unsigned)ftellRes, ln,ln);
// destination += taille * nBytes; // location in user's memory
//printf (" Destination will be x(%x) = %d \n",
ItemTagEl=Header->SwapShort(ItemTagEl);
}
printf ("at %x : ItemTag (should be fffe,e000 or e0dd): %04x,%04x\n",
- ftellRes,ItemTagGr,ItemTagEl );
+ (unsigned)ftellRes,ItemTagGr,ItemTagEl );
}
} else {
ItemTagEl=Header->SwapShort(ItemTagEl);
}
printf ("at %x : ItemTag (should be fffe,e000): %04x,%04x\n",
- ftellRes,ItemTagGr,ItemTagEl );
+ (unsigned)ftellRes,ItemTagGr,ItemTagEl );
// Item Length
ftellRes=ftell(fp);
fread(&ln,4,1,fp);
if(Header->GetSwapCode())
ln=Header->SwapLong(ln); // Basic Offset Table Item Length
- printf("at %x : Basic Offset Table Item Length (??) %d x(%08x)\n",
- ftellRes,ln,ln);
+ printf("at %x : Basic Offset Table Item Length (\?\?) %d x(%08x)\n",
+ (unsigned)ftellRes,ln,ln);
if (ln != 0) {
// What is it used for ??
char * BasicOffsetTableItemValue= (char *)malloc(ln+1);
ItemTagEl=Header->SwapShort(ItemTagEl);
}
printf ("at %x : ItemTag (should be fffe,e000 or e0dd): %04x,%04x\n",
- ftellRes,ItemTagGr,ItemTagEl );
+ (unsigned)ftellRes,ItemTagGr,ItemTagEl );
// while 'Sequence Delimiter Item' (fffe,e0dd) not found
while ( ( ItemTagGr == 0xfffe) && (ItemTagEl != 0xe0dd) ) {
if(Header->GetSwapCode())
fragmentLength=Header->SwapLong(fragmentLength); // length
printf(" at %x : 'fragment' length %d x(%08x)\n",
- ftellRes, fragmentLength,fragmentLength);
+ (unsigned)ftellRes, (unsigned)fragmentLength,(unsigned)fragmentLength);
//------------------ scanning (not reading) fragment pixels
if(Header->GetSwapCode())
RleSegmentOffsetTable[k]=Header->SwapLong(RleSegmentOffsetTable[k]);
printf(" at : %x Offset Segment %d : %d (%x)\n",
- ftellRes,k,RleSegmentOffsetTable[k],
+ (unsigned)ftellRes,k,RleSegmentOffsetTable[k],
RleSegmentOffsetTable[k]);
}
if (nbRleSegments>1) { // skipping (not reading) RLE Segments
- for(int k=1; k<=nbRleSegments-1; k++) {
+ for(unsigned int k=1; k<=nbRleSegments-1; k++) {
RleSegmentLength[k]= RleSegmentOffsetTable[k+1]
- RleSegmentOffsetTable[k];
ftellRes=ftell(fp);
printf (" Segment %d : Length = %d x(%x) Start at %x\n",
- k,RleSegmentLength[k],RleSegmentLength[k], ftellRes);
+ k,(unsigned)RleSegmentLength[k],(unsigned)RleSegmentLength[k], (unsigned)ftellRes);
fseek(fp,RleSegmentLength[k],SEEK_CUR);
}
}
- RleSegmentOffsetTable[nbRleSegments];
ftellRes=ftell(fp);
printf (" Segment %d : Length = %d x(%x) Start at %x\n",
- nbRleSegments,RleSegmentLength[nbRleSegments],
- RleSegmentLength[nbRleSegments],ftellRes);
+ nbRleSegments,(unsigned)RleSegmentLength[nbRleSegments],
+ (unsigned)RleSegmentLength[nbRleSegments],(unsigned)ftellRes);
fseek(fp,RleSegmentLength[nbRleSegments],SEEK_CUR);
ItemTagEl=Header->SwapShort(ItemTagEl);
}
printf ("at %x : ItemTag (should be fffe,e000 or e0dd): %04x,%04x\n",
- ftellRes,ItemTagGr,ItemTagEl );
+ (unsigned)ftellRes,ItemTagGr,ItemTagEl );
}
}
return true;
* @param exception_on_error
*/
gdcmParser::gdcmParser(bool exception_on_error) {
+ (void)exception_on_error;
enableSequences=0;
SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE);
return NULL;
size_t o =(size_t)Element->GetOffset();
fseek(fp, o, SEEK_SET);
- int l=Element->GetLength();
+ size_t l=Element->GetLength();
void * a = malloc(l);
if(!a)
return NULL;
{
// FIXME: g++ -Wall -Wstrict-prototypes reports on following line:
// warning: unsigned int format, different type arg
- sscanf(g->first.c_str(),"%x",&gr_bid);
+ sscanf(g->first.c_str(),"%x",&gr_bid); //FIXME
tk = g->first + "|0000"; // generate the element full tag
if ( tagHT.count(tk) == 0) // if element 0x0000 not found
*/
void gdcmParser::WriteEntryValue(gdcmHeaderEntry *tag, FILE *_fp,FileType type)
{
+ (void)type;
guint16 group = tag->GetGroup();
std::string vr = tag->GetVR();
guint32 lgr = tag->GetReadLength();
if (vr == "US" || vr == "SS")
{
// some 'Short integer' fields may be mulivaluated
- // each single value is separated from the next one by \
+ // each single value is separated from the next one by '\'
// we split the string and write each value as a short int
std::vector<std::string> tokens;
tokens.erase(tokens.begin(),tokens.end()); // clean any previous value
return;
}
// some 'Integer' fields may be mulivaluated
- // each single value is separated from the next one by \
+ // each single value is separated from the next one by '\'
// we split the string and write each value as an int
if (vr == "UL" || vr == "SL")
{
* @return false if file is not ACR-NEMA / DICOM
*/
bool gdcmParser::ParseHeader(bool exception_on_error) throw(gdcmFormatError) {
-
+ (void)exception_on_error;
rewind(fp);
if (!CheckSwap())
return false;
*/
void gdcmParser::FindHeaderEntryLength (gdcmHeaderEntry *Entry) {
guint16 element = Entry->GetElement();
- guint16 group = Entry->GetGroup();
+ //guint16 group = Entry->GetGroup(); //FIXME
std::string vr = Entry->GetVR();
guint16 length16;
// When short integer(s) are expected, read and convert the following
// n * 2 bytes properly i.e. as a multivaluated strings
- // (each single value is separated fromthe next one by \
+ // (each single value is separated fromthe next one by '\'
// as usual for standard multivaluated filels
// Elements with Value Multiplicity > 1
// contain a set of short integers (not a single one)
// When integer(s) are expected, read and convert the following
// n * 4 bytes properly i.e. as a multivaluated strings
- // (each single value is separated fromthe next one by \
+ // (each single value is separated fromthe next one by '\'
// as usual for standard multivaluated filels
// Elements with Value Multiplicity > 1
// contain a set of integers (not a single one)
}
if (nbRleSegments>1) {
- for(int k=1; k<=nbRleSegments-1; k++) { // reading RLE Segments
+ for(unsigned int k=1; k<=nbRleSegments-1; k++) { // reading RLE Segments
RleSegmentLength[k]=RleSegmentOffsetTable[k+1]-RleSegmentOffsetTable[k];
ftellRes=ftell(fp);
fragmentBegining=ftell(fp);
// RLE LossLess Fragment
int gdcmFile::gdcm_read_RLE_fragment(char **areaToRead, long lengthToDecode,
long uncompressedSegmentSize, FILE *fp) {
+ (void)lengthToDecode; //FIXME
long ftellRes;
int count;
long numberOfOutputBytes=0;
std::string CreateCleanString(std::string s) {
std::string str=s;
- for(int i=0;i<str.size();i++)
+ for(unsigned int i=0;i<str.size();i++)
{
if(!isprint(str[i]))
str[i]='.';
##CXXFLAGS = @CXXFLAGS@\r
\r
SET(libgdcmijpeg8_la_SOURCES\r
- jcapimin.c \r
- jcapistd.c \r
- jctrans.c \r
- jcparam.c\r
- jdatadst.c \r
- jcinit.c \r
- jcmaster.c \r
- jcmarker.c \r
- jcmainct.c \r
- jcprepct.c \r
- jccoefct.c \r
- jccolor.c \r
- jcsample.c \r
- jchuff.c \r
- jcphuff.c \r
- jcdctmgr.c \r
+# jcapimin.c \r
+# jcapistd.c \r
+# jctrans.c \r
+# jcparam.c\r
+# jdatadst.c \r
+# jcinit.c \r
+# jcmaster.c \r
+# jcmarker.c \r
+# jcmainct.c \r
+# jcprepct.c \r
+# jccoefct.c \r
+# jccolor.c \r
+# jcsample.c \r
+# jchuff.c \r
+# jcphuff.c \r
+# jcdctmgr.c \r
jfdctfst.c \r
jfdctflt.c \r
jfdctint.c \r
#INSTALL_FILES(/include FILES jconfig.linux jconfig.vc)\r
INSTALL_FILES(/include FILES jconfig.linux)\r
\r
-INSTALL_TARGETS(/lib/ gdcmijpeg8)
\ No newline at end of file
+INSTALL_TARGETS(/lib/ gdcmijpeg8)\r
##CXXFLAGS = @CXXFLAGS@\r
\r
SET(libgdcmijpeg8_la_SOURCES\r
- jcapimin.c \r
- jcapistd.c \r
- jctrans.c \r
- jcparam.c\r
- jdatadst.c \r
- jcinit.c \r
- jcmaster.c \r
- jcmarker.c \r
- jcmainct.c \r
- jcprepct.c \r
- jccoefct.c \r
- jccolor.c \r
- jcsample.c \r
- jchuff.c \r
- jcphuff.c \r
- jcdctmgr.c \r
+# jcapimin.c \r
+# jcapistd.c \r
+# jctrans.c \r
+# jcparam.c\r
+# jdatadst.c \r
+# jcinit.c \r
+# jcmaster.c \r
+# jcmarker.c \r
+# jcmainct.c \r
+# jcprepct.c \r
+# jccoefct.c \r
+# jccolor.c \r
+# jcsample.c \r
+# jchuff.c \r
+# jcphuff.c \r
+# jcdctmgr.c \r
jfdctfst.c \r
jfdctflt.c \r
jfdctint.c \r
#INSTALL_FILES(/include FILES jconfig.linux jconfig.vc)\r
INSTALL_FILES(/include FILES jconfig.linux)\r
\r
-INSTALL_TARGETS(/lib/ gdcmijpeg8)
\ No newline at end of file
+INSTALL_TARGETS(/lib/ gdcmijpeg8)\r