[Gdcm-hackers] gdcm-git:Grassroots DICOM branch release updated. bec8d6d6616ed48934f441e5c5831fb88b
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Mathieu M. <ma...@us...> - 2014-06-13 15:44:03
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grassroots DICOM".
The branch, release has been updated
via bec8d6d6616ed48934f441e5c5831fb88b341610 (commit)
via 1d083238d8e6feef3f599d4e63659807e666126e (commit)
via 76680d884d2f0b79235b8db2600e546c26a6aad2 (commit)
via fb34bb7ff3480bd370719a94bb3e411187a40c0a (commit)
via f267c4d8b3aaac89ffc115b5afd580780cb91265 (commit)
via 479898ae4d8f8412ae69b73c4550a9d581ae10d2 (commit)
via c7c5c6e94ad8955811c3e137d0f9eca200715d14 (commit)
via 35923ded559fea8a2129d5976dbd1ed31a6dd402 (commit)
via 9837fde38e6472e3fd2b8ebca11211b9dd1f55bf (commit)
via 7d7fb586bd6f5e50b07c6f388aa20473e7f18e6c (commit)
from 1e719a7f969a9708cb942ff2a7c572d66465c9c1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceforge.net/p/gdcm/gdcm/ci/bec8d6d6616ed48934f441e5c5831fb88b341610/
commit bec8d6d6616ed48934f441e5c5831fb88b341610
Author: Pietro Cerutti <ga...@fr...>
Date: Fri Jun 13 17:27:40 2014 +0200
Wrong synopsis in manpage for gdcm2pnm
diff --git a/Utilities/doxygen/man/gdcm2pnm.man b/Utilities/doxygen/man/gdcm2pnm.man
index 0a0366b..88cb3c7 100644
--- a/Utilities/doxygen/man/gdcm2pnm.man
+++ b/Utilities/doxygen/man/gdcm2pnm.man
@@ -5,7 +5,7 @@
\section synopsis SYNOPSIS
\verbatim
-gdcmdiff [options] file-in bitmap-out
+gdcm2pnm [options] file-in bitmap-out
\endverbatim
\section description DESCRIPTION
https://sourceforge.net/p/gdcm/gdcm/ci/1d083238d8e6feef3f599d4e63659807e666126e/
commit 1d083238d8e6feef3f599d4e63659807e666126e
Author: Mathieu Malaterre <mat...@vo...>
Date: Fri Jun 13 17:25:36 2014 +0200
Simplify byte swapping code
See bug issue 307
diff --git a/Source/Common/gdcmSwapper.txx b/Source/Common/gdcmSwapper.txx
index add93b5..dced9fd 100644
--- a/Source/Common/gdcmSwapper.txx
+++ b/Source/Common/gdcmSwapper.txx
@@ -14,11 +14,42 @@
#ifndef GDCMSWAPPER_TXX
#define GDCMSWAPPER_TXX
-#ifdef GDCM_HAVE_BYTESWAP_H
-// TODO: not cross platform...
+#if defined(_MSC_VER)
+
+// http://msdn.microsoft.com/en-us/library/a3140177
+#include <stdlib.h>
+#define bswap_16(X) _byteswap_ushort(X)
+#define bswap_32(X) _byteswap_ulong(X)
+#define bswap_64(X) _byteswap_uint64(X)
+
+#elif defined(__GLIBC__) || defined(__CYGWIN__) // linux and al
+
+#include <endian.h>
#include <byteswap.h>
+
+#elif defined(__APPLE__)
+
+#include <machine/endian.h>
+#include <libkern/OSByteOrder.h>
+#define bswap_16(X) OSSwapInt16(X)
+#define bswap_32(X) OSSwapInt32(X)
+#define bswap_64(X) OSSwapInt64(X)
+
+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
+
+#include <sys/endian.h>
+#define bswap_16(X) bswap16(X)
+#define bswap_32(X) bswap32(X)
+#define bswap_64(X) bswap64(X)
+
+#elif defined(__OpenBSD__)
+
+#include <machine/endian.h>
+#define bswap_16(X) swap16(X)
+#define bswap_32(X) swap32(X)
+#define bswap_64(X) swap64(X)
+
#endif
-#include <stdlib.h>
#include "gdcmTag.h"
@@ -29,11 +60,7 @@ namespace gdcm
#ifdef GDCM_WORDS_BIGENDIAN
template <> inline uint16_t SwapperNoOp::Swap<uint16_t>(uint16_t val)
{
-#ifdef GDCM_HAVE_BYTESWAP_H
return bswap_16(val);
-#else
- return (val>>8) | (val<<8);
-#endif
}
template <> inline int16_t SwapperNoOp::Swap<int16_t>(int16_t val)
{
@@ -42,13 +69,7 @@ namespace gdcm
template <> inline uint32_t SwapperNoOp::Swap<uint32_t>(uint32_t val)
{
-#ifdef GDCM_HAVE_BYTESWAP_H
return bswap_32(val);
-#else
- val= ((val<<8)&0xFF00FF00) | ((val>>8)&0x00FF00FF);
- val= (val>>16) | (val<<16);
- return val;
-#endif
}
template <> inline int32_t SwapperNoOp::Swap<int32_t>(int32_t val)
{
@@ -60,13 +81,7 @@ namespace gdcm
}
template <> inline uint64_t SwapperNoOp::Swap<uint64_t>(uint64_t val)
{
-#ifdef GDCM_HAVE_BYTESWAP_H
return bswap_64(val);
-#else
- val= ((val<< 8)&0xFF00FF00FF00FF00ULL) | ((val>> 8)&0x00FF00FF00FF00FFULL);
- val= ((val<<16)&0xFFFF0000FFFF0000ULL) | ((val>>16)&0x0000FFFF0000FFFFULL);
- return (val>>32) | (val<<32);
-#endif
}
template <> inline int64_t SwapperNoOp::Swap<int64_t>(int64_t val)
{
@@ -111,11 +126,7 @@ namespace gdcm
#else
template <> inline uint16_t SwapperDoOp::Swap<uint16_t>(uint16_t val)
{
-#ifdef GDCM_HAVE_BYTESWAP_H
return bswap_16(val);
-#else
- return (val>>8) | (val<<8);
-#endif
}
template <> inline int16_t SwapperDoOp::Swap<int16_t>(int16_t val)
{
@@ -124,13 +135,7 @@ namespace gdcm
template <> inline uint32_t SwapperDoOp::Swap<uint32_t>(uint32_t val)
{
-#ifdef GDCM_HAVE_BYTESWAP_H
return bswap_32(val);
-#else
- val= ((val<<8)&0xFF00FF00) | ((val>>8)&0x00FF00FF);
- val= (val>>16) | (val<<16);
- return val;
-#endif
}
template <> inline int32_t SwapperDoOp::Swap<int32_t>(int32_t val)
{
@@ -142,13 +147,7 @@ namespace gdcm
}
template <> inline uint64_t SwapperDoOp::Swap<uint64_t>(uint64_t val)
{
-#ifdef GDCM_HAVE_BYTESWAP_H
return bswap_64(val);
-#else
- val= ((val<< 8)&0xFF00FF00FF00FF00ULL) | ((val>> 8)&0x00FF00FF00FF00FFULL);
- val= ((val<<16)&0xFFFF0000FFFF0000ULL) | ((val>>16)&0x0000FFFF0000FFFFULL);
- return (val>>32) | (val<<32);
-#endif
}
template <> inline int64_t SwapperDoOp::Swap<int64_t>(int64_t val)
{
https://sourceforge.net/p/gdcm/gdcm/ci/76680d884d2f0b79235b8db2600e546c26a6aad2/
commit 76680d884d2f0b79235b8db2600e546c26a6aad2
Author: Mathieu Malaterre <mat...@vo...>
Date: Fri Jun 13 17:25:25 2014 +0200
Remove a simple warning
diff --git a/Utilities/VTK/vtkGDCMImageReader2.cxx b/Utilities/VTK/vtkGDCMImageReader2.cxx
index badf2e9..412c231 100644
--- a/Utilities/VTK/vtkGDCMImageReader2.cxx
+++ b/Utilities/VTK/vtkGDCMImageReader2.cxx
@@ -1148,7 +1148,7 @@ int vtkGDCMImageReader2::RequestDataCompat()
int outExt[6];
output->GetExtent(outExt);
// The dext is the whole extent (includes not-loaded data)
- int *dext = this->GetDataExtent();
+ int *dext = this->GetDataExtent(); (void)dext;
char * pointer = static_cast<char*>(output->GetScalarPointerForExtent(outExt));
if( this->FileName )
https://sourceforge.net/p/gdcm/gdcm/ci/fb34bb7ff3480bd370719a94bb3e411187a40c0a/
commit fb34bb7ff3480bd370719a94bb3e411187a40c0a
Author: Mathieu Malaterre <mat...@vo...>
Date: Fri Jun 13 17:09:19 2014 +0200
Allow removal of items should work since gdcm requires undefined length anyway
diff --git a/Source/DataStructureAndEncodingDefinition/gdcmSequenceOfItems.cxx b/Source/DataStructureAndEncodingDefinition/gdcmSequenceOfItems.cxx
index 339cd52..4b3da17 100644
--- a/Source/DataStructureAndEncodingDefinition/gdcmSequenceOfItems.cxx
+++ b/Source/DataStructureAndEncodingDefinition/gdcmSequenceOfItems.cxx
@@ -25,6 +25,22 @@ void SequenceOfItems::AddItem(Item const &item)
}
}
+void SequenceOfItems::Clear()
+{
+ Items.clear();
+ assert( SequenceLengthField.IsUndefined() );
+}
+
+bool SequenceOfItems::RemoveItemByIndex( const SizeType position )
+{
+ if( position < 1 || position > Items.size() )
+ {
+ return false;
+ }
+ Items.erase (Items.begin() + position);
+ return true;
+}
+
Item &SequenceOfItems::GetItem(SizeType position)
{
if( position < 1 || position > Items.size() )
diff --git a/Source/DataStructureAndEncodingDefinition/gdcmSequenceOfItems.h b/Source/DataStructureAndEncodingDefinition/gdcmSequenceOfItems.h
index f90f0ab..d5176a2 100644
--- a/Source/DataStructureAndEncodingDefinition/gdcmSequenceOfItems.h
+++ b/Source/DataStructureAndEncodingDefinition/gdcmSequenceOfItems.h
@@ -68,11 +68,17 @@ public:
template <typename TDE>
VL ComputeLength() const;
- void Clear() {}
+
+ /// remove all items within the sequence
+ void Clear();
/// \brief Appends an Item to the already added ones
void AddItem(Item const &item);
+ /// Remove an Item as specified by its index, if index > size, false is returned
+ /// Index starts at 1 not 0
+ bool RemoveItemByIndex( const SizeType index );
+
SizeType GetNumberOfItems() const { return Items.size(); }
void SetNumberOfItems(SizeType n) { Items.resize(n); }
https://sourceforge.net/p/gdcm/gdcm/ci/f267c4d8b3aaac89ffc115b5afd580780cb91265/
commit f267c4d8b3aaac89ffc115b5afd580780cb91265
Author: Andres Gomez <ag...@ig...>
Date: Fri Jan 31 17:28:56 2014 +0200
DESIRED_CMAKE_CSHARP_COMPILER variable can also be "4"
diff --git a/CMake/UseCSharp.cmake b/CMake/UseCSharp.cmake
index 9ef42fc..3216b84 100644
--- a/CMake/UseCSharp.cmake
+++ b/CMake/UseCSharp.cmake
@@ -36,7 +36,7 @@ else()
set(CMAKE_CSHARP_INTERPRETER ${MONO_EXECUTABLE})
endif()
-set(DESIRED_CSHARP_COMPILER_VERSION 2 CACHE STRING "Pick a version for C# compiler to use: 1, 2 or 3")
+set(DESIRED_CSHARP_COMPILER_VERSION 2 CACHE STRING "Pick a version for C# compiler to use: 1, 2, 3 or 4")
mark_as_advanced(DESIRED_CSHARP_COMPILER_VERSION)
# default to v1:
https://sourceforge.net/p/gdcm/gdcm/ci/479898ae4d8f8412ae69b73c4550a9d581ae10d2/
commit 479898ae4d8f8412ae69b73c4550a9d581ae10d2
Author: Mathieu Malaterre <mat...@vo...>
Date: Fri Jun 13 16:19:24 2014 +0200
Remove paranoid checks
This check was invalid anyway. See bug 321
diff --git a/Source/MediaStorageAndFileFormat/gdcmImageChangeTransferSyntax.cxx b/Source/MediaStorageAndFileFormat/gdcmImageChangeTransferSyntax.cxx
index e5a89a0..28ea9cb 100644
--- a/Source/MediaStorageAndFileFormat/gdcmImageChangeTransferSyntax.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmImageChangeTransferSyntax.cxx
@@ -150,7 +150,7 @@ bool ImageChangeTransferSyntax::TryJPEGCodec(const DataElement &pixelde, Bitmap
// that can be both lossy and lossless:
if( ts.IsLossy() )
{
- assert( !ts.IsLossless() );
+ //assert( !ts.IsLossless() ); // I cannot do since since Try* functions are called with all TS, I could be receiving a JPEGLS TS...
jpgcodec.SetLossless( false );
}
https://sourceforge.net/p/gdcm/gdcm/ci/c7c5c6e94ad8955811c3e137d0f9eca200715d14/
commit c7c5c6e94ad8955811c3e137d0f9eca200715d14
Author: Mathieu Malaterre <mat...@vo...>
Date: Fri Jun 13 16:12:00 2014 +0200
Do not remove any existing IOP / IPP as a side effect of SetOrigin / SetDirCos
This would breaks some SOP extended class behavior and is a bad practice anyway. Close bug 322
diff --git a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx
index 2a8b2a9..457d4d4 100644
--- a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx
@@ -1606,8 +1606,9 @@ void ImageHelper::SetOriginValue(DataSet & ds, const Image & image)
if( ms == MediaStorage::SecondaryCaptureImageStorage )
{
- Tag ipp(0x0020,0x0032);
- ds.Remove( ipp );
+ // https://sourceforge.net/p/gdcm/bugs/322/
+ // default behavior is simply to pass
+ return;
}
// FIXME Hardcoded
@@ -1682,8 +1683,8 @@ void ImageHelper::SetDirectionCosinesValue(DataSet & ds, const std::vector<doubl
if( ms == MediaStorage::SecondaryCaptureImageStorage )
{
- Tag iop(0x0020,0x0037);
- ds.Remove( iop );
+ // https://sourceforge.net/p/gdcm/bugs/322/
+ // default behavior is simply to pass
return;
}
https://sourceforge.net/p/gdcm/gdcm/ci/35923ded559fea8a2129d5976dbd1ed31a6dd402/
commit 35923ded559fea8a2129d5976dbd1ed31a6dd402
Author: Mathieu Malaterre <mat...@vo...>
Date: Fri Jun 13 16:06:57 2014 +0200
Make sure that byteswap.h does provide bswap_32
diff --git a/Source/Common/CMakeLists.txt b/Source/Common/CMakeLists.txt
index 2f4e067..ea3a77a 100644
--- a/Source/Common/CMakeLists.txt
+++ b/Source/Common/CMakeLists.txt
@@ -20,7 +20,14 @@ mark_as_advanced(
CHECK_INCLUDE_FILE_CONCAT("sys/time.h" GDCM_HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILE_CONCAT("winsock.h" GDCM_HAVE_WINSOCK_H)
-CHECK_INCLUDE_FILE_CONCAT("byteswap.h" GDCM_HAVE_BYTESWAP_H)
+CHECK_INCLUDE_FILE_CONCAT("byteswap.h" GDCM_HAVE_BYTESWAP_FILE_H)
+# see bug #324
+if(GDCM_HAVE_BYTESWAP_FILE_H)
+ include(CheckCXXSourceCompiles)
+ CHECK_CXX_SOURCE_COMPILES(
+ "\#include <byteswap.h>\nint main() { return bswap_32( 42 ); }"
+ GDCM_HAVE_BYTESWAP_H)
+endif()
CHECK_INCLUDE_FILE("rpc.h" GDCM_HAVE_RPC_H)
CHECK_INCLUDE_FILE("langinfo.h" GDCM_HAVE_LANGINFO_H)
https://sourceforge.net/p/gdcm/gdcm/ci/9837fde38e6472e3fd2b8ebca11211b9dd1f55bf/
commit 9837fde38e6472e3fd2b8ebca11211b9dd1f55bf
Author: Mathieu Malaterre <mat...@vo...>
Date: Fri Jun 13 15:58:29 2014 +0200
Fix behavior of strstep + strdup + free
diff --git a/Source/Common/gdcmSystem.h b/Source/Common/gdcmSystem.h
index e43f099..ef0cecc 100644
--- a/Source/Common/gdcmSystem.h
+++ b/Source/Common/gdcmSystem.h
@@ -121,6 +121,8 @@ public:
static char *StrTokR(char *ptr, const char *sep, char **end);
/// strsep
+ /// param stringp is passed by pointer, it may be modified, you'll need to
+ /// make a copy, in case you want to free the memory pointed at
static char *StrSep(char **stringp, const char *delim);
/// return `locale charmap`
diff --git a/Testing/Source/Common/Cxx/TestSystem3.cxx b/Testing/Source/Common/Cxx/TestSystem3.cxx
index 3161203..04928f2 100644
--- a/Testing/Source/Common/Cxx/TestSystem3.cxx
+++ b/Testing/Source/Common/Cxx/TestSystem3.cxx
@@ -47,12 +47,14 @@ int TestSystem3(int, char *[])
{
std::vector< std::string > v;
char *string = strdup( isostr );
+ if(!string) return 1;
+ char *copy = string;
while ((token = gdcm::System::StrSep(&string, delim)) != NULL)
{
//printf("token=%s\n", token);
v.push_back( token );
}
- free( string );
+ free( copy );
if( v.size() != 3 ) return 1;
if( v[0] != "" ) return 1;
if( v[1] != "ISO 2022 IR 13" ) return 1;
https://sourceforge.net/p/gdcm/gdcm/ci/7d7fb586bd6f5e50b07c6f388aa20473e7f18e6c/
commit 7d7fb586bd6f5e50b07c6f388aa20473e7f18e6c
Author: Mathieu Malaterre <mat...@vo...>
Date: Fri Jun 13 15:46:57 2014 +0200
Make sure to compile any VTK 5 and above when compiling against VTK 6
diff --git a/Utilities/VTK/vtkGDCMImageReader.cxx b/Utilities/VTK/vtkGDCMImageReader.cxx
index 300aae3..335e29a 100644
--- a/Utilities/VTK/vtkGDCMImageReader.cxx
+++ b/Utilities/VTK/vtkGDCMImageReader.cxx
@@ -794,7 +794,7 @@ int vtkGDCMImageReader::RequestInformationCompat()
for(int i=0;i<6;++i)
this->ImageOrientationPatient[i] = dircos[i];
-#if ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 2 )
+#if VTK_MAJOR_VERSION >= 6 || ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 2 )
this->MedicalImageProperties->SetDirectionCosine( this->ImageOrientationPatient );
#endif
}
diff --git a/Utilities/VTK/vtkGDCMImageWriter.cxx b/Utilities/VTK/vtkGDCMImageWriter.cxx
index bd2dc09..a64cbae 100644
--- a/Utilities/VTK/vtkGDCMImageWriter.cxx
+++ b/Utilities/VTK/vtkGDCMImageWriter.cxx
@@ -879,14 +879,14 @@ int vtkGDCMImageWriter::WriteGDCMData(vtkImageData *data, int timeStep)
SetStringValueFromTag( this->MedicalImageProperties->GetPatientSex(), gdcm::Tag(0x0010,0x0040), ano);
// For ex: DICOM (0010,0030) = 19680427
SetStringValueFromTag( this->MedicalImageProperties->GetPatientBirthDate(), gdcm::Tag(0x0010,0x0030), ano);
-#if ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
+#if VTK_MAJOR_VERSION >= 6 || ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
// For ex: DICOM (0008,0020) = 20030617
if( vtkMedicalImageProperties::GetDateAsFields( this->MedicalImageProperties->GetStudyDate(), year, month, day ) )
SetStringValueFromTag( this->MedicalImageProperties->GetStudyDate(), gdcm::Tag(0x0008,0x0020), ano);
#endif
// For ex: DICOM (0008,0022) = 20030617
SetStringValueFromTag( this->MedicalImageProperties->GetAcquisitionDate(), gdcm::Tag(0x0008,0x0022), ano);
-#if ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
+#if VTK_MAJOR_VERSION >= 6 || ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
// For ex: DICOM (0008,0030) = 162552.0705 or 230012, or 0012
#if 0
int hour, minute, second;
@@ -985,7 +985,7 @@ int vtkGDCMImageWriter::WriteGDCMData(vtkImageData *data, int timeStep)
ds.Insert( de );
}
}
-#if ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
+#if VTK_MAJOR_VERSION >= 6 || ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
// User defined value
// Remap any user defined value from the DICOM name to the DICOM tag
unsigned int nvalues = this->MedicalImageProperties->GetNumberOfUserDefinedValues();
@@ -1130,7 +1130,7 @@ int vtkGDCMImageWriter::WriteGDCMData(vtkImageData *data, int timeStep)
{
iop[i+3] = dircos->GetElement(i,1);
}
-#if ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 2 )
+#if VTK_MAJOR_VERSION >= 6 || ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 2 )
const double *iop_mip = this->MedicalImageProperties->GetDirectionCosine();
if( iop[0] != iop_mip[0]
|| iop[1] != iop_mip[1]
diff --git a/Utilities/VTK/vtkGDCMPolyDataReader.cxx b/Utilities/VTK/vtkGDCMPolyDataReader.cxx
index 7875ede..de88431 100644
--- a/Utilities/VTK/vtkGDCMPolyDataReader.cxx
+++ b/Utilities/VTK/vtkGDCMPolyDataReader.cxx
@@ -76,13 +76,13 @@ void vtkGDCMPolyDataReader::FillMedicalImageInformation(const gdcm::Reader &read
this->MedicalImageProperties->SetPatientSex( gdcm::DirectoryHelper::GetStringValueFromTag( gdcm::Tag(0x0010,0x0040), ds).c_str() );
// For ex: DICOM (0010,0030) = 19680427
this->MedicalImageProperties->SetPatientBirthDate( gdcm::DirectoryHelper::GetStringValueFromTag( gdcm::Tag(0x0010,0x0030), ds).c_str() );
-#if ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
+#if VTK_MAJOR_VERSION >= 6 || ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
// For ex: DICOM (0008,0020) = 20030617
this->MedicalImageProperties->SetStudyDate( gdcm::DirectoryHelper::GetStringValueFromTag( gdcm::Tag(0x0008,0x0020), ds).c_str() );
#endif
// For ex: DICOM (0008,0022) = 20030617
this->MedicalImageProperties->SetAcquisitionDate( gdcm::DirectoryHelper::GetStringValueFromTag( gdcm::Tag(0x0008,0x0022), ds).c_str() );
-#if ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
+#if VTK_MAJOR_VERSION >= 6 || ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
// For ex: DICOM (0008,0030) = 162552.0705 or 230012, or 0012
this->MedicalImageProperties->SetStudyTime( gdcm::DirectoryHelper::GetStringValueFromTag( gdcm::Tag(0x0008,0x0030), ds).c_str() );
#endif
diff --git a/Utilities/VTK/vtkGDCMPolyDataWriter.cxx b/Utilities/VTK/vtkGDCMPolyDataWriter.cxx
index 5a908fb..ead79a3 100644
--- a/Utilities/VTK/vtkGDCMPolyDataWriter.cxx
+++ b/Utilities/VTK/vtkGDCMPolyDataWriter.cxx
@@ -385,16 +385,16 @@ void vtkGDCMPolyDataWriter::WriteRTSTRUCTInfo(gdcm::File &file)
SetStringValueFromTag( this->MedicalImageProperties->GetPatientSex(), gdcm::Tag(0x0010,0x0040), ano);
// For ex: DICOM (0010,0030) = 19680427
SetStringValueFromTag( this->MedicalImageProperties->GetPatientBirthDate(), gdcm::Tag(0x0010,0x0030), ano);
-#if ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
+#if VTK_MAJOR_VERSION >= 6 || ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
// For ex: DICOM (0008,0020) = 20030617
if( vtkMedicalImageProperties::GetDateAsFields( this->MedicalImageProperties->GetStudyDate(), year, month, day ) )
SetStringValueFromTag( this->MedicalImageProperties->GetStudyDate(), gdcm::Tag(0x0008,0x0020), ano);
#endif
// For ex: DICOM (0008,0022) = 20030617
SetStringValueFromTag( this->MedicalImageProperties->GetAcquisitionDate(), gdcm::Tag(0x0008,0x0022), ano);
-#if ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
+#if VTK_MAJOR_VERSION >= 6 || ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 0 )
// For ex: DICOM (0008,0030) = 162552.0705 or 230012, or 0012
-#if ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 4 )
+#if VTK_MAJOR_VERSION >= 6 || ( VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION > 4 )
int hour, minute, second;
if( vtkMedicalImageProperties::GetTimeAsFields( this->MedicalImageProperties->GetStudyTime(), hour, minute, second ) )
#endif
-----------------------------------------------------------------------
Summary of changes:
CMake/UseCSharp.cmake | 2 +-
Source/Common/CMakeLists.txt | 9 ++-
Source/Common/gdcmSwapper.txx | 69 ++++++++++----------
Source/Common/gdcmSystem.h | 2 +
.../gdcmSequenceOfItems.cxx | 16 +++++
.../gdcmSequenceOfItems.h | 8 ++-
.../gdcmImageChangeTransferSyntax.cxx | 2 +-
.../MediaStorageAndFileFormat/gdcmImageHelper.cxx | 9 ++-
Testing/Source/Common/Cxx/TestSystem3.cxx | 4 +-
Utilities/VTK/vtkGDCMImageReader.cxx | 2 +-
Utilities/VTK/vtkGDCMImageReader2.cxx | 2 +-
Utilities/VTK/vtkGDCMImageWriter.cxx | 8 +-
Utilities/VTK/vtkGDCMPolyDataReader.cxx | 4 +-
Utilities/VTK/vtkGDCMPolyDataWriter.cxx | 6 +-
Utilities/doxygen/man/gdcm2pnm.man | 2 +-
15 files changed, 89 insertions(+), 56 deletions(-)
hooks/post-receive
--
Grassroots DICOM
|