Program: gdcm
Module: $RCSfile: TestPrintTime.cxx,v $
Language: C++
- Date: $Date: 2005/05/10 12:12:02 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2005/05/11 14:40:56 $
+ 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
#include <iomanip> // for std::ios::left, ...
// Where is it?
-#define CLK_TCK 1
+//#define CLK_TCK 1 ///usr/include/bits/time.h:41: warning: this is the location of the previous definition
//Generated file:
)
# add test that require VTK:
IF(GDCM_VTK)
- # Include the VTK library
- INCLUDE(${VTK_USE_FILE})
-
- INCLUDE_DIRECTORIES(
- ${GDCM_SOURCE_DIR}/vtk/
- )
- SET(TEST_SOURCES ${TEST_SOURCES}
- VTKTestRead.cxx
- VTKTestReadSeq.cxx
- VTKTestWrite.cxx
- VTKTestWriteSeq.cxx
- )
+ IF(${VTK_MAJOR_VERSION} LESS 4)
+ MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !")
+ ELSE(${VTK_MAJOR_VERSION} LESS 4)
+ IF(${VTK_MAJOR_VERSION} EQUAL 4 AND ${VTK_MINOR_VERSION} EQUAL 4 AND ${VTK_BUILD_VERSION} LESS 3)
+ MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !"
+ "Although gdcm should compile fine. You just need to turn BUILD_TESTING:=OFF")
+ ENDIF(${VTK_MAJOR_VERSION} EQUAL 4 AND ${VTK_MINOR_VERSION} EQUAL 4 AND ${VTK_BUILD_VERSION} LESS 3)
+ # Include the VTK library since we know this is going to work
+ INCLUDE(${VTK_USE_FILE})
+
+ INCLUDE_DIRECTORIES(
+ ${GDCM_SOURCE_DIR}/vtk/
+ )
+ SET(TEST_SOURCES ${TEST_SOURCES}
+ VTKTestRead.cxx
+ VTKTestReadSeq.cxx
+ VTKTestWrite.cxx
+ VTKTestWriteSeq.cxx
+ )
+ ENDIF(${VTK_MAJOR_VERSION} LESS 4)
ENDIF(GDCM_VTK)
ENDIF (GDCM_DATA_ROOT)
Program: gdcm
Module: $RCSfile: gdcmDirList.cxx,v $
Language: C++
- Date: $Date: 2005/04/18 02:29:07 $
- Version: $Revision: 1.49 $
+ Date: $Date: 2005/05/11 14:40:57 $
+ Version: $Revision: 1.50 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <sys/types.h>
#endif
-namespace gdcm
+namespace gdcm
{
//-----------------------------------------------------------------------------
// Constructor / Destructor
Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2005/04/27 10:00:35 $
- Version: $Revision: 1.235 $
+ Date: $Date: 2005/05/11 14:40:57 $
+ Version: $Revision: 1.236 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// if sscanf cannot read any float value, it won't affect yspacing
int nbValues = sscanf( strSpacing.c_str(), "%f", &yspacing);
- // if no values, xspacing is set to 1.0
+ // if no values, yspacing is set to 1.0
if( nbValues == 0 )
yspacing = 1.0;
Program: gdcm
Module: $RCSfile: gdcmUtil.cxx,v $
Language: C++
- Date: $Date: 2005/04/19 09:58:19 $
- Version: $Revision: 1.148 $
+ Date: $Date: 2005/05/11 14:40:57 $
+ Version: $Revision: 1.149 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// FIXME the implementation is far from complete
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)
return (unsigned int)GetCurrentThreadId();
-#endif
+#else
#ifdef __linux__
return 0;
// Doesn't work on fedora, but is in the man page...
//return (unsigned int)gettid();
-#endif
+#else
#ifdef __sun
return (unsigned int)thr_self();
#else
//default implementation
return 0;
-#endif
+#endif // __sun
+#endif // __linux__
+#endif // Win32
}
unsigned int Util::GetCurrentProcessID()
#endif //_WIN32
/// \brief gets current M.A.C adress (for internal use only)
+int GetMacAddrSys ( unsigned char *addr );
int GetMacAddrSys ( unsigned char *addr )
{
#ifdef _WIN32
Program: gdcm
Module: $RCSfile: vtkGdcmWriter.cxx,v $
Language: C++
- Date: $Date: 2005/04/11 17:01:16 $
- Version: $Revision: 1.21 $
+ Date: $Date: 2005/05/11 14:40:58 $
+ Version: $Revision: 1.22 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <vtkPointData.h>
#include <vtkLookupTable.h>
-vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.21 $");
+#ifndef vtkFloatingPointType
+#define vtkFloatingPointType float
+#endif
+
+vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.22 $");
vtkStandardNewMacro(vtkGdcmWriter);
//-----------------------------------------------------------------------------
/// We should perform some checkings before forcing the Entry creation
// Spacing
- double *sp = image->GetSpacing();
+ vtkFloatingPointType *sp = image->GetSpacing();
str.str("");
// We are about to enter floating point value. By default ostringstream are smart and don't do fixed point
file->InsertValEntry(str.str(),0x0018,0x0088); // Spacing Between Slices
// Origin
- double *org = image->GetOrigin();
+ vtkFloatingPointType *org = image->GetOrigin();
/// \todo : Image Position Patient is meaningfull ONLY for CT an MR modality
/// We should perform some checkings before forcing the Entry creation
str.unsetf( std::ios::fixed ); //done with floating point values
// Window / Level
- double *rng=image->GetScalarRange();
+ vtkFloatingPointType *rng = image->GetScalarRange();
str.str("");
str << rng[1]-rng[0];
{
sprintf(this->InternalFileName, this->FilePattern,this->FileNumber);
}
+// Remove this code in case user is using VTK 4.2...
+#if !(VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION == 2)
if (this->FileNumber < this->MinimumFileNumber)
{
this->MinimumFileNumber = this->FileNumber;
{
this->MaximumFileNumber = this->FileNumber;
}
+#endif
}
// Write the file
Program: gdcm
Module: $RCSfile: vtkgdcmViewer.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 20:10:50 $
- Version: $Revision: 1.24 $
+ Date: $Date: 2005/05/11 14:40:58 $
+ 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
}
else
{
- double *range = reader->GetOutput()->GetScalarRange();
+ vtkFloatingPointType *range = reader->GetOutput()->GetScalarRange();
viewer->SetColorLevel (0.5 * (range[1] + range[0]));
viewer->SetColorWindow (range[1] - range[0]);
Program: gdcm
Module: $RCSfile: vtkgdcmViewer2.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 20:10:50 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2005/05/11 14:40:58 $
+ 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
}
else
{
- double *range = reader->GetOutput()->GetScalarRange();
+ vtkFloatingPointType *range = reader->GetOutput()->GetScalarRange();
viewer->SetColorLevel (0.5 * (range[1] + range[0]));
viewer->SetColorWindow (range[1] - range[0]);