Program: gdcm
Module: $RCSfile: TestAllReadCompareDicom.cxx,v $
Language: C++
- Date: $Date: 2005/04/18 01:50:54 $
- Version: $Revision: 1.38 $
+ Date: $Date: 2005/04/19 10:05:36 $
+ Version: $Revision: 1.39 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
int sizeX;
int sizeY;
int sizeZ;
- int scalarSize;
- int components;
+ uint16_t scalarSize;
+ uint16_t components;
uint8_t *data;
int swapCode;
sizeY = ReadInt32(fp); // Size Y
sizeZ = ReadInt32(fp); // Size Z
scalarSize = ReadInt16(fp)/8; // bits per scalar
- components = ReadInt16(fp); // Number of components
+ components = ReadInt16(fp); // Number of components
return(true);
}
WriteInt32(fp,sizeY); // Size Y
WriteInt32(fp,sizeZ); // Size Z
WriteInt16(fp,scalarSize*8); // bits per scalar
- WriteInt16(fp,components); // number of components
+ WriteInt16(fp,components); // number of components
return(true);
}
Program: gdcm
Module: $RCSfile: TestBuildUpDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 10:41:10 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2005/04/19 10:03:22 $
+ 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
std::cout << "Pysician : ["
<< valueStuff
<< "]" << std::endl;
- if ( !(s12 = p1->GetNextStudy()) )
+ if ( (s12 = p1->GetNextStudy()) == 0 )
{
errorFound = true;
break;
<< s12->GetEntryValue(0x0008,0x1060)
<< "]" << std::endl;
- if ( !(s13 = p1->GetNextStudy()) )
+ if ( (s13 = p1->GetNextStudy()) == 0 )
{
std::cout << "Study StudyDescrOne.Tree missing" << std::endl;
break;
<< valueStuff
<< "]" << std::endl;
- if (!(s111 = s11->GetFirstSerie()) )
+ if ((s111 = s11->GetFirstSerie()) == 0 )
{
std::cout << "Serie 01-01-111 missing" << std::endl;
errorFound = true;
<< valueStuff
<< "]" << std::endl;
- if ( !(s1111 = s111->GetFirstImage()) )
+ if ( (s1111 = s111->GetFirstImage()) == 0 )
{
std::cout << "missing image S1111" << std::endl;
errorFound = true;
break;
}
*/
- if ( !(s1112 = s111->GetNextImage()) )
+ if ( (s1112 = s111->GetNextImage()) == 0 )
{
std::cout << "missing image S1112" << std::endl;
errorFound = true;
Program: gdcm
Module: $RCSfile: TestCopyRescaleDicom.cxx,v $
Language: C++
- Date: $Date: 2005/02/09 22:50:47 $
- Version: $Revision: 1.17 $
+ Date: $Date: 2005/04/19 10:02:40 $
+ Version: $Revision: 1.18 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if ( gdcm::BinEntry *b = dynamic_cast<gdcm::BinEntry*>(d) )
{
copyF.InsertBinEntry( b->GetBinArea(),b->GetLength(),
- b->GetGroup(),b->GetElement(),
- b->GetVR() );
+ b->GetGroup(),b->GetElement(),
+ b->GetVR() );
}
else if ( gdcm::ValEntry *v = dynamic_cast<gdcm::ValEntry*>(d) )
{
copyF.InsertValEntry( v->GetValue(),
- v->GetGroup(),v->GetElement(),
- v->GetVR() );
+ v->GetGroup(),v->GetElement(),
+ v->GetVR() );
}
else
{
uint8_t *tmpRescale = rescaleImage;
for(unsigned int i=0; i<rescaleSize; i++)
{
- *tmpRescale = (*tmpImage)>>8;
+ *tmpRescale = (uint8_t)( (*tmpImage)>>8 );
tmpImage++;
tmpRescale++;
}
Program: gdcm
Module: $RCSfile: TestWriteSimple.cxx,v $
Language: C++
- Date: $Date: 2005/03/09 09:45:33 $
- Version: $Revision: 1.28 $
+ Date: $Date: 2005/04/19 10:05:37 $
+ 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
fileToBuild->InsertValEntry(str.str(),0x0028,0x0101); // Bits Stored
str.str("");
- str << img.componentSize - 1;
+ str << ( img.componentSize - 1 );
fileToBuild->InsertValEntry(str.str(),0x0028,0x0102); // High Bit
// Set the pixel representation
{
for(int c=0;c<img.components;c++)
{
- *tmp = j%256;
+ *tmp = (unsigned char)(j%256);
if( img.componentSize>8 )
{
- *(tmp+1) = j/256;
+ *(tmp+1) = (unsigned char)(j/256);
}
tmp += img.componentSize/8;
}
return 1;
}
- //gdcm::Debug::DebugOn();
+ gdcm::Debug::DebugOn();
int ret=0;
int i=0;
Program: gdcm
Module: $RCSfile: gdcmDocEntry.cxx,v $
Language: C++
- Date: $Date: 2005/03/11 11:08:31 $
- Version: $Revision: 1.54 $
+ Date: $Date: 2005/04/19 09:58:19 $
+ Version: $Revision: 1.55 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
uint16_t z = 0;
- uint16_t shortLgr = lgth;
+ uint16_t shortLgr = (uint16_t)lgth;
if (vr == GDCM_UNKNOWN)
{
Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2005/04/14 14:26:19 $
- Version: $Revision: 1.232 $
+ Date: $Date: 2005/04/19 09:58:19 $
+ Version: $Revision: 1.233 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// - when more than one frame are present, then we are in
// the case of a multi-frame image.
long frameLength;
- while ( (frameLength = ReadTagLength(0xfffe, 0xe000)) )
+ while ( (frameLength = ReadTagLength(0xfffe, 0xe000)) != 0 )
{
// Parse the RLE Header and store the corresponding RLE Segment
// Offset Table information on fragments of this current Frame.
// Loop on the fragments[s] and store the parsed information in a
// JPEGInfo.
long fragmentLength;
- while ( (fragmentLength = ReadTagLength(0xfffe, 0xe000)) )
+ while ( (fragmentLength = ReadTagLength(0xfffe, 0xe000)) != 0 )
{
long fragmentOffset = Fp->tellg();
Module: $RCSfile: gdcmFileHelper.cxx,v $
Language: C++
- Date: $Date: 2005/04/04 15:15:24 $
- Version: $Revision: 1.32 $
+ Date: $Date: 2005/04/19 09:58:19 $
+ 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
if ( ! FileInternal->GetValEntry(0x0008, 0x0010) )
FileInternal->InsertValEntry("", 0x0008, 0x0010);
SetWriteFileTypeToACR();
- break;
- SetWriteFileTypeToExplicitVR();
+ SetWriteFileTypeToImplicitVR();
CheckMandatoryElements();
+ break;
+
}
// --------------------------------------------------------------
Program: gdcm
Module: $RCSfile: gdcmUtil.cxx,v $
Language: C++
- Date: $Date: 2005/02/28 18:56:29 $
- Version: $Revision: 1.147 $
+ Date: $Date: 2005/04/19 09:58:19 $
+ Version: $Revision: 1.148 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
#ifdef _WIN32
WSADATA WinsockData;
- if (WSAStartup(MAKEWORD(2, 0), &WinsockData) != 0)
+ if ( (WSAStartup(MAKEWORD(2, 0), &WinsockData)) != 0)
{
std::cerr << "This program requires Winsock 2.x!" << std::endl;
return -1;