[med-svn] [gdcm] 01/05: Imported Upstream version 2.6.5
Gert Wollny
gert-guest at moszumanska.debian.org
Mon Aug 22 11:46:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
gert-guest pushed a commit to branch master
in repository gdcm.
commit 72e9b6690a9d70ffcf4db01cf8c2c21847d4844a
Author: Gert Wollny <gw.fossdev at gmail.com>
Date: Sat Aug 20 16:54:10 2016 +0000
Imported Upstream version 2.6.5
---
.travis.yml | 8 +-
Applications/Cxx/gdcmimg.cxx | 37 +++
CMake/FindOpenJPEG.cmake | 11 +-
CMakeLists.txt | 2 +-
Examples/Csharp/CMakeLists.txt | 1 +
Examples/Csharp/DumpCSA.cs | 71 +++++
Examples/Java/CMakeLists.txt | 2 +-
Source/Common/gdcmTesting.cxx | 45 ++--
.../gdcmFileMetaInformation.cxx | 27 ++
.../gdcmWriter.h | 1 +
Source/MediaStorageAndFileFormat/gdcmBitmap.cxx | 16 ++
.../gdcmImageRegionReader.h | 5 +
.../gdcmJPEG2000Codec.cxx | 291 ++++++++++++++++++---
.../gdcmJPEGBITSCodec.cxx | 12 +-
Source/MediaStorageAndFileFormat/gdcmOverlay.cxx | 2 +-
.../MediaStorageAndFileFormat/gdcmPixmapWriter.cxx | 52 ++--
Testing/Source/Common/Cxx/TestMD5.cxx | 9 +
Testing/Source/Common/Cxx/TestSHA1.cxx | 6 +
Testing/Source/Data/CMakeLists.txt | 6 +
Testing/Source/Data/gdcmMD5DataImages.cxx | 10 +
Testing/Source/Data/gdcmMediaStorageDataFiles.cxx | 9 +
.../gdcmSelectedPrivateGroupOffsetDataFiles.cxx | 9 +
.../Data/gdcmSelectedTagsOffsetDataFiles.cxx | 9 +
Testing/Source/Data/gdcmStreamOffsetDataFiles.cxx | 10 +-
.../Cxx/TestReaderCanRead.cxx | 20 +-
.../Java/CMakeLists.txt | 2 +-
.../Cxx/TestFileStreamer4.cxx | 11 +-
.../Cxx/TestImageRegionReader1.cxx | 8 +-
.../Cxx/TestImageRegionReader2.cxx | 8 +-
.../Cxx/TestImageRegionReader3.cxx | 8 +-
.../MediaStorageAndFileFormat/Cxx/TestPrinter1.cxx | 48 ++--
Utilities/Release/README.md | 11 +
Utilities/Release/release.sh | 3 +
Utilities/VTK/CMakeLists.txt | 5 +-
Utilities/VTK/vtkGDCMTesting.cxx | 6 +
Utilities/doxygen/CMakeLists.txt | 2 +-
Utilities/doxygen/man/gdcmconv.xml | 2 +-
Utilities/doxygen/man/gdcmdump.xml | 42 +--
Utilities/doxygen/man/gdcmimg.xml | 11 +
Utilities/doxygen/man/gdcmraw.xml | 4 +-
Utilities/doxygen/man/gdcmtar.xml | 4 +-
Wrapping/Python/docstrings.i | 36 ++-
42 files changed, 724 insertions(+), 158 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index b2a00c0..4c155a3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,6 +25,7 @@ matrix:
- CFLAGS="-g -O2"
- CXXFLAGS="-g -O2"
- B_NAME=default
+ - CPACK_NAME=Linux
- compiler: gcc
os: linux
addons: {apt: {packages: [default-jdk, mono-devel, swig, libcharls-dev, libvtk5-dev, libopenjpeg-dev, libexpat-dev, libz-dev, uuid-dev, python-all-dev, libpoppler-dev, xsltproc, docbook-xsl, dcmtk]}}
@@ -33,18 +34,21 @@ matrix:
- CXXFLAGS="-Wall -Wextra -m64"
- CMAKE_EXTRA="-DGDCM_USE_SYSTEM_OPENSSL:BOOL=ON -DGDCM_WRAP_PYTHON:BOOL=ON -DGDCM_WRAP_CSHARP:BOOL=ON -DGDCM_WRAP_JAVA:BOOL=ON -DGDCM_WRAP_PHP:BOOL=OFF -DGDCM_USE_SYSTEM_EXPAT:BOOL=ON -DGDCM_USE_SYSTEM_JSON:BOOL=OFF -DGDCM_USE_SYSTEM_LIBXML2:BOOL=ON -DGDCM_USE_SYSTEM_OPENJPEG:BOOL=ON -DGDCM_USE_SYSTEM_POPPLER:BOOL=ON -DGDCM_USE_SYSTEM_UUID:BOOL=ON -DGDCM_USE_SYSTEM_ZLIB:BOOL=ON -DGDCM_WEAK_SWIG_CHECK:BOOL=ON -DGDCM_LEGACY_SILENT:BOOL=ON"
- B_NAME=system
+ - CPACK_NAME=Linux
- compiler: clang
os: linux
env:
- CFLAGS="-g -O0 -Wall -Wextra -m64 -fsanitize=address,undefined,shift"
- CXXFLAGS="-g -O0 -Wall -Wextra -m64 -fsanitize=address,undefined,shift"
- B_NAME=fsanitize
+ - CPACK_NAME=Linux
- compiler: clang
os: osx
env:
- CFLAGS="-Wall -Wextra" # -m64 -fsanitize=address,undefined
- CXXFLAGS="-Wall -Wextra" # -m64 -fsanitize=address,undefined
- B_NAME=default
+ - CPACK_NAME=Darwin
before_install:
#- env
@@ -80,8 +84,8 @@ deploy:
api_key:
secure: R5+dbibdcgPHq6cAPC8uepifDuS3yjZu2dBB2oSeQtBZTAeN1VIfJMrF8TeQDqj2GC28RHxXm4BHwdJ2FUpBXjOS2eUE6Mto1Rbbvfi63MREnFPIAWkNyLtR2Jxq/Gzb8X05PbCWGwCNvX9eeo+qcWTpczuQvJ+/bds7MyRsk45+sUc+j7rglAbxewgijsXebCkObwaXmhqTYJwrvf2lyEnA2Jo1gL2WmK6iPjHvTOVS9JfBMqVRmlk7j8efnqag8fMCzNp1Ess5wBy5Jf58qvVs7RuuBi16s7vOOBtb9xVjcDB1KaAxc/dDQGQhRkrveBtH18ZpFrArOj6DBPbupS3+xuU4ywdYbCuGnvdpRFafBc+iNU4M81crkFUDmSPEQChBnL4wwpaYaQ1LlgdlF0r9/Rlu2/iqKe4t7rdZnkQqQ/3SNNf+x4AKnGmaSGasV/VUXstTGVrtl7hsDMzSdrVCXODao0SR [...]
file:
- - GDCM-$VTAG-Linux-x86_64.tar.gz
- - GDCM-$VTAG-Linux-x86_64.tar.bz2
+ - GDCM-$VTAG-$CPACK_NAME-x86_64.tar.gz
+ - GDCM-$VTAG-$CPACK_NAME-x86_64.tar.bz2
skip_cleanup: true
on:
repo: malaterre/GDCM
diff --git a/Applications/Cxx/gdcmimg.cxx b/Applications/Cxx/gdcmimg.cxx
index 345b1ce..7749c6a 100644
--- a/Applications/Cxx/gdcmimg.cxx
+++ b/Applications/Cxx/gdcmimg.cxx
@@ -142,6 +142,8 @@ static void PrintHelp()
std::cout << " -C --sop-class-uid SOP Class UID (name or value)." << std::endl;
std::cout << " -T --study-uid Study UID." << std::endl;
std::cout << " -S --series-uid Series UID." << std::endl;
+ std::cout << " --template DICOM template." << std::endl;
+ std::cout << " --keep-meta Keep meta info from template file (advanced users only)." << std::endl;
std::cout << " --root-uid Root UID." << std::endl;
std::cout << "Fill Options:" << std::endl;
std::cout << " -R --region %d,%d Region." << std::endl;
@@ -414,6 +416,7 @@ int main (int argc, char *argv[])
gdcm::Filename filename;
gdcm::Directory::FilenamesType filenames;
gdcm::Filename outfilename;
+ gdcm::Filename templatefilename;
unsigned int region[6] = {}; // Rows & Columns are VR=US anyway...
unsigned int color = 0;
int bregion = 0;
@@ -423,6 +426,8 @@ int main (int argc, char *argv[])
int pconf = 0; // planar configuration
int studyuid = 0;
int seriesuid = 0;
+ int templated = 0;
+ int keepmeta = 0;
unsigned int size[3] = {0,0,0};
unsigned int ndimension = 2;
int depth = 0;
@@ -473,6 +478,8 @@ int main (int argc, char *argv[])
{"pi", 1, &pinter, 1}, //
{"pf", 1, &pformat, 1}, //
{"offset", 1, &poffset, 1}, //
+ {"template", 1, &templated, 1},
+ {"keep-meta", 0, &keepmeta, 1}, // by default we do not want to keep
// General options !
{"verbose", 0, &verbose, 1},
@@ -587,6 +594,12 @@ int main (int argc, char *argv[])
poffset = 1;
start_pos = (size_t)atoll(optarg);
}
+ else if( option_index == 17 ) /* template */
+ {
+ assert( strcmp(s, "template") == 0 );
+ templated = 1;
+ templatefilename = optarg;
+ }
//printf (" with arg %s", optarg);
}
//printf ("\n");
@@ -831,6 +844,16 @@ int main (int argc, char *argv[])
//if( !inputextension || !outputextension ) return 1;
if( inputextension )
{
+ gdcm::Reader reader;
+ if( templated )
+ {
+ reader.SetFileName( templatefilename );
+ if( !reader.Read() )
+ {
+ std::cerr << "Failed to read: " << templatefilename << std::endl;
+ return 1;
+ }
+ }
if( gdcm::System::StrCaseCmp(inputextension,".raw") == 0 // watch out that .raw for kakadu means big-endian
|| gdcm::System::StrCaseCmp(inputextension,".rawl") == 0 // kakadu convention for raw little endian
|| gdcm::System::StrCaseCmp(inputextension,".gray") == 0 // imagemagick convention
@@ -844,6 +867,8 @@ int main (int argc, char *argv[])
}
gdcm::RAWCodec raw;
gdcm::PixmapWriter writer;
+ writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) );
+ writer.SetFile( reader.GetFile() );
// Because the RAW stream is not self sufficient, we need to pass in some extra
// user info:
unsigned int dims[3] = {};
@@ -909,6 +934,8 @@ int main (int argc, char *argv[])
}
gdcm::RLECodec rle;
gdcm::PixmapWriter writer;
+ writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) );
+ writer.SetFile( reader.GetFile() );
// Because the RLE stream is not self sufficient, we need to pass in some extra
// user info:
unsigned int dims[3] = {};
@@ -947,6 +974,8 @@ int main (int argc, char *argv[])
if( !GetPixelFormat( pf, depth, bpp, sign, pixelsign ) ) return 1;
pnm.SetPixelFormat( pf );
gdcm::PixmapWriter writer;
+ writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) );
+ writer.SetFile( reader.GetFile() );
if( !Populate( writer, pnm, filenames ) ) return 1;
// populate will guess pixel format and photometric inter from file, need
// to override after calling Populate:
@@ -977,6 +1006,8 @@ int main (int argc, char *argv[])
{
gdcm::PGXCodec pnm;
gdcm::PixmapWriter writer;
+ writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) );
+ writer.SetFile( reader.GetFile() );
if( !Populate( writer, pnm, filenames ) ) return 1;
if( !AddUIDs(sopclassuid, sopclass, study_uid, series_uid, writer ) ) return 1;
@@ -993,6 +1024,8 @@ int main (int argc, char *argv[])
{
gdcm::JPEGLSCodec jpeg;
gdcm::PixmapWriter writer;
+ writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) );
+ writer.SetFile( reader.GetFile() );
if( !Populate( writer, jpeg, filenames ) ) return 1;
if( !AddUIDs(sopclassuid, sopclass, study_uid, series_uid, writer ) ) return 1;
@@ -1018,6 +1051,8 @@ int main (int argc, char *argv[])
*/
gdcm::JPEG2000Codec jpeg;
gdcm::PixmapWriter writer;
+ writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) );
+ writer.SetFile( reader.GetFile() );
if( !Populate( writer, jpeg, filenames ) ) return 1;
if( !AddUIDs(sopclassuid, sopclass, study_uid, series_uid, writer ) ) return 1;
@@ -1042,6 +1077,8 @@ int main (int argc, char *argv[])
if( !GetPixelFormat( pf, depth, bpp, sign, pixelsign ) ) return 1;
jpeg.SetPixelFormat( pf );
gdcm::PixmapWriter writer;
+ writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) );
+ writer.SetFile( reader.GetFile() );
if( !Populate( writer, jpeg, filenames ) ) return 1;
if( !AddUIDs(sopclassuid, sopclass, study_uid, series_uid, writer ) ) return 1;
diff --git a/CMake/FindOpenJPEG.cmake b/CMake/FindOpenJPEG.cmake
index 010f22c..5db1b5c 100644
--- a/CMake/FindOpenJPEG.cmake
+++ b/CMake/FindOpenJPEG.cmake
@@ -18,7 +18,15 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-# Try first to locate a cmake config file
+# Try with pkg-config first
+find_package(PkgConfig)
+pkg_check_modules(OPENJPEG libopenjpeg1)
+if(OPENJPEG_FOUND)
+ set(OPENJPEG_MAJOR_VERSION 1)
+ set(OPENJPEG_INCLUDE_DIR ${OPENJPEG_INCLUDE_DIRS})
+ set(OPENJPEG_LIBRARIES ${OPENJPEG_LDFLAGS})
+else()
+# Try to locate a cmake config file
find_package(OpenJPEG QUIET NO_MODULE)
mark_as_advanced(OpenJPEG_DIR)
@@ -52,3 +60,4 @@ mark_as_advanced(
OPENJPEG_INCLUDE_DIR
)
endif()
+endif()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc053b8..fcd2649 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,7 @@ set(GDCM_PACKAGE_CONTACT "GDCM Developers <gdcm-developers at lists.sourceforge.net
#----------------------------------------------------------------------------
set(GDCM_MAJOR_VERSION 2)
set(GDCM_MINOR_VERSION 6)
-set(GDCM_BUILD_VERSION 4)
+set(GDCM_BUILD_VERSION 5)
set(GDCM_VERSION
"${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}")
# let advanced user the option to define GDCM_API_VERSION:
diff --git a/Examples/Csharp/CMakeLists.txt b/Examples/Csharp/CMakeLists.txt
index 54f17d4..54a0f53 100644
--- a/Examples/Csharp/CMakeLists.txt
+++ b/Examples/Csharp/CMakeLists.txt
@@ -26,6 +26,7 @@ set(CSHARP_EXAMPLES
FileStreaming
FileChangeTS
FileChangeTSLossy
+ DumpCSA
)
if(BUILD_TESTING)
diff --git a/Examples/Csharp/DumpCSA.cs b/Examples/Csharp/DumpCSA.cs
new file mode 100644
index 0000000..c29bc0a
--- /dev/null
+++ b/Examples/Csharp/DumpCSA.cs
@@ -0,0 +1,71 @@
+/*=========================================================================
+
+ Program: GDCM (Grassroots DICOM). A DICOM library
+
+ Copyright (c) 2006-2011 Mathieu Malaterre
+ All rights reserved.
+ See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html 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 notice for more information.
+
+=========================================================================*/
+
+/*
+ * Usage:
+ * $ bin/DumpCSA.exe input.dcm
+ */
+using System;
+using gdcm;
+
+public class DumpCSA
+{
+ public static int Main(string[] args)
+ {
+ string filename = args[0];
+
+ gdcm.Reader reader = new gdcm.Reader();
+ reader.SetFileName( filename );
+ if (!reader.Read()) return 1;
+
+ gdcm.File f = reader.GetFile();
+ gdcm.DataSet ds = f.GetDataSet();
+
+ string[] expectedSiemensTags = new string[] { "B_value" , "AcquisitionMatrixText" };
+ using (PrivateTag gtag = CSAHeader.GetCSAImageHeaderInfoTag())
+ {
+ if (ds.FindDataElement(gtag))
+ {
+ using (DataElement de = ds.GetDataElement(gtag))
+ {
+ if (de != null && !de.IsEmpty())
+ {
+ using (CSAHeader csa = new CSAHeader())
+ {
+ if (csa.LoadFromDataElement(de))
+ {
+ foreach (string str in expectedSiemensTags)
+ {
+ if (csa.FindCSAElementByName(str))
+ {
+ using (CSAElement elem = csa.GetCSAElementByName(str))
+ {
+ if (elem != null)
+ {
+ System.Console.WriteLine( elem.toString() );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ return 0;
+ }
+}
diff --git a/Examples/Java/CMakeLists.txt b/Examples/Java/CMakeLists.txt
index aa86a72..1acd963 100644
--- a/Examples/Java/CMakeLists.txt
+++ b/Examples/Java/CMakeLists.txt
@@ -1,4 +1,4 @@
-find_package(Java REQUIRED) # javac, jar
+find_package(Java ${GDCM_DEFAULT_JAVA_VERSION} REQUIRED) # javac, jar
find_package(JNI REQUIRED)
include_directories(
#${JNI_INCLUDE_PATH}
diff --git a/Source/Common/gdcmTesting.cxx b/Source/Common/gdcmTesting.cxx
index d6d4922..b4c615b 100644
--- a/Source/Common/gdcmTesting.cxx
+++ b/Source/Common/gdcmTesting.cxx
@@ -323,7 +323,7 @@ static const LossyFile gdcmLossyFilenames[] = {
{ 0,"D_CLUNIE_VL4_RLE.dcm" },
{ 0,"D_CLUNIE_RG1_RLE.dcm" },
{ 1,"JDDICOM_Sample2.dcm" },
-{0,"AMIInvalidPrivateDefinedLengthSQasUN.dcm" },
+{ 0,"AMIInvalidPrivateDefinedLengthSQasUN.dcm" },
{ 0,"SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm" },
{ 0,"CT-MONO2-8-abdo.dcm" },
{ 0,"D_CLUNIE_SC1_RLE.dcm" },
@@ -416,24 +416,31 @@ static const LossyFile gdcmLossyFilenames[] = {
{ 1,"multiframegrayscalewordscis.dcm" },
{ 1,"multiframesinglebitscis.dcm" },
{ 1,"multiframetruecolorscis.dcm" },
-{ 1, "SinglePrecisionSC.dcm" },
-{ 0, "signedtruecoloroldsc.dcm" },
-{ 0, "o.dcm" },
-{ 0, "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" },
-{ 0, "IM-0001-0066.CommandTag00.dcm" },
-{ 0, "NM_Kakadu44_SOTmarkerincons.dcm" },
-{ 0, "GDCMJ2K_TextGBR.dcm" },
-{ 0, "PhilipsInteraSeqTermInvLen.dcm" },
-{ 0, "LIBIDO-24-ACR_NEMA-Rectangle.dcm" },
-{ 0, "TOSHIBA_J2K_SIZ1_PixRep0.dcm" },
-{ 0, "TOSHIBA_J2K_SIZ0_PixRep1.dcm" },
-{ 0, "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" },
-{ 0, "NM-PAL-16-PixRep1.dcm" },
-{ 0, "MEDILABInvalidCP246_EVRLESQasUN.dcm" },
-{ 0, "JPEGInvalidSecondFrag.dcm" },
-{ 0, "SC16BitsAllocated_8BitsStoredJ2K.dcm" },
-{ 0, "SC16BitsAllocated_8BitsStoredJPEG.dcm" },
-{ 0, "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" },
+{ 1,"SinglePrecisionSC.dcm" },
+{ 0,"signedtruecoloroldsc.dcm" },
+{ 0,"o.dcm" },
+{ 0,"UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" },
+{ 0,"IM-0001-0066.CommandTag00.dcm" },
+{ 0,"NM_Kakadu44_SOTmarkerincons.dcm" },
+{ 0,"GDCMJ2K_TextGBR.dcm" },
+{ 0,"PhilipsInteraSeqTermInvLen.dcm" },
+{ 0,"LIBIDO-24-ACR_NEMA-Rectangle.dcm" },
+{ 0,"TOSHIBA_J2K_SIZ1_PixRep0.dcm" },
+{ 0,"TOSHIBA_J2K_SIZ0_PixRep1.dcm" },
+{ 0,"TOSHIBA_J2K_OpenJPEGv2Regression.dcm" },
+{ 0,"NM-PAL-16-PixRep1.dcm" },
+{ 0,"MEDILABInvalidCP246_EVRLESQasUN.dcm" },
+{ 0,"JPEGInvalidSecondFrag.dcm" },
+{ 0,"SC16BitsAllocated_8BitsStoredJ2K.dcm" },
+{ 0,"SC16BitsAllocated_8BitsStoredJPEG.dcm" },
+{ 0,"SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" },
+{ 0,"JPEGLS_CharLS_10742.dcm" },
+{ 1,"JPEGLosslessYBR_FULL_422.dcm" },
+{ 1,"JPEGNote_empty.dcm" },
+{ 1,"JPEGNote_missing.dcm" },
+{ 1,"JPEGNote_bogus.dcm" },
+{ 0,"RLEDebianBug816607Orig.dcm" },
+{ 0,"IllegalGroup2ImplicitTS.dcm" },
{ 0, NULL }
};
diff --git a/Source/DataStructureAndEncodingDefinition/gdcmFileMetaInformation.cxx b/Source/DataStructureAndEncodingDefinition/gdcmFileMetaInformation.cxx
index 0e8f5de..4a43cfd 100644
--- a/Source/DataStructureAndEncodingDefinition/gdcmFileMetaInformation.cxx
+++ b/Source/DataStructureAndEncodingDefinition/gdcmFileMetaInformation.cxx
@@ -778,7 +778,34 @@ std::istream &FileMetaInformation::ReadCompatInternal(std::istream &is)
}
}
// Now is a good time to find out the dataset transfer syntax
+ try {
ComputeDataSetTransferSyntax();
+ } catch( gdcm::Exception & ex ) {
+ // We were able to read some of the Meta Header, but failed to compute the DataSetTS
+ // technically GDCM is able to cope with any value here. But be kind and try to have a good guess:
+
+ gdcmWarningMacro( "Meta Header is bogus. Guessing DataSet TS." );
+ Tag t;
+ if( !t.Read<SwapperNoOp>(is) )
+ {
+ throw Exception( "Cannot read very first tag" );
+ }
+
+ char vr_str[3];
+ is.read(vr_str, 2);
+ vr_str[2] = '\0';
+ VR::VRType vr = VR::GetVRType(vr_str);
+ if( vr != VR::VR_END )
+ {
+ DataSetTS = TransferSyntax::ExplicitVRLittleEndian;
+ }
+ else
+ {
+ DataSetTS = TransferSyntax::ImplicitVRLittleEndian;
+ }
+ is.seekg(-6, std::ios::cur); // Seek back
+
+ }
}
}
// else
diff --git a/Source/DataStructureAndEncodingDefinition/gdcmWriter.h b/Source/DataStructureAndEncodingDefinition/gdcmWriter.h
index 8c5c276..2a8790a 100644
--- a/Source/DataStructureAndEncodingDefinition/gdcmWriter.h
+++ b/Source/DataStructureAndEncodingDefinition/gdcmWriter.h
@@ -84,6 +84,7 @@ protected:
protected:
std::ostream *Stream;
std::ofstream *Ofstream;
+ bool GetCheckFileMetaInformation() const { return CheckFileMetaInformation; }
private:
SmartPointer<File> F;
diff --git a/Source/MediaStorageAndFileFormat/gdcmBitmap.cxx b/Source/MediaStorageAndFileFormat/gdcmBitmap.cxx
index 316429b..08cfeba 100644
--- a/Source/MediaStorageAndFileFormat/gdcmBitmap.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmBitmap.cxx
@@ -96,8 +96,18 @@ void Bitmap::SetDimensions(const unsigned int *dims)
{
assert( NumberOfDimensions );
//assert( Dimensions.empty() );
+#if 0
Dimensions = std::vector<unsigned int>(dims,
dims+NumberOfDimensions);
+#else
+ assert( Dimensions.size() == 3 );
+ Dimensions[0] = dims[0];
+ Dimensions[1] = dims[1];
+ if( NumberOfDimensions == 2 )
+ Dimensions[2] = 1;
+ else
+ Dimensions[2] = dims[2];
+#endif
}
void Bitmap::SetDimension(unsigned int idx, unsigned int dim)
@@ -396,6 +406,12 @@ bool Bitmap::TryJPEGCodec(char *buffer, bool &lossyflag) const
i->SetPixelFormat( codec.GetPixelFormat() );
}
#endif
+ if( GetDimensions()[0] != codec.GetDimensions()[0]
+ || GetDimensions()[1] != codec.GetDimensions()[1] )
+{
+ gdcmWarningMacro( "dimension mismatch for JPEG" );
+ ((Bitmap*)this)->SetDimensions( codec.GetDimensions() ); //JPEGNote_bogus.dcm
+}
return true;
}
diff --git a/Source/MediaStorageAndFileFormat/gdcmImageRegionReader.h b/Source/MediaStorageAndFileFormat/gdcmImageRegionReader.h
index 2779c78..f3fe5ec 100644
--- a/Source/MediaStorageAndFileFormat/gdcmImageRegionReader.h
+++ b/Source/MediaStorageAndFileFormat/gdcmImageRegionReader.h
@@ -24,6 +24,11 @@ namespace gdcm
class ImageRegionReaderInternals;
/**
* \brief ImageRegionReader
+ * This class is able to read a region from a DICOM file containing an image. This implementation
+ * requires that the information stored in the DICOM header are consistent with what is in the
+ * encapsulated Pixel Data. This is technically not required by DICOM standard, which makes
+ * this implementation illegal with regards to the famous JPEG note:
+ * http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2.html\#para_4bcb841e-c6bf-4e26-82a5-3fad3c942da0
* \see ImageReader
*/
class GDCM_EXPORT ImageRegionReader : public ImageReader
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
index 3025621..a38fa57 100644
--- a/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
@@ -37,6 +37,203 @@
namespace gdcm
{
+/* Part 1 Table A.2 List of markers and marker segments */
+typedef enum {
+ FF30 = 0xFF30,
+ FF31 = 0xFF31,
+ FF32 = 0xFF32,
+ FF33 = 0xFF33,
+ FF34 = 0xFF34,
+ FF35 = 0xFF35,
+ FF36 = 0xFF36,
+ FF37 = 0xFF37,
+ FF38 = 0xFF38,
+ FF39 = 0xFF39,
+ FF3A = 0xFF3A,
+ FF3B = 0xFF3B,
+ FF3C = 0xFF3C,
+ FF3D = 0xFF3D,
+ FF3E = 0xFF3E,
+ FF3F = 0xFF3F,
+ SOC = 0xFF4F,
+ CAP = 0xFF50,
+ SIZ = 0xFF51,
+ COD = 0xFF52,
+ COC = 0xFF53,
+ TLM = 0xFF55,
+ PLM = 0XFF57,
+ PLT = 0XFF58,
+ QCD = 0xFF5C,
+ QCC = 0xFF5D,
+ RGN = 0xFF5E,
+ POC = 0xFF5F,
+ PPM = 0XFF60,
+ PPT = 0XFF61,
+ CRG = 0xFF63,
+ COM = 0xFF64,
+ SOT = 0xFF90,
+ SOP = 0xFF91,
+ EPH = 0XFF92,
+ SOD = 0xFF93,
+ EOC = 0XFFD9 /* EOI in old jpeg */
+} MarkerType;
+
+typedef enum {
+ JP = 0x6a502020,
+ FTYP = 0x66747970,
+ JP2H = 0x6a703268,
+ JP2C = 0x6a703263,
+ JP2 = 0x6a703220,
+ IHDR = 0x69686472,
+ COLR = 0x636f6c72,
+ XML = 0x786d6c20,
+ CDEF = 0x63646566,
+ CMAP = 0x636D6170,
+ PCLR = 0x70636c72,
+ RES = 0x72657320,
+} OtherType;
+
+static inline bool hasnolength( uint_fast16_t marker )
+{
+ switch( marker )
+ {
+ case FF30:
+ case FF31:
+ case FF32:
+ case FF33:
+ case FF34:
+ case FF35:
+ case FF36:
+ case FF37:
+ case FF38:
+ case FF39:
+ case FF3A:
+ case FF3B:
+ case FF3C:
+ case FF3D:
+ case FF3E:
+ case FF3F:
+ case SOC:
+ case SOD:
+ case EOC:
+ case EPH:
+ return true;
+ }
+ return false;
+}
+
+
+static inline bool read16(const char ** input, size_t * len, uint16_t * ret)
+{
+ if( *len >= 2 )
+ {
+ union { uint16_t v; char bytes[2]; } u;
+ memcpy(u.bytes, *input, 2);
+ *ret = SwapperDoOp::Swap(u.v);
+ *input += 2; *len -= 2;
+ return true;
+ }
+ return false;
+}
+
+
+static inline bool read32(const char ** input, size_t * len, uint32_t * ret)
+{
+ if( *len >= 4 )
+ {
+ union { uint32_t v; char bytes[4]; } u;
+ memcpy(u.bytes, *input, 4);
+ *ret = SwapperDoOp::Swap(u.v);
+ *input += 4; *len -= 4;
+ return true;
+ }
+ return false;
+}
+
+static inline bool read64(const char ** input, size_t * len, uint64_t * ret)
+{
+ if( *len >= 8 )
+ {
+ union { uint64_t v; char bytes[8]; } u;
+ memcpy(u.bytes, *input, 8);
+ *ret = SwapperDoOp::Swap(u.v);
+ *input += 8; *len -= 8;
+ return true;
+ }
+ return false;
+}
+
+
+static bool parsej2k_imp( const char * const stream, const size_t file_size, bool * lossless )
+{
+ uint16_t marker;
+ uintmax_t sotlen = 0;
+ size_t lenmarker;
+ const char * cur = stream;
+ size_t cur_size = file_size;
+ *lossless = false; // default init
+ while( read16(&cur, &cur_size, &marker) )
+ {
+ if ( !hasnolength( marker ) )
+ {
+ uint16_t l;
+ bool r = read16( &cur, &cur_size, &l );
+ if( !r || l < 2 )
+ break;
+ lenmarker = (size_t)l - 2;
+
+ if( marker == COD )
+ {
+ const uint8_t Transformation = *(cur+9);
+ if( Transformation == 0x0 ) { *lossless = false; return true; }
+ else if( Transformation == 0x1 ) *lossless = true;
+ else return false;
+ }
+ cur += lenmarker; cur_size -= lenmarker;
+ }
+ else if( marker == SOD )
+ return true;
+ }
+ return false;
+}
+
+static bool parsejp2_imp( const char * const stream, const size_t file_size, bool * lossless )
+{
+ uint32_t marker;
+ uint64_t len64; /* ref */
+ uint32_t len32; /* local 32bits op */
+ const char * cur = stream;
+ size_t cur_size = file_size;
+
+ while( read32(&cur, &cur_size, &len32) )
+ {
+ bool b = read32(&cur, &cur_size, &marker);
+ if( !b ) break;
+ len64 = len32;
+ if( len32 == 1 ) /* 64bits ? */
+ {
+ bool b = read64(&cur, &cur_size, &len64);
+ assert( b );
+ len64 -= 8;
+ }
+ if( marker == JP2C )
+ {
+ const size_t start = cur - stream;
+ if( !len64 )
+ {
+ len64 = (size_t)(file_size - start + 8);
+ }
+ assert( len64 >= 8 );
+ return parsej2k_imp( cur, len64 - 8, lossless );
+ }
+ const size_t lenmarker = len64 - 8;
+ cur += lenmarker;
+ }
+
+ return false;
+}
+
+
/**
sample error callback expecting a FILE* client object
*/
@@ -94,43 +291,46 @@ struct myfile
void gdcm_error_callback(const char* msg, void* f)
{
+#if 0
if( strcmp( msg, "Cannot read data with no size known, giving up\n" ) == 0 )
{
OPJ_UINT32 **s = (OPJ_UINT32**)f;
*s[1] = *s[0];
gdcmWarningMacro( "Recovering from odd J2K file" );
+ assert(0);
+ }
+ else
+#endif
+ {
+ fprintf( stderr, msg );
}
-// else
-// {
-// fprintf( stderr, msg );
-// }
}
-OPJ_UINT32 opj_read_from_memory(void * p_buffer, OPJ_UINT32 p_nb_bytes, myfile* p_file)
+OPJ_SIZE_T opj_read_from_memory(void * p_buffer, OPJ_SIZE_T p_nb_bytes, myfile* p_file)
{
//OPJ_UINT32 l_nb_read = fread(p_buffer,1,p_nb_bytes,p_file);
- OPJ_UINT32 l_nb_read;
- if( p_file->cur + p_nb_bytes < p_file->mem + p_file->len )
+ OPJ_SIZE_T l_nb_read;
+ if( p_file->cur + p_nb_bytes <= p_file->mem + p_file->len )
{
l_nb_read = 1*p_nb_bytes;
}
else
{
- l_nb_read = (OPJ_UINT32)(p_file->mem + p_file->len - p_file->cur);
+ l_nb_read = (OPJ_SIZE_T)(p_file->mem + p_file->len - p_file->cur);
assert( l_nb_read < p_nb_bytes );
}
memcpy(p_buffer,p_file->cur,l_nb_read);
p_file->cur += l_nb_read;
assert( p_file->cur <= p_file->mem + p_file->len );
//std::cout << "l_nb_read: " << l_nb_read << std::endl;
- return l_nb_read ? l_nb_read : ((OPJ_UINT32)-1);
+ return l_nb_read ? l_nb_read : ((OPJ_SIZE_T)-1);
}
-OPJ_UINT32 opj_write_from_memory (void * p_buffer, OPJ_UINT32 p_nb_bytes, myfile* p_file)
+OPJ_SIZE_T opj_write_from_memory (void * p_buffer, OPJ_SIZE_T p_nb_bytes, myfile* p_file)
{
//return fwrite(p_buffer,1,p_nb_bytes,p_file);
- OPJ_UINT32 l_nb_write;
+ OPJ_SIZE_T l_nb_write;
//if( p_file->cur + p_nb_bytes < p_file->mem + p_file->len )
// {
l_nb_write = 1*p_nb_bytes;
@@ -148,39 +348,40 @@ OPJ_UINT32 opj_write_from_memory (void * p_buffer, OPJ_UINT32 p_nb_bytes, myfile
//return p_nb_bytes;
}
-OPJ_SIZE_T opj_skip_from_memory (OPJ_SIZE_T p_nb_bytes, myfile * p_file)
+OPJ_OFF_T opj_skip_from_memory (OPJ_OFF_T p_nb_bytes, myfile * p_file)
{
//if (fseek(p_user_data,p_nb_bytes,SEEK_CUR))
// {
// return -1;
// }
- if( p_file->cur + p_nb_bytes < p_file->mem + p_file->len )
+ if( p_file->cur + p_nb_bytes <= p_file->mem + p_file->len )
{
p_file->cur += p_nb_bytes;
return p_nb_bytes;
}
p_file->cur = p_file->mem + p_file->len;
- return (OPJ_SIZE_T)-1;
+ return -1;
}
-bool opj_seek_from_memory (OPJ_SIZE_T p_nb_bytes, myfile * p_file)
+OPJ_BOOL opj_seek_from_memory (OPJ_OFF_T p_nb_bytes, myfile * p_file)
{
//if (fseek(p_user_data,p_nb_bytes,SEEK_SET))
// {
// return false;
// }
//return true;
- if( p_file->cur + p_nb_bytes < p_file->mem + p_file->len )
+ if( p_nb_bytes <= p_file->len )
{
- p_file->cur += p_nb_bytes;
- return true;
+ p_file->cur = p_file->mem + p_nb_bytes;
+ return OPJ_TRUE;
}
+
p_file->cur = p_file->mem + p_file->len;
- return false;
+ return OPJ_FALSE;
}
-opj_stream_t* OPJ_CALLCONV opj_stream_create_memory_stream (myfile* p_mem,OPJ_UINT32 p_size,bool p_is_read_stream)
+opj_stream_t* OPJ_CALLCONV opj_stream_create_memory_stream (myfile* p_mem,OPJ_SIZE_T p_size,bool p_is_read_stream)
{
opj_stream_t* l_stream = 00;
if
@@ -199,6 +400,7 @@ opj_stream_t* OPJ_CALLCONV opj_stream_create_memory_stream (myfile* p_mem,OPJ_UI
opj_stream_set_write_function(l_stream, (opj_stream_write_fn) opj_write_from_memory);
opj_stream_set_skip_function(l_stream, (opj_stream_skip_fn) opj_skip_from_memory);
opj_stream_set_seek_function(l_stream, (opj_stream_seek_fn) opj_seek_from_memory);
+ opj_stream_set_user_data_length(l_stream, p_mem->len /* p_size*/); /* important to avoid an assert() */
return l_stream;
}
@@ -538,15 +740,12 @@ std::pair<char *, size_t> JPEG2000Codec::DecodeByStreamsCommon(char *dummy_buffe
s[1] = 0;
opj_set_error_handler(dinfo, gdcm_error_callback, s);
-#ifdef OPJ_J2K_STREAM_CHUNK_SIZE
cio = opj_stream_create_memory_stream(fsrc,OPJ_J2K_STREAM_CHUNK_SIZE, true);
-#else
- cio = opj_stream_create_memory_stream(fsrc,J2K_STREAM_CHUNK_SIZE, true);
-#endif
/* setup the decoder decoding parameters using user parameters */
- opj_setup_decoder(dinfo, ¶meters);
bool bResult;
+ bResult = opj_setup_decoder(dinfo, ¶meters);
+ assert( bResult );
OPJ_INT32 l_tile_x0,l_tile_y0;
OPJ_UINT32 l_tile_width,l_tile_height,l_nb_tiles_x,l_nb_tiles_y;
#if 0
@@ -568,15 +767,10 @@ std::pair<char *, size_t> JPEG2000Codec::DecodeByStreamsCommon(char *dummy_buffe
#endif
assert( bResult );
-#if OPENJPEG_MAJOR_VERSION == 1
-#else
#if 0
- // needs to be before call to opj_decode...
- reversible = opj_get_reversible(dinfo, ¶meters );
- assert( reversible == 0 || reversible == 1 );
-#else
- reversible = 0;
-#endif
+ /* Optional if you want decode the entire image */
+ opj_set_decode_area(dinfo, image, (OPJ_INT32)parameters.DA_x0,
+ (OPJ_INT32)parameters.DA_y0, (OPJ_INT32)parameters.DA_x1, (OPJ_INT32)parameters.DA_y1);
#endif
bResult = opj_decode(dinfo, cio,image);
@@ -632,6 +826,17 @@ std::pair<char *, size_t> JPEG2000Codec::DecodeByStreamsCommon(char *dummy_buffe
gdcmErrorMacro( "Impossible happen" );
return std::make_pair<char*,size_t>(0,0);
}
+#else
+ bool b = false;
+ bool lossless;
+ if( parameters.decod_format == JP2_CFMT )
+ b = parsejp2_imp( dummy_buffer, buf_size, &lossless);
+ else if( parameters.decod_format == J2K_CFMT )
+ b = parsej2k_imp( dummy_buffer, buf_size, &lossless);
+
+ reversible = 0;
+ if( b )
+ reversible = lossless;
#endif // OPENJPEG_MAJOR_VERSION == 1
LossyFlag = !reversible;
@@ -981,9 +1186,16 @@ bool JPEG2000Codec::CodeFrameIntoBuffer(char * outdata, size_t outlen, size_t &
}
if(parameters.cp_comment == NULL) {
- const char comment[] = "Created by GDCM/OpenJPEG version 2.0";
+#if OPENJPEG_MAJOR_VERSION == 1
+ const char comment[] = "Created by GDCM/OpenJPEG version 1.4.0";
parameters.cp_comment = (char*)malloc(strlen(comment) + 1);
strcpy(parameters.cp_comment, comment);
+#else
+ const char comment[] = "Created by GDCM/OpenJPEG version %s";
+ const char * vers = opj_version();
+ parameters.cp_comment = (char*)malloc(strlen(comment) + 10);
+ snprintf( parameters.cp_comment, strlen(comment) + 10, comment, vers );
+#endif
/* no need to delete parameters.cp_comment on exit */
//delete_comment = false;
}
@@ -1065,7 +1277,7 @@ bool JPEG2000Codec::CodeFrameIntoBuffer(char * outdata, size_t outlen, size_t &
myfile *fsrc = &mysrc;
char *buffer_j2k = new char[inputlength]; // overallocated
fsrc->mem = fsrc->cur = buffer_j2k;
- fsrc->len = 0;
+ fsrc->len = 0; //inputlength;
/* open a byte stream for writing */
/* allocate memory for all tiles */
@@ -1363,7 +1575,16 @@ bool JPEG2000Codec::GetHeaderInfo(const char * dummy_buffer, size_t buf_size, Tr
// FIXME
assert( mct == 0 || mct == 1 );
#else
+ bool b = false;
+ bool lossless;
+ if( parameters.decod_format == JP2_CFMT )
+ b = parsejp2_imp( dummy_buffer, buf_size, &lossless);
+ else if( parameters.decod_format == J2K_CFMT )
+ b = parsej2k_imp( dummy_buffer, buf_size, &lossless);
+
reversible = 0;
+ if( b )
+ reversible = lossless;
#endif
#endif // OPENJPEG_MAJOR_VERSION == 1
LossyFlag = !reversible;
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEGBITSCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEGBITSCodec.cxx
index cf7b904..47dd10f 100644
--- a/Source/MediaStorageAndFileFormat/gdcmJPEGBITSCodec.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEGBITSCodec.cxx
@@ -551,7 +551,7 @@ UINT16 Y_density
|| cinfo.Y_density != 1
)
{
- gdcmErrorMacro( "Pixel Density from JFIF Marker is not supported (for now)" );
+ gdcmWarningMacro( "Pixel Density from JFIF Marker is not supported (for now)" );
//return false;
}
@@ -793,9 +793,15 @@ bool JPEGBITSCodec::DecodeByStreams(std::istream &is, std::ostream &os)
if( cinfo.image_width != dims[0]
|| cinfo.image_height != dims[1] )
{
- gdcmErrorMacro( "Unhandled: dimension mismatch. JPEG is " <<
+ gdcmWarningMacro( "dimension mismatch. JPEG is " <<
cinfo.image_width << "," << cinfo.image_height << " while DICOM " << dims[0] <<
- "," << dims[1] ); // FIXME is this ok by standard ?
+ "," << dims[1] );
+ //this->Dimensions[0] = cinfo.image_width;
+ //this->Dimensions[1] = cinfo.image_height;
+ /*
+ * Long story short, the real issue is that class such as ImageRegionReader expect to read the
+ * image information without ever touching the JPEG codestream...
+ */
return false;
}
assert( cinfo.image_width == dims[0] );
diff --git a/Source/MediaStorageAndFileFormat/gdcmOverlay.cxx b/Source/MediaStorageAndFileFormat/gdcmOverlay.cxx
index 6d44a75..2e88e40 100644
--- a/Source/MediaStorageAndFileFormat/gdcmOverlay.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmOverlay.cxx
@@ -262,7 +262,7 @@ bool Overlay::GrabOverlayFromPixelData(DataSet const &ds)
//assert( Internal->BitPosition >= 12 );
if( ds.FindDataElement( Tag(0x7fe0,0x0010) ) )
{
- gdcmErrorMacro("Could not find Pixel Data. Cannot extract Overlay." );
+ gdcmWarningMacro("Could not find Pixel Data. Cannot extract Overlay." );
return false;
}
const DataElement &pixeldata = ds.GetDataElement( Tag(0x7fe0,0x0010) );
diff --git a/Source/MediaStorageAndFileFormat/gdcmPixmapWriter.cxx b/Source/MediaStorageAndFileFormat/gdcmPixmapWriter.cxx
index ed3633a..321e594 100644
--- a/Source/MediaStorageAndFileFormat/gdcmPixmapWriter.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmPixmapWriter.cxx
@@ -573,10 +573,15 @@ bool PixmapWriter::PrepareWrite( MediaStorage const & ref_ms )
}
else
{
- assert( ds.FindDataElement( at1.GetTag() ) );
- //assert( ds.FindDataElement( at3.GetTag() ) );
- at1.Set( ds );
- assert( atoi(at1.GetValue().c_str()) == 1 );
+ if( ds.FindDataElement( at1.GetTag() ) ) {
+ //assert( ds.FindDataElement( at3.GetTag() ) );
+ at1.Set( ds );
+ if( atoi(at1.GetValue().c_str()) != 1 ) {
+ gdcmWarningMacro( "Invalid value for LossyImageCompression" );
+ }
+ } else {
+ gdcmWarningMacro( "Missing attribute for LossyImageCompression" );
+ }
}
}
@@ -757,18 +762,33 @@ bool PixmapWriter::PrepareWrite( MediaStorage const & ref_ms )
}
FileMetaInformation &fmi = file.GetHeader();
- fmi.Clear();
- //assert( ts == TransferSyntax::ImplicitVRLittleEndian );
- {
- const char *tsuid = TransferSyntax::GetTSString( ts );
- DataElement de( Tag(0x0002,0x0010) );
- VL::Type strlenTSUID = (VL::Type)strlen(tsuid);
- de.SetByteValue( tsuid, strlenTSUID );
- de.SetVR( Attribute<0x0002, 0x0010>::GetVR() );
- fmi.Replace( de );
- fmi.SetDataSetTransferSyntax(ts);
- }
- fmi.FillFromDataSet( ds );
+ if( GetCheckFileMetaInformation() )
+ {
+ fmi.Clear();
+ //assert( ts == TransferSyntax::ImplicitVRLittleEndian );
+ {
+ const char *tsuid = TransferSyntax::GetTSString( ts );
+ DataElement de( Tag(0x0002,0x0010) );
+ VL::Type strlenTSUID = (VL::Type)strlen(tsuid);
+ de.SetByteValue( tsuid, strlenTSUID );
+ de.SetVR( Attribute<0x0002, 0x0010>::GetVR() );
+ fmi.Replace( de );
+ fmi.SetDataSetTransferSyntax(ts);
+ }
+ fmi.FillFromDataSet( ds );
+ }
+ else
+ {
+ Attribute<0x0002,0x0010> at;
+ at.SetFromDataSet( fmi );
+ const char *tsuid = TransferSyntax::GetTSString( ts );
+ UIComp tsui = at.GetValue();
+ if( tsui != tsuid )
+ {
+ gdcmErrorMacro( "Incompatible TransferSyntax." );
+ return false;
+ }
+ }
return true;
diff --git a/Testing/Source/Common/Cxx/TestMD5.cxx b/Testing/Source/Common/Cxx/TestMD5.cxx
index 87db0e7..51ceefe 100644
--- a/Testing/Source/Common/Cxx/TestMD5.cxx
+++ b/Testing/Source/Common/Cxx/TestMD5.cxx
@@ -229,6 +229,15 @@ static const char * const gdcmMD5SumFiles[][2] = {
{ "027faefc8031768dad1afc100f7aee27" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" },
{ "f7c4fbb93b0347101e21e36f223b4d46" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" },
{ "af580e6202a240005a5a05adc5c691f2" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" },
+{ "236713383dd9d315415f3a5957707ad1" , "JPEGNote_empty.dcm" },
+{ "5b6f7f59dbefd679aa29e9082f100ff5" , "JPEGLS_CharLS_10742.dcm" },
+{ "66fe7d517941802364e7ad8dee7149e7" , "JPEGLosslessYBR_FULL_422.dcm" },
+{ "dcb4b29b7e0f0da441ab3e5cdcb506b4" , "JPEGNote_missing.dcm" },
+{ "2c30e74ee3db1895027932bb0566f54e" , "JPEGNote_bogus.dcm" },
+{ "c71a2cf95325395264c4dc6e15a898bd" , "RLEDebianBug816607Orig.dcm" },
+{ "e49c403278663d9739014ad1d57c276f" , "IllegalGroup2ImplicitTS.dcm" },
+{ "299df0175ea4d3ab1f02651f88ffe9f3" , "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm" },
+{ "9add5fd3c83cc0946633e792f448f732" , "LengthOfItemLarger.dcm" },
{ NULL, NULL}
};
diff --git a/Testing/Source/Common/Cxx/TestSHA1.cxx b/Testing/Source/Common/Cxx/TestSHA1.cxx
index 0e78d58..c383140 100644
--- a/Testing/Source/Common/Cxx/TestSHA1.cxx
+++ b/Testing/Source/Common/Cxx/TestSHA1.cxx
@@ -228,6 +228,12 @@ static const char * const gdcmSHA1SumFiles[][2] = {
{ "d17a34f8ae066048442ab5b110d43c412472ea7e" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" },
{ "71517fce6c32625f1051b72085cfceeee58bd164" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" },
{ "0d19e4a98265afc3c782db02bc64bd32124ed2f6" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" },
+{ "5cb6c554e80b552ea68cad05409dce4fe92b6dd7" , "IllegalGroup2ImplicitTS.dcm" },
+{ "031f8cb2cbbe7b5e524b1f79aef6674a66e7f390" , "JPEGLosslessYBR_FULL_422.dcm" },
+{ "4710e6cfd86c0d349c61b60ae69a684b246db3ff" , "JPEGNote_bogus.dcm" },
+{ "197e47b5afeeeb75eccafe04e5a1bb0af1a7957a" , "JPEGNote_empty.dcm" },
+{ "08828e913a7a1ebbc0129c42974b64ce702814b6" , "JPEGNote_missing.dcm" },
+{ "99c169688190a66100b61319eaeefb3db1936125" , "RLEDebianBug816607Orig.dcm" },
{ NULL, NULL}
};
diff --git a/Testing/Source/Data/CMakeLists.txt b/Testing/Source/Data/CMakeLists.txt
index b2a3b6e..84efaa4 100644
--- a/Testing/Source/Data/CMakeLists.txt
+++ b/Testing/Source/Data/CMakeLists.txt
@@ -64,6 +64,12 @@ set(BLACK_LIST_READER
MR-MONO2-12-angio-an1.acr
# Openjpeg / Part 2:
lena512_rot90.j2k.dcm
+# Remove this one for now:
+ LengthOfItemLarger.dcm
+# Need CharLS 1.1
+ JPEG_LS_InvalidEscapeSequence_COM_padding.dcm
+# something wrong with OPJ 1.4
+ JPEGLS_CharLS_10742.dcm
)
if(NOT GDCM_USE_PVRG)
set(BLACK_LIST_READER
diff --git a/Testing/Source/Data/gdcmMD5DataImages.cxx b/Testing/Source/Data/gdcmMD5DataImages.cxx
index 787b4c5..fbebb4d 100644
--- a/Testing/Source/Data/gdcmMD5DataImages.cxx
+++ b/Testing/Source/Data/gdcmMD5DataImages.cxx
@@ -689,6 +689,16 @@ static const char * const gdcmMD5DataImages[][2] = {
{ "4a5d8549791432b29948dd8ff63e2534" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" },
+{ "2c8630ae1bff925b258d98e742dfc632" , "JPEGLS_CharLS_10742.dcm" },
+{ "f666a95dde9ddfdec0cf9574a7985ae3" , "IllegalGroup2ImplicitTS.dcm" },
+
+{ "b85686dd3169b99725149abb00181254" , "RLEDebianBug816607Orig.dcm" },
+{ "464960d948dff0ded72b0380080f18a3" , "JPEGNote_empty.dcm" },
+{ "cdfb5dd0c999d88badeb00a16f96554f" , "JPEGLosslessYBR_FULL_422.dcm" },
+{ "464960d948dff0ded72b0380080f18a3" , "JPEGNote_missing.dcm" },
+{ "161e9fd986ea87adf2596e8e16641f11" , "JPEGNote_bogus.dcm" },
+
+
/* Stopping condition */
{ 0 ,0 }
diff --git a/Testing/Source/Data/gdcmMediaStorageDataFiles.cxx b/Testing/Source/Data/gdcmMediaStorageDataFiles.cxx
index f185744..b06982f 100644
--- a/Testing/Source/Data/gdcmMediaStorageDataFiles.cxx
+++ b/Testing/Source/Data/gdcmMediaStorageDataFiles.cxx
@@ -239,6 +239,15 @@ static const char * const gdcmMediaStorageDataFiles[][2] = {
{ "SC16BitsAllocated_8BitsStoredJPEG.dcm" , "1.2.840.10008.5.1.4.1.1.7" },
{ "SC16BitsAllocated_8BitsStoredJ2K.dcm" , "1.2.840.10008.5.1.4.1.1.7" },
{ "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" , "1.2.840.10008.5.1.4.1.1.4" },
+{ "JPEGNote_empty.dcm" , "1.2.840.10008.5.1.4.1.1.7" },
+{ "JPEGLS_CharLS_10742.dcm" , "1.2.840.10008.5.1.4.1.1.7" },
+{ "JPEGLosslessYBR_FULL_422.dcm" , "1.2.840.10008.5.1.4.1.1.7" },
+{ "JPEGNote_missing.dcm" , "1.2.840.10008.5.1.4.1.1.7" },
+{ "JPEGNote_bogus.dcm" , "1.2.840.10008.5.1.4.1.1.7" },
+{ "RLEDebianBug816607Orig.dcm" , "1.2.840.10008.5.1.4.1.1.7" },
+{ "IllegalGroup2ImplicitTS.dcm" , "1.2.840.10008.5.1.4.1.1.1" },
+{ "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm" , "1.2.840.10008.5.1.4.1.1.7" },
+{ "LengthOfItemLarger.dcm" , "1.2.840.10008.5.1.4.1.1.4" },
/* Stopping condition */
{ 0 ,0 }
diff --git a/Testing/Source/Data/gdcmSelectedPrivateGroupOffsetDataFiles.cxx b/Testing/Source/Data/gdcmSelectedPrivateGroupOffsetDataFiles.cxx
index ee29ca0..7cf3d7e 100644
--- a/Testing/Source/Data/gdcmSelectedPrivateGroupOffsetDataFiles.cxx
+++ b/Testing/Source/Data/gdcmSelectedPrivateGroupOffsetDataFiles.cxx
@@ -221,6 +221,15 @@ static const StreamOffset gdcmSelectedPrivateGroupOffsetDataFiles[] = {
{ "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm",1314},
{ "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm", 1596 },
{ "00191113.dcm",536 },
+{ "JPEGNote_empty.dcm", 482 },
+{ "JPEGLS_CharLS_10742.dcm", 532 },
+{ "JPEGLosslessYBR_FULL_422.dcm", 534 },
+{ "JPEGNote_missing.dcm", 406 },
+{ "JPEGNote_bogus.dcm", 482 },
+{ "RLEDebianBug816607Orig.dcm", 534 },
+{ "IllegalGroup2ImplicitTS.dcm", 1088 },
+{ "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm", 534 },
+{ "LengthOfItemLarger.dcm", 1044 },
{ "dicomdir_With_embedded_icons",7125212 },
{ "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents",37218 },
{ "dicomdir_Acusson_WithPrivate_WithSR",3826 },
diff --git a/Testing/Source/Data/gdcmSelectedTagsOffsetDataFiles.cxx b/Testing/Source/Data/gdcmSelectedTagsOffsetDataFiles.cxx
index 7e434d0..add4b27 100644
--- a/Testing/Source/Data/gdcmSelectedTagsOffsetDataFiles.cxx
+++ b/Testing/Source/Data/gdcmSelectedTagsOffsetDataFiles.cxx
@@ -223,6 +223,15 @@ static const StreamOffset gdcmSelectedTagsOffsetDataFiles[] = {
{ "ELSCINT1_PMSCT_RLE1_priv.dcm",298002 },
{ "00191113.dcm",922 },
{ "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm", 48714 },
+{ "JPEGNote_empty.dcm", 704 },
+{ "JPEGLS_CharLS_10742.dcm", 748 },
+{ "JPEGLosslessYBR_FULL_422.dcm", 802 },
+{ "JPEGNote_missing.dcm", 596 },
+{ "JPEGNote_bogus.dcm", 722 },
+{ "RLEDebianBug816607Orig.dcm", 768 },
+{ "IllegalGroup2ImplicitTS.dcm", 2264 },
+{ "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm", 752 },
+{ "LengthOfItemLarger.dcm", 12748 },
{ "dicomdir_Acusson_WithPrivate_WithSR",3826 },
{ "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents",37218 },
{ "dicomdir_Pms_With_heavy_embedded_sequence",3003414 },
diff --git a/Testing/Source/Data/gdcmStreamOffsetDataFiles.cxx b/Testing/Source/Data/gdcmStreamOffsetDataFiles.cxx
index 161e97b..f2b284d 100644
--- a/Testing/Source/Data/gdcmStreamOffsetDataFiles.cxx
+++ b/Testing/Source/Data/gdcmStreamOffsetDataFiles.cxx
@@ -228,7 +228,15 @@ static const StreamOffset gdcmStreamOffsetDataFiles[] = {
{ "SC16BitsAllocated_8BitsStoredJ2K.dcm", 764 },
{ "SC16BitsAllocated_8BitsStoredJPEG.dcm", 958 },
{ "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm", 48726 },
-
+{ "JPEGNote_empty.dcm", 716 },
+{ "JPEGLS_CharLS_10742.dcm", 760 },
+{ "JPEGLosslessYBR_FULL_422.dcm", 814 },
+{ "JPEGNote_missing.dcm", 608 },
+{ "JPEGNote_bogus.dcm", 734 },
+{ "RLEDebianBug816607Orig.dcm", 780 },
+{ "IllegalGroup2ImplicitTS.dcm", 2272 },
+{ "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm", 764 },
+{ "LengthOfItemLarger.dcm", 12748 },
/* Stopping condition */
{ 0 ,0 },
diff --git a/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReaderCanRead.cxx b/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReaderCanRead.cxx
index acc16ad..0c9a720 100644
--- a/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReaderCanRead.cxx
+++ b/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReaderCanRead.cxx
@@ -41,16 +41,16 @@ int TestReadCanRead(const char *subdir, const char* filename, bool verbose = fal
ret = 0;
}
// This is not an error if you are in the black list:
- if( strcmp(name, "BuggedDicomWorksImage_Hopeless.dcm" ) != 0
- || strcmp(name, "Philips_Wrong_Terminator_XX_0277" ) != 0
- || strcmp(name, "DICOMDIR_noPATIENT_noSTUDY" ) != 0
- || strcmp(name, "JpegLosslessMultiframePapyrus.pap" ) != 0
- || strcmp(name, "Fish-1.img" ) != 0
- || strcmp(name, "NM_FromJulius_Caesar.dcm" ) != 0
- || strcmp(name, "Siemens-leonardo-bugged.dcm" ) != 0
- || strcmp(name, "illegal_UN_stands_for_OB.dcm" ) != 0
- || strcmp(name, "MR_PHILIPS_LargePreamble.dcm" ) != 0
- || strcmp(name, "illegal_UN_stands_for_OB.dcm.secu" ) != 0 )
+ if( strcmp(name, "BuggedDicomWorksImage_Hopeless.dcm" ) == 0
+ || strcmp(name, "Philips_Wrong_Terminator_XX_0277" ) == 0
+ || strcmp(name, "DICOMDIR_noPATIENT_noSTUDY" ) == 0
+ || strcmp(name, "JpegLosslessMultiframePapyrus.pap" ) == 0
+ || strcmp(name, "Fish-1.img" ) == 0
+ || strcmp(name, "NM_FromJulius_Caesar.dcm" ) == 0
+ || strcmp(name, "Siemens-leonardo-bugged.dcm" ) == 0
+ || strcmp(name, "illegal_UN_stands_for_OB.dcm" ) == 0
+ || strcmp(name, "MR_PHILIPS_LargePreamble.dcm" ) == 0
+ || strcmp(name, "illegal_UN_stands_for_OB.dcm.secu" ) == 0 )
{
ret = 0;
}
diff --git a/Testing/Source/DataStructureAndEncodingDefinition/Java/CMakeLists.txt b/Testing/Source/DataStructureAndEncodingDefinition/Java/CMakeLists.txt
index 46e27ce..1d0cf53 100644
--- a/Testing/Source/DataStructureAndEncodingDefinition/Java/CMakeLists.txt
+++ b/Testing/Source/DataStructureAndEncodingDefinition/Java/CMakeLists.txt
@@ -4,7 +4,7 @@ set(GDCM_JAVA_TEST_SRCS
)
# Do not change anything after here:
-find_package(Java REQUIRED) # javac, jar
+find_package(Java ${GDCM_DEFAULT_JAVA_VERSION} REQUIRED) # javac, jar
find_package(JNI REQUIRED)
include_directories(
${JNI_INCLUDE_PATH}
diff --git a/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileStreamer4.cxx b/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileStreamer4.cxx
index debe375..01f58d1 100644
--- a/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileStreamer4.cxx
+++ b/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileStreamer4.cxx
@@ -45,6 +45,12 @@ int TestFileStream4(const char *filename, bool verbose = false)
{
checktemplate = true;
}
+ if( strcmp(name, "JPEGNote_empty.dcm" ) == 0
+ || strcmp(name, "JPEGNote_missing.dcm" ) == 0 )
+ {
+ // cannot read dims from DICOM header...
+ return 0;
+ }
gdcm::ImageRegionReader irr;
irr.SetFileName( filename );
@@ -84,8 +90,11 @@ int TestFileStream4(const char *filename, bool verbose = false)
const gdcm::Tag pixeldata(0x7fe0,0x0010);
- bool b;
+ bool b = true;
+ if( strcmp(name, "libido1.0-vol.acr" ) != 0 ) // use Planes instead of Number of Frames
+ {
b = fs.CheckDataElement( pixeldata ); // will be checking file size
+ }
if( !b )
{
std::cerr << "Failed to CheckDataElement: " << outfilename << std::endl;
diff --git a/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader1.cxx b/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader1.cxx
index 1124aac..f0d8807 100644
--- a/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader1.cxx
+++ b/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader1.cxx
@@ -30,7 +30,13 @@ static int TestImageRegionRead(const char* filename, bool verbose = false)
// attribute is (b500,b700) which make ReadUpToTag(7fe0,0010) fails...
if( strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0
|| strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJ2K.dcm" ) == 0 // mismatch pixel format in JPEG 200 vs DICOM
- || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 ) // bogus JPEG cannot be streamed
+ || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 // bogus JPEG cannot be streamed
+
+ // FIXME: we should be able to handle those at some point:
+ || strcmp(fn.GetName(), "JPEGNote_empty.dcm" ) == 0
+ || strcmp(fn.GetName(), "JPEGNote_missing.dcm" ) == 0
+ || strcmp(fn.GetName(), "JPEGNote_bogus.dcm" ) == 0
+ )
{
std::cerr << "Skipping impossible file: " << filename << std::endl;
return 0;
diff --git a/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader2.cxx b/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader2.cxx
index 86a905b..fef2235 100644
--- a/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader2.cxx
+++ b/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader2.cxx
@@ -30,7 +30,13 @@ static int TestImageRegionRead(const char* filename, bool verbose = false)
// attribute is (b500,b700) which make ReadUpToTag(7fe0,0010) fails...
if( strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0
|| strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJ2K.dcm" ) == 0 // mismatch pixel format in JPEG 200 vs DICOM
- || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 ) // bogus JPEG cannot be streamed
+ || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 // bogus JPEG cannot be streamed
+
+ // FIXME: we should be able to handle those at some point:
+ || strcmp(fn.GetName(), "JPEGNote_empty.dcm" ) == 0
+ || strcmp(fn.GetName(), "JPEGNote_missing.dcm" ) == 0
+ || strcmp(fn.GetName(), "JPEGNote_bogus.dcm" ) == 0
+ )
{
std::cerr << "Skipping impossible file: " << filename << std::endl;
return 0;
diff --git a/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader3.cxx b/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader3.cxx
index 9c78cf5..d66c503 100644
--- a/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader3.cxx
+++ b/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader3.cxx
@@ -32,7 +32,13 @@ static int TestImageRegionRead(const char* filename, bool verbose = false)
// attribute is (b500,b700) which make ReadUpToTag(7fe0,0010) fails...
if( strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0
|| strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJ2K.dcm" ) == 0 // mismatch pixel format in JPEG 200 vs DICOM
- || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 ) // bogus JPEG cannot be streamed
+ || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 // bogus JPEG cannot be streamed
+
+ // FIXME: we should be able to handle those at some point:
+ || strcmp(fn.GetName(), "JPEGNote_empty.dcm" ) == 0
+ || strcmp(fn.GetName(), "JPEGNote_missing.dcm" ) == 0
+ || strcmp(fn.GetName(), "JPEGNote_bogus.dcm" ) == 0
+ )
{
std::cerr << "Skipping impossible file: " << filename << std::endl;
return 0;
diff --git a/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPrinter1.cxx b/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPrinter1.cxx
index 2a0f15e..85a540b 100644
--- a/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPrinter1.cxx
+++ b/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPrinter1.cxx
@@ -24,15 +24,15 @@
// GetValueAsSQ to solve that issue.
static const char * const printmd5[][2] = {
{ "a19bffac370df32acbf6b4991d1cbafe" , "00191113.dcm" } ,
-{ "2e7d47d86dc6b541fccfa928c2ee05e8" , "012345.002.050.dcm" } ,
+{ "a5b2cb7d27bf0565296ae0391c07dd54" , "012345.002.050.dcm" } ,
{ "94f8c6ab090bdc11e61625bfc2dd39b7" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" } ,
{ "20c11831c616eb121a405cd73de5cba2" , "05148044-mr-siemens-avanto-syngo.dcm" } ,
{ "ec10dcbf1b13ace8a6c0cc5b24c6c870" , "3E768EB7.dcm" } ,
{ "fde1da68a1707dcc687ddffd57e6b3c3" , "ACUSON-24-YBR_FULL-RLE-b.dcm" } ,
{ "a27c6628d6379783a3be223481d5cba4" , "ACUSON-24-YBR_FULL-RLE.dcm" } ,
{ "9f3aa114b955a812942f815b6b456eaf" , "ALOKA_SSD-8-MONO2-RLE-SQ.dcm" } ,
-{ "8b9bca2a22732c6165eba2fd3114d323" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" } ,
-{ "0df5a880b1973062f1e3850c27ee9568" , "BugGDCM2_UndefItemWrongVL.dcm" } ,
+{ "6c18a8fdd766660fbb475c05d0611634" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" } ,
+{ "9ddd03e5fd29f92bd02c3d3812b4e93e" , "BugGDCM2_UndefItemWrongVL.dcm" } ,
{ "6d2af85d2af299c223b684538d42d9e5" , "CR-MONO1-10-chest.dcm" } ,
{ "820d45cefd528e011921ea129bec9084" , "CT_16b_signed-UsedBits13.dcm" } ,
{ "fcf2ca019aa3138188edb18552983733" , "CT-MONO2-12-lomb-an2.acr" } ,
@@ -55,9 +55,9 @@ static const char * const printmd5[][2] = {
{ "b770b1ca257d7c1c885f69a5a1b58808" , "D_CLUNIE_MR2_JPLL.dcm" } ,
{ "da74aefef4e8ac49dbe1a4dd3b1dcb26" , "D_CLUNIE_MR2_JPLY.dcm" } ,
{ "023eb2a9ecbfd3c04bb148ec339865f0" , "D_CLUNIE_MR2_RLE.dcm" } ,
-{ "dca2414a88e95ef5ed59c088d20021b8" , "D_CLUNIE_MR3_JPLL.dcm" } ,
-{ "73c16bde7114f03b976009cba63c5f65" , "D_CLUNIE_MR3_JPLY.dcm" } ,
-{ "d1c358c3f79a5fc5592abe2b4b4a3571" , "D_CLUNIE_MR3_RLE.dcm" } ,
+{ "4ac28edcc53e3c5a2b14cee29ac4b350" , "D_CLUNIE_MR3_JPLL.dcm" } ,
+{ "1279c4aaacd1a058fc4b101cbfebec54" , "D_CLUNIE_MR3_JPLY.dcm" } ,
+{ "d6ca154c96d206995023f7349f6ca861" , "D_CLUNIE_MR3_RLE.dcm" } ,
{ "1646ec013060ef3f261849db705f80f3" , "D_CLUNIE_MR4_JPLL.dcm" } ,
{ "fbbfe4caab2179641bd0de5d8ccf79ae" , "D_CLUNIE_MR4_JPLY.dcm" } ,
{ "fafdb8499580e59c2f6d9047894272ea" , "D_CLUNIE_MR4_RLE.dcm" } ,
@@ -100,7 +100,7 @@ static const char * const printmd5[][2] = {
{ "3493bf0e698798529fde6ef488289879" , "ELSCINT1_JP2vsJ2K.dcm" } ,
{ "8f5581be656bd6f1ab6c9ec94f302284" , "ELSCINT1_LOSSLESS_RICE.dcm" } ,
{ "54f138a1aa6819ec1560a7ed344cde1a" , "ELSCINT1_PMSCT_RLE1.dcm" } ,
-{ "ff2965f3ca39bc0795df9850aa25467e" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" } ,
+{ "d576bf8e8b2ca71fd543d29698807e85" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" } ,
{ "3199cd21166043d619209d7a2073fb56" , "fffc0000UN.dcm" } ,
{ "9b426b02521cbc2f3ee25ab383ca835e" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" } ,
{ "2aba3dacd00a0bc14a06e2d7142b916a" , "gdcm-ACR-LibIDO.acr" } ,
@@ -116,10 +116,10 @@ static const char * const printmd5[][2] = {
{ "9e126a24f81534e1cd653f16739a6192" , "GE_DLX-8-MONO2-Multiframe.dcm" } ,
{ "6b66f8c38fe96db805e7dedd9a997811" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" } ,
{ "61ca6c5115e6f74565f6f2ca06647444" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" } ,
-{ "459247061fb21a9cbf0bbb359a0af160" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" } ,
+{ "7920bf7f1269ba54dd8d0e0d375dc4b9" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" } ,
{ "8d398fce426d3a248d8c3f7582e3751d" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" } ,
{ "bb5d500a0391a399b035968496b6fd5d" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" } ,
-{ "7aad71b9c70060c0a39a73b2f489d68f" , "GE_MR_0025xx1bProtocolDataBlock.dcm" } ,
+{ "1ad963ca1e91932bb1ac58f3dddd981f" , "GE_MR_0025xx1bProtocolDataBlock.dcm" } ,
{ "d5efa34d8091e1ad04683eefb41f33c7" , "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm" } ,
{ "d41d8cd98f00b204e9800998ecf8427e" , "IM-0001-0066.dcm" } ,
{ "cd085d783924d8a7fa2270ff40c6dc3e" , "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm" } ,
@@ -150,17 +150,17 @@ static const char * const printmd5[][2] = {
{ "497d6ea45b8f3f7f6a3bf8125dcc43b1" , "MR16BitsAllocated_8BitsStored.dcm" } ,
{ "5b23ccf10ad6358b253a7ec185deb2a9" , "MR-Brucker-CineTagging-NonSquarePixels.dcm" } ,
{ "31246836410a24124acf6bea5a36a942" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" } ,
-{ "285433f0db3a7aae20a4734644fc959d" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" } ,
+{ "7a61574251f8788a11cfe06ddc109bd9" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" } ,
{ "8419613dfb8d4b190ef8a988f8927bce" , "MR-MONO2-12-an2.acr" } ,
{ "b4058b67ec1eb3d3d3acde27d51eb24a" , "MR-MONO2-12-angio-an1.acr" } ,
{ "f782f6ea25928310bd69c3ca5c6a97d2" , "MR-MONO2-12-shoulder.dcm" } ,
{ "7f6bccb00b34a7d277eacaffd2bb0362" , "MR-MONO2-16-head.dcm" } ,
{ "9bd4d79cc59c66b19c21577e12cd6226" , "MR-MONO2-8-16x-heart.dcm" } ,
{ "cd623ac04602182dc66adb505c516341" , "MR_Philips-Intera_BreaksNOSHADOW.dcm" } ,
-{ "f295d87a398e0bcd96c5dfa20d96a419" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" } ,
-{ "af3c49db53cfb30aa438e7369dba117b" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" } ,
-{ "d7019c1822870140965fa3345b53886c" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" } ,
-{ "69ccce1a3bb1c481d90a1df109acf3b7" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" } ,
+{ "ced145431248f1e00e9bdc23b0c61674" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" } ,
+{ "8eab7fcf9c53d06968dde33f6b3a8918" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" } ,
+{ "3d24233b19788d349f64b7b267723186" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" } ,
+{ "1693399bc1edb7cdc494095a27201eab" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" } ,
{ "5797c9dfe94e4a4bccfbf81ab0aaa957" , "MR-SIEMENS-DICOM-WithOverlays.dcm" } ,
{ "df28467760104edc923d0625a0e2a778" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" } ,
{ "bf324a1c91d3a09d9136f54f5910e570" , "MR_SIEMENS_forceLoad29-1010_29-1020.dcm" } ,
@@ -171,12 +171,12 @@ static const char * const printmd5[][2] = {
{ "7f4cddc9a88f8c5147b89f769eb1cae7" , "OT-PAL-8-face.dcm" } ,
{ "5fce2728bd9457d4fc1224a374829e2f" , "PET-cardio-Multiframe-Papyrus.dcm" } ,
{ "071b840050588d14fde61646e058e1c6" , "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm" } ,
-{ "244e8beb3151f9a26dd8c0650a4adede" , "PHILIPS_GDCM12xBug2.dcm" } ,
-{ "3d7cc6eaf1c2f065290c50473bc8001a" , "PHILIPS_GDCM12xBug.dcm" } ,
+{ "a7eb66c4f66784ad456d060b7123ea15" , "PHILIPS_GDCM12xBug2.dcm" } ,
+{ "48203ef1f45cb1f7f919de53062db5d0" , "PHILIPS_GDCM12xBug.dcm" } ,
{ "c38ad661c6a14f8bd88b304755e7ba7b" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" } ,
{ "e0a690636c608f312ca550908d4b551f" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" } ,
{ "03d88060c3bd820b96840599c0099470" , "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm" } ,
-{ "1caa6b627fa7dc0995efc2a36765055e" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" } ,
+{ "1f198bdb09f5e52dc3f9ad1dfced8a4d" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" } ,
{ "4f34474ed72e6a5960fc4691e588f8e0" , "PICKER-16-MONO2-Nested_icon.dcm" } ,
{ "629da04611e097e2cc532d6fe5e6454d" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" } ,
{ "3aaca1826b4a4deb9e41ebf2af4fa6b2" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" } ,
@@ -206,9 +206,9 @@ static const char * const printmd5[][2] = {
{ "cbd59e416dd82dc14df251ea6fccb55b" , "test.acr" } ,
{ "0c2c475f6d21ae0aeadbf16565dcdbc4" , "TG18-CH-2k-01.dcm" } ,
{ "e8cc7ed19eedf9bed9ab60683f3dbfa1" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" } ,
-{ "463888b21317e5816584541c7243e124" , "TheralysGDCM120Bug.dcm" } ,
+{ "aa708d3b15e451c8367e7909257d9346" , "TheralysGDCM120Bug.dcm" } ,
{ "e8819809884c214fe78ee2b227417e5c" , "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm" } ,
-{ "9fcf7924fef1b48977b8c4b9a84caa87" , "undefined_length_un_vr.dcm" } ,
+{ "fafc22cde1c9092cb188982ecee8da9b" , "undefined_length_un_vr.dcm" } ,
{ "787ca80c8dd1aa619d5f85610862380b" , "US-GE-4AICL142.dcm" } ,
{ "f1e9c893391e1d458cffa2a1e0904160" , "US-IRAD-NoPreambleStartWith0003.dcm" } ,
{ "d1d9be67c9d066fabc8e1c4ae124f9a0" , "US-IRAD-NoPreambleStartWith0005.dcm" } ,
@@ -221,7 +221,7 @@ static const char * const printmd5[][2] = {
{ "d2cb6962750eb8f92c480e6cc2f4d104" , "GDCMJ2K_TextGBR.dcm" },
{ "2e039bbc7520f809963e051ff5144ccf" , "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" },
{ "0a90894370ba84dbe31acd1290ff9999" , "NM_Kakadu44_SOTmarkerincons.dcm" },
-{ "bcadb7b0f72d2ea3d4e910b885f07087" , "PhilipsInteraSeqTermInvLen.dcm" },
+{ "fdd8a53915712a924ac74c26ec4d1051" , "PhilipsInteraSeqTermInvLen.dcm" },
{ "2940bd46f097f79012d24f47504c3c8c" , "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" },
{ "696917fea41e83b9980bad82b609162c" , "TOSHIBA_J2K_SIZ0_PixRep1.dcm" },
{ "7ef3da46c43e51cfe2eb82e4d23dd623" , "TOSHIBA_J2K_SIZ1_PixRep0.dcm" },
@@ -231,6 +231,14 @@ static const char * const printmd5[][2] = {
{ "4be7f56f11ce6090b7139879c4fdc71f" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" },
{ "1060ff4eb8731d4b2152db83fed2eedd" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" },
{ "7dc0a8ffffc8fb441dbd4129111eaf8b" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" },
+{ "41d1baead629d878d09d6c1037faf47a" , "JPEGNote_empty.dcm" },
+{ "3cb9917c468226c265ef637aac5f4b61" , "JPEGLS_CharLS_10742.dcm" },
+{ "8381875d83ce321955a064e40d047dde" , "JPEGLosslessYBR_FULL_422.dcm" },
+{ "67f7b36ad6e54889b4a2581baa41afdf" , "JPEGNote_missing.dcm" },
+{ "807bf2aef3bc1885217c8a12d2d2bc19" , "JPEGNote_bogus.dcm" },
+{ "669cc0e807673ebe57124739a1874f35" , "RLEDebianBug816607Orig.dcm" },
+{ "1daa9bb53a8ce090041472f528248686" , "IllegalGroup2ImplicitTS.dcm" },
+
{ 0 ,0 }
};
diff --git a/Utilities/Release/README.md b/Utilities/Release/README.md
new file mode 100644
index 0000000..24f4747
--- /dev/null
+++ b/Utilities/Release/README.md
@@ -0,0 +1,11 @@
+GDCM binaries have moved !
+--------------------------
+
+They are now automatically uploaded to github:
+
+[github release](https://github.com/malaterre/GDCM/releases)
+
+They are build using travis and appveyor automatically
+
+As a side note the old zip (source) file is not available anymore on sf.net,
+please see instead on github.
diff --git a/Utilities/Release/release.sh b/Utilities/Release/release.sh
index f885da2..ab92df1 100755
--- a/Utilities/Release/release.sh
+++ b/Utilities/Release/release.sh
@@ -126,6 +126,9 @@ check_exit_value $? "vtkgdcmDoxygenDoc did not return properly" || exit 1
# https://sourceforge.net/project/admin/explorer.php?group_id=137895
# https://sourceforge.net/projects/gdcm/files/gdcm%202.x/#folder-create
+# Update default version:
+#https://sourceforge.net/p/forge/documentation/Using%20the%20Release%20API/
+exit 1
rsync -e ssh GDCM-$version-Linux-x86_64.tar.gz "malat,gdcm at frs.sourceforge.net:/home/frs/project/g/gd/gdcm/gdcm\ 2.x/GDCM\ $version"
check_exit_value $? "rsync did not return properly" || exit 1
rsync -e ssh GDCM-$version-Linux-x86_64.tar.bz2 "malat,gdcm at frs.sourceforge.net:/home/frs/project/g/gd/gdcm/gdcm\ 2.x/GDCM\ $version"
diff --git a/Utilities/VTK/CMakeLists.txt b/Utilities/VTK/CMakeLists.txt
index 563e0b2..0320f3f 100644
--- a/Utilities/VTK/CMakeLists.txt
+++ b/Utilities/VTK/CMakeLists.txt
@@ -636,7 +636,7 @@ endif()
if(GDCM_WRAP_JAVA)
if(VTK_WRAP_JAVA)
- find_package(Java 1.5 REQUIRED) # javac, jar
+ find_package(Java ${GDCM_DEFAULT_JAVA_VERSION} REQUIRED) # javac, jar
find_package(JNI REQUIRED)
include_directories(${JNI_INCLUDE_DIRS})
set(VTK_WRAP_JAVA3_INIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
@@ -652,8 +652,9 @@ if(GDCM_WRAP_JAVA)
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533193
set(GDCM_VTK_JAVA_JAR ${VTK_JAVA_JAR})
else()
+ # http://bugs.debian.org/834493
find_file(VTK_JAVA_JAR NAMES vtk.jar vtk6.jar vtk5.jar
- PATHS ${vtkWrappingJava_RUNTIME_LIBRARY_DIRS})
+ PATHS ${vtkWrappingJava_RUNTIME_LIBRARY_DIRS} /usr/share/java)
set(GDCM_VTK_JAVA_JAR ${VTK_JAVA_JAR})
endif()
if(EXISTS /usr/lib/jni/libvtkCommonJava.so)
diff --git a/Utilities/VTK/vtkGDCMTesting.cxx b/Utilities/VTK/vtkGDCMTesting.cxx
index d637a16..7af3879 100644
--- a/Utilities/VTK/vtkGDCMTesting.cxx
+++ b/Utilities/VTK/vtkGDCMTesting.cxx
@@ -222,6 +222,12 @@ static const char * const vtkgdcmMD5MetaImages[][3] = {
{ "SC16BitsAllocated_8BitsStoredJPEG.dcm","c9f9d07783496fa9a9e5b28a90603a70", "c164a73ba18ab4e88977921ffc7c3a65" },
{ "SC16BitsAllocated_8BitsStoredJ2K.dcm","96639bac776d875b02f6aa9b35ee2db7", "dbf83984984741c98205d77a947b442c" },
{ "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm","81f79e2fcb3caec752e55be8077441dc", "4a5d8549791432b29948dd8ff63e2534" },
+{ "IllegalGroup2ImplicitTS.dcm","7c922536b5cf4143ce931ff5f552f588", "f666a95dde9ddfdec0cf9574a7985ae3" },
+{ "JPEGLosslessYBR_FULL_422.dcm","90a95c01f320809e3f6b6c720e78d457", "cdfb5dd0c999d88badeb00a16f96554f" },
+{ "JPEGNote_bogus.dcm","eeb1028e53ef4dcfc6b4100f8525be41", "161e9fd986ea87adf2596e8e16641f11" },
+{ "JPEGNote_empty.dcm","e6add795da6e0ccd4ed02f5689a61260", "464960d948dff0ded72b0380080f18a3" },
+{ "JPEGNote_missing.dcm","dce9f8853a528d423efc95a9bafee938", "464960d948dff0ded72b0380080f18a3" },
+{ "RLEDebianBug816607Orig.dcm","bb7bb73068f494c3cf947d2375af3501", "b85686dd3169b99725149abb00181254" },
/* Stopping condition */
diff --git a/Utilities/doxygen/CMakeLists.txt b/Utilities/doxygen/CMakeLists.txt
index 33a0210..52641a9 100644
--- a/Utilities/doxygen/CMakeLists.txt
+++ b/Utilities/doxygen/CMakeLists.txt
@@ -270,7 +270,7 @@ if(LIBXSLT_XSLTPROC_EXECUTABLE)
string(REGEX MATCH "^.*systemIdStartString=\"http://docbook.sourceforge.net/release/xsl-ns/\".*" out1 ${line})
string(REGEX REPLACE "^.*systemIdStartString=\"http://docbook.sourceforge.net/release/xsl-ns/\".*\"([A-Za-z ]*)\".*" "\\1" output_variable ${line})
if(out1)
- message("Your docbook install was found here :${output_variable}")
+ message(STATUS "Your docbook install was found here :${output_variable}")
set(DOCBOOK_REWRITE_PREFIX_FOUND TRUE)
endif()
endforeach()
diff --git a/Utilities/doxygen/man/gdcmconv.xml b/Utilities/doxygen/man/gdcmconv.xml
index 9f495bc..e7654b2 100644
--- a/Utilities/doxygen/man/gdcmconv.xml
+++ b/Utilities/doxygen/man/gdcmconv.xml
@@ -169,7 +169,7 @@ file-out DICOM output filename
<para>convert GDCM 1.2.0 broken UN-2-bytes fields, </para>
</listitem>
<listitem>
-<para>&... </para>
+<para>... </para>
</listitem>
<listitem>
<para>All other broken files listed in the supported refsection.</para>
diff --git a/Utilities/doxygen/man/gdcmdump.xml b/Utilities/doxygen/man/gdcmdump.xml
index 9ae5698..e58d8e4 100644
--- a/Utilities/doxygen/man/gdcmdump.xml
+++ b/Utilities/doxygen/man/gdcmdump.xml
@@ -101,7 +101,7 @@ dcm_directory DICOM input directory
</literallayout></para>
<para><literallayout># Dicom-File-Format
-\&...
+...
(0008,0000) ?? (UL) 434 # 4,1 Generic Group Length
(0008,0005) ?? (CS) [ISO_IR 100] # 10,1-n Specific Character Set
(0008,0008) ?? (CS) [ORIGINAL\\PRIMARY\\SINGLE PLANE ] # 30,2-n Image Type
@@ -115,7 +115,7 @@ dcm_directory DICOM input directory
(0008,0031) ?? (TM) [101229.000] # 10,1 Series Time
(0008,0032) ?? (TM) [102653.000] # 10,1 Acquisition Time
(0008,0033) ?? (TM) [102653.000] # 10,1 Content Time
-\&...
+...
</literallayout></para>
</refsection>
<refsection xml:id="gdcmdump_1private_attribute">
@@ -126,7 +126,7 @@ dcm_directory DICOM input directory
<para><literallayout>$ gdcmdump 012345.002.050.dcm
</literallayout></para>
-<para><literallayout>\&...
+<para><literallayout>...
(0009,0010) LO [GEMS_IDEN_01] # 12,1 Private Creator
(0009,1001) LO [GE_GENESIS_FF ] # 14,1 Full fidelity
(0009,1002) SH [MRCV] # 4,1 Suite id
@@ -138,21 +138,21 @@ dcm_directory DICOM input directory
(0009,10e6) SH [08] # 2,1 Genesis Version - now
(0009,10e7) UL 2757786872 # 4,1 Exam Record checksum
(0009,10e9) SL 985968523 # 4,1 Actual series data time stamp
-\&...
+...
(0019,0000) UL 1208 # 4,1 Generic Group Length
(0019,0010) LO [GEMS_ACQU_01] # 12,1 Private Creator
(0019,100f) DS [424.399994] # 10,1 Horiz. Frame of ref.
(0019,1011) SS 0 # 2,1 Series contrast
-\&...
+...
(0019,10e0) DS [0.000000] # 8,1 User data 24 {# DTI Diffusion Dir., release 10.0 & above}
(0019,10e2) DS [0.000000] # 8,1 Velocity Encode Scale
(0019,10f2) SS 0 # 2,1 Fast phases
(0019,10f9) DS [98] # 2,1 Transmit gain
-\&...
+...
(0021,0000) UL 372 # 4,1 Generic Group Length
(0021,0010) LO [GEMS_RELA_01] # 12,1 Private Creator
(0021,1003) SS 0 # 2,1 Series from which Prescribed
-\&...
+...
</literallayout></para>
</refsection>
<refsection xml:id="gdcmdump_1siemens_csa">
@@ -177,7 +177,7 @@ Image shadow data (0029,xx10)
6 - 'B_value' VM 1, VR IS, SyngoDT 6, NoOfItems 6, Data '0 '
7 - 'Filter1' VM 1, VR IS, SyngoDT 6, NoOfItems 0, Data
8 - 'Filter2' VM 1, VR IS, SyngoDT 6, NoOfItems 0, Data
-\&...
+...
</literallayout></para>
</refsection>
<refsection xml:id="gdcmdump_1gems_pdb">
@@ -206,7 +206,7 @@ BWRT "-1"
TRICKSIMG "1"
TAG_SPACE "7"
TAG_TYPE "None"
-\&...
+...
</literallayout></para>
</refsection>
<refsection xml:id="gdcmdump_1elscint_pi">
@@ -241,7 +241,7 @@ ELSCINT1/Item name: [doseright]
ACS-learn-allowed [no]
ACS-water-radius [-1.000000]
ACS-water-radius-scan [-1]
-\&...
+...
</literallayout></para>
</refsection>
<refsection xml:id="gdcmdump_1vepro_pi">
@@ -302,21 +302,21 @@ ELSCINT1/Item name: [doseright]
<para><literallayout>$ gdcmdump --sds PMS_SeriesDataStorage.dcm
</literallayout></para>
-<para><literallayout>\&...
+<para><literallayout>...
PMS/Item name: [PDF_CONTROL_GEN_PARS/IEEE_PDF/Y ]
-\&...
+...
PMS/Item name: [PDF_CONTROL_PREP_PARS /IEEE_PDF/Y ]
-\&...
+...
PMS/Item name: [PDF_CONTROL_RECON_PARS/IEEE_PDF/Y ]
-\&...
+...
PMS/Item name: [PDF_CONTROL_SCAN_PARS /IEEE_PDF/Y ]
-\&...
+...
PMS/Item name: [PDF_EXAM_PARS /IEEE_PDF/Y ]
-\&...
+...
PMS/Item name: [PDF_HARDWARE_PARS /IEEE_PDF/Y ]
-\&...
+...
PMS/Item name: [PDF_PREP_PARS /IEEE_PDF/Y ]
-\&...
+...
PMS/Item name: [PDF_SPT_PARS/IEEE_PDF/Y ]
SP_scan_resol [256\256] # 2
SP_pda_profiles [0\0] # 2
@@ -340,7 +340,7 @@ PMS/Item name: [PDF_SPT_PARS/IEEE_PDF/Y ]
SP_rg_result [0] # 1
SP_dc_result [0] # 1
SP_ph_result [0] # 1
-\&...
+...
</literallayout></para>
</refsection>
<refsection xml:id="gdcmdump_1asn1">
@@ -351,14 +351,14 @@ PMS/Item name: [PDF_SPT_PARS/IEEE_PDF/Y ]
<para><literallayout>$ gdcmdump encrypted.dcm
</literallayout></para>
-<para><literallayout>\&...
+<para><literallayout>...
(0400,0500) SQ # u/l,1 Encrypted Attributes Sequence
(fffe,e000) na (Item with undefined length)
(0400,0510) UI [1.2.840.10008.1.2] # 18,1 Encrypted Content Transfer Syntax UID
(0400,0520) OB 30\\82\\03\\ba\\06\\09\\2a\\86\\48\\55\\04\\08\\13 # 958,1 Encrypted Content
(fffe,e00d)
(fffe,e0dd)
-\&...
+...
</literallayout></para>
<para><literallayout>$ gdcmdump --asn1 encrypted.dcm
diff --git a/Utilities/doxygen/man/gdcmimg.xml b/Utilities/doxygen/man/gdcmimg.xml
index 7fb7e16..4eaef1a 100644
--- a/Utilities/doxygen/man/gdcmimg.xml
+++ b/Utilities/doxygen/man/gdcmimg.xml
@@ -64,6 +64,7 @@ file-out DICOM output filename
-C --sop-class-uid SOP Class UID (name or value).
-T --study-uid Study UID.
-S --series-uid Series UID.
+ --template Template DICOM file.
--root-uid Root UID.
</literallayout></para>
</refsection>
@@ -221,6 +222,16 @@ file-out DICOM output filename
<para><literallayout>$ gdcmimg --sop-class-uid 1.2.840.10008.5.1.4.1.1.77.1.4 input.jpg output.dcm
</literallayout></para>
</refsection>
+<refsection xml:id="gdcmimg_1template">
+<title>Specifying a template DICOM file</title>
+
+<para>Instead of the default Secondary Capture Image Storage, generated with default values, one may want to specify a DICOM file that will serve as template to fill in the DICOM attributes.</para>
+
+<para><literallayout>$ gdcmimg --sign 1 --template template.dcm input.jpg output.dcm
+</literallayout></para>
+<para>Pay attention that any values from template.dcm that are not consistent with what is found inside the reference image will be overriden (eg. image size). On particular case should be of concern: the Pixel Representation for the JPEG family.</para>
+
+</refsection>
</refsection>
<refsection xml:id="gdcmimg_1multiple_files">
<title>Multiple Files</title>
diff --git a/Utilities/doxygen/man/gdcmraw.xml b/Utilities/doxygen/man/gdcmraw.xml
index 2d406cb..5ba8d9d 100644
--- a/Utilities/doxygen/man/gdcmraw.xml
+++ b/Utilities/doxygen/man/gdcmraw.xml
@@ -104,7 +104,7 @@ f845c8f283d39a0204c325654493ba53 test.raw
<para><literallayout>$ gdcmdump D_CLUNIE_CT1_J2KR.dcm
</literallayout></para>
-<para><literallayout>\&...
+<para><literallayout>...
(7fe0,0010) OB # u/l,1 Pixel Data
(fffe,e000) ?? [] # 0,1 Item
(fffe,e000) ?? ff\\4f\\ff\\51\\00\\29\\00\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\02\\00\\00\\00\\02\\00 # 65536,1 Item
@@ -169,7 +169,7 @@ Qabs_ranges=18,19,19,20,19,19,20,19,19,20,19,19,20,19,19,20
<para><literallayout>$ gdcmdump 00191113.dcm
</literallayout></para>
-<para><literallayout>\&...
+<para><literallayout>...
(7fe0,0010) OB # u/l,1 Pixel Data
(fffe,e000) ?? 00\\00\\00\\00\\6b\\38\\01\\00\\10\\77\\02\\00\\37\\b6\\03\\00\\a7\\f4\\04\\00 # 20,1 Item
(fffe,e000) ?? ff\\d8\\ff\\c3\\00\\0b\\08\\02\\00\\02\\00\\01\\00\\11\\00\\ff\\c4\\00\\1b\\00\\01\\01\\01\\01\\01\\01\\01\\01\\00\\00\\00\\00 # 79970,1 Item
diff --git a/Utilities/doxygen/man/gdcmtar.xml b/Utilities/doxygen/man/gdcmtar.xml
index 2e0efe0..2707eb0 100644
--- a/Utilities/doxygen/man/gdcmtar.xml
+++ b/Utilities/doxygen/man/gdcmtar.xml
@@ -87,7 +87,7 @@ file-out DICOM output filename
TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian]
NumberOfDimensions: 2
Dimensions: (384,384,1)
-\&...
+...
</literallayout></para>
<para><literallayout>$ gdcmtar --mosaic -i MR-sonata-3D-as-Tile.dcm -o mosaic --pattern %03d.dcm
@@ -135,7 +135,7 @@ Dimensions: (384,384,1)
TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian]
NumberOfDimensions: 2
Dimensions: (64,64,1)
-\&...
+...
</literallayout></para>
</refsection>
</refsection>
diff --git a/Wrapping/Python/docstrings.i b/Wrapping/Python/docstrings.i
index 73f0831..3b9cae2 100644
--- a/Wrapping/Python/docstrings.i
+++ b/Wrapping/Python/docstrings.i
@@ -5353,7 +5353,14 @@ The input DICOM file does not contains an Image. ";
// File: classgdcm_1_1ImageRegionReader.xml
%feature("docstring") gdcm::ImageRegionReader "
-ImageRegionReader.
+ImageRegionReader This class is able to read a region from a DICOM
+file containing an image. This implementation requires that the
+information stored in the DICOM header are consistent with what is in
+the encapsulated Pixel Data. This is technically not required by DICOM
+standard, which makes this implementation illegal with regards to the
+famous JPEG
+note:http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2.html
+#para_4bcb841e-c6bf-4e26-82a5-3fad3c942da0.
See: ImageReader
@@ -5697,6 +5704,7 @@ how it is defined in DICOM, advanced users may refers to:
http://gdcm.sourceforge.net/wiki/index.php/Imager_Pixel_Spacing
Bug There are currently a couple of bugs in this implementation:
+
Gantry Tilt is not considered (always an error)
Application programmer should only sort valid DataSet (eg.
@@ -8713,7 +8721,7 @@ gdcm::PythonFilter::SetFile(const File &f) ";
gdcm::PythonFilter::ToPyObject(const Tag &t) const ";
%feature("docstring") gdcm::PythonFilter::UseDictAlways "void
-gdcm::PythonFilter::UseDictAlways(bool use) ";
+gdcm::PythonFilter::UseDictAlways(bool) ";
// File: classgdcm_1_1QueryBase.xml
@@ -15045,40 +15053,40 @@ gdcm::terminal::setmode(Mode m) ";
// File: bug.xml
-// File: dir_48be02fb937e08881437e02515417ab2.xml
+// File: dir_041d54874d9fecec94d9cb4ae010b51e.xml
-// File: dir_dbdfee04788ce02e68d05e06d5e6d98f.xml
+// File: dir_8021392154ea27d3da33100afd5b42a1.xml
-// File: dir_422e8974cbd0b7203ed9c70ede735192.xml
+// File: dir_83a82e6a2bc4a0f6429532cb237ca746.xml
-// File: dir_fc2dbd93ff698b14d78f486017ee822b.xml
+// File: dir_9760e222fce508c3b7270d68e6523d76.xml
-// File: dir_63e84970519399936bea68aa0151439e.xml
+// File: dir_90174c188c639015dd869d1a853f914f.xml
-// File: dir_a3a231e2bd7f702d85036607d7d87964.xml
+// File: dir_aceed280bd27dc60f64c2cb4efae4f90.xml
-// File: dir_bfc3201f3b82d7ccf14c524caa3c389b.xml
+// File: dir_5aab2906425e8d9a7aa9fea4f8d0a2fa.xml
-// File: dir_9a6580727919559370fc2250dcaca6b8.xml
+// File: dir_5daaa9a41ac240f7de3019ff61b11839.xml
-// File: dir_087222ad62d2f517f4e0198672951648.xml
+// File: dir_b138abe427a068e1da5116454e79caa4.xml
-// File: dir_2a74275ceded0a5f3b0fb2e9bd792825.xml
+// File: dir_6b1a62c3f439db8dff4e3363f340e91f.xml
-// File: dir_acafdc7d686494cf0735517ddc7a7669.xml
+// File: dir_776c231028699256e0cc13f46def7474.xml
-// File: dir_d2ab22b73e3ee89be3a207288d7a9056.xml
+// File: dir_6285418b2babf39982c6f35dbd05cbb5.xml
// File: AWTMedical3_8java-example.xml
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/gdcm.git
More information about the debian-med-commit
mailing list