gdcm-hackers Mailing List for Grassroots DICOM
Cross-platform DICOM implementation
Brought to you by:
malat
You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(253) |
Nov
(264) |
Dec
(45) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(354) |
Feb
(127) |
Mar
(164) |
Apr
(77) |
May
(49) |
Jun
(219) |
Jul
(123) |
Aug
(27) |
Sep
(7) |
Oct
(7) |
Nov
(15) |
Dec
(61) |
2012 |
Jan
(14) |
Feb
(8) |
Mar
(58) |
Apr
(20) |
May
(11) |
Jun
(33) |
Jul
(30) |
Aug
(3) |
Sep
(10) |
Oct
(11) |
Nov
(8) |
Dec
(7) |
2013 |
Jan
(8) |
Feb
(33) |
Mar
(104) |
Apr
(2) |
May
(4) |
Jun
(52) |
Jul
(63) |
Aug
(25) |
Sep
(45) |
Oct
(106) |
Nov
(22) |
Dec
(12) |
2014 |
Jan
(2) |
Feb
(15) |
Mar
(17) |
Apr
(40) |
May
(13) |
Jun
(25) |
Jul
(22) |
Aug
(2) |
Sep
(52) |
Oct
(8) |
Nov
(2) |
Dec
(4) |
2015 |
Jan
(6) |
Feb
(18) |
Mar
(9) |
Apr
(1) |
May
(2) |
Jun
(8) |
Jul
(3) |
Aug
(35) |
Sep
(25) |
Oct
(154) |
Nov
(90) |
Dec
(129) |
2016 |
Jan
(42) |
Feb
(19) |
Mar
(7) |
Apr
(26) |
May
(3) |
Jun
(7) |
Jul
(10) |
Aug
(20) |
Sep
(54) |
Oct
(38) |
Nov
(14) |
Dec
(11) |
2017 |
Jan
(6) |
Feb
(21) |
Mar
(10) |
Apr
(48) |
May
(4) |
Jun
(20) |
Jul
(72) |
Aug
(19) |
Sep
(23) |
Oct
(60) |
Nov
(16) |
Dec
(17) |
2018 |
Jan
(32) |
Feb
(7) |
Mar
|
Apr
(27) |
May
(8) |
Jun
(15) |
Jul
(2) |
Aug
(8) |
Sep
(36) |
Oct
(25) |
Nov
(17) |
Dec
(14) |
2019 |
Jan
(9) |
Feb
(5) |
Mar
(11) |
Apr
(32) |
May
(54) |
Jun
(19) |
Jul
(41) |
Aug
(11) |
Sep
(21) |
Oct
(49) |
Nov
(4) |
Dec
(1) |
2020 |
Jan
|
Feb
(25) |
Mar
(24) |
Apr
(3) |
May
(6) |
Jun
(43) |
Jul
(3) |
Aug
|
Sep
(9) |
Oct
(20) |
Nov
(10) |
Dec
(11) |
2021 |
Jan
(23) |
Feb
(12) |
Mar
(2) |
Apr
(13) |
May
(4) |
Jun
(2) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(16) |
Nov
(2) |
Dec
|
2022 |
Jan
(27) |
Feb
(7) |
Mar
(20) |
Apr
(4) |
May
(51) |
Jun
(75) |
Jul
|
Aug
(51) |
Sep
(43) |
Oct
(9) |
Nov
(17) |
Dec
(3) |
2023 |
Jan
(20) |
Feb
|
Mar
(6) |
Apr
(15) |
May
(20) |
Jun
(4) |
Jul
|
Aug
|
Sep
(1) |
Oct
(9) |
Nov
|
Dec
|
2024 |
Jan
(14) |
Feb
(6) |
Mar
(10) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: malat <ma...@us...> - 2024-04-03 06:16:41
|
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, master has been updated via dfc999a6b91c59a4973f17f2100a048cc674e026 (commit) via 8a6da61b9e57d9591c0cde737395de461d866b78 (commit) from b7d0d7218cdee0abf7cbeb77d468e64c463e0b3b (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/dfc999a6b91c59a4973f17f2100a048cc674e026/ commit dfc999a6b91c59a4973f17f2100a048cc674e026 Merge: b7d0d7218 8a6da61b9 Author: Mathieu Malaterre <mat...@gm...> Date: Tue Apr 2 23:17:50 2024 -0700 Merge branch 'release' ----------------------------------------------------------------------- Summary of changes: Source/Common/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-04-03 06:16:28
|
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 8a6da61b9e57d9591c0cde737395de461d866b78 (commit) from 06091299f2227f8470a4468821d231b760337ca0 (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/8a6da61b9e57d9591c0cde737395de461d866b78/ commit 8a6da61b9e57d9591c0cde737395de461d866b78 Author: Dženan ZukiÄ <dze...@ki...> Date: Tue Apr 2 11:19:36 2024 -0400 Prefer CheckSymbolExists over CheckFunctionExists This is a legacy cmake function anyway. It appears that recent Visual Studio compiler fails the test now. Should fix https://github.com/InsightSoftwareConsortium/ITK/issues/4552 diff --git a/Source/Common/CMakeLists.txt b/Source/Common/CMakeLists.txt index d635692e6..c937ea5a4 100644 --- a/Source/Common/CMakeLists.txt +++ b/Source/Common/CMakeLists.txt @@ -49,7 +49,7 @@ unset(CMAKE_REQUIRED_INCLUDES) unset(CMAKE_REQUIRED_LIBRARIES) #include(CheckSymbolExists) -CHECK_FUNCTION_EXISTS(gettimeofday GDCM_HAVE_GETTIMEOFDAY) +CHECK_SYMBOL_EXISTS(gettimeofday "sys/time.h" GDCM_HAVE_GETTIMEOFDAY) # json-c API changed: if(GDCM_USE_SYSTEM_JSON) set(CMAKE_REQUIRED_INCLUDES ${JSON_INCLUDE_DIRS}) ----------------------------------------------------------------------- Summary of changes: Source/Common/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-03-25 08:04:50
|
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, master has been updated via b7d0d7218cdee0abf7cbeb77d468e64c463e0b3b (commit) via 06091299f2227f8470a4468821d231b760337ca0 (commit) from a1572035f45c95ce75ca55951b327b72d2d08d2d (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/b7d0d7218cdee0abf7cbeb77d468e64c463e0b3b/ commit b7d0d7218cdee0abf7cbeb77d468e64c463e0b3b Merge: a1572035f 06091299f Author: Mathieu Malaterre <mat...@gm...> Date: Mon Mar 25 01:05:51 2024 -0700 Merge branch 'release' ----------------------------------------------------------------------- Summary of changes: Applications/Cxx/gdcminfo.cxx | 4 ++++ .../MediaStorageAndFileFormat/gdcmImageHelper.cxx | 23 ++++++++++++++++++++-- Source/MediaStorageAndFileFormat/gdcmImageHelper.h | 8 ++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-03-25 08:04:37
|
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 06091299f2227f8470a4468821d231b760337ca0 (commit) from 033b6d809ace87e814756b1e1559245b9e461051 (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/06091299f2227f8470a4468821d231b760337ca0/ commit 06091299f2227f8470a4468821d231b760337ca0 Author: Mathieu Malaterre <mat...@gm...> Date: Mon Mar 25 00:46:33 2024 -0700 Image Plane Module for SecondaryCaptureImageStorage Create an extension for SecondaryCaptureImageStorage as if Image Plane Module would be optional. This will allow reading IPP/IOP/PixelSpacing for SecondaryCaptureImageStorage for some particular dataset. Make this feature opt-in per the discussion: * https://github.com/malaterre/GDCM/pull/158 This extension does not implement Basic Pixel Spacing Calibration Macro Attributes since the original target dataset to support is as follow: $ dcmdump 000198cd-cd88-4760-97d1-21bbea047fff.dcm | grep Spacin (0018,0088) DS [1] # 2, 1 SpacingBetweenSlices (0028,0030) DS [.33\.33] # 8, 2 PixelSpacing > If Pixel Spacing Calibration Type (0028,0A02) and Imager Pixel Spacing > (0018,1164) and Nominal Scanned Pixel Spacing (0018,2010) are absent, > then it cannot be determined whether or not correction or calibration > have been performed. References: * https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.6.2.html#table_C.8-25 * https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_10.7.html#table_10-10 Co-authored-by: Matt McCormick <mat...@ki...> Co-authored-by: Mihail Isakov <mih...@gm...> Co-authored-by: Steve Pieper <pi...@is...> diff --git a/Applications/Cxx/gdcminfo.cxx b/Applications/Cxx/gdcminfo.cxx index ff9508535..fc82e869a 100644 --- a/Applications/Cxx/gdcminfo.cxx +++ b/Applications/Cxx/gdcminfo.cxx @@ -350,6 +350,7 @@ static void PrintHelp() std::cout << " --force-rescale force rescale." << std::endl; std::cout << " --force-spacing force spacing." << std::endl; std::cout << " --mosaic dump image information of MOSAIC." << std::endl; + std::cout << " --scipm Include Image Plane Module for Secondary Capture Image." << std::endl; std::cout << "General Options:" << std::endl; std::cout << " -V --verbose more verbose (warning+error)." << std::endl; @@ -626,6 +627,7 @@ int main(int argc, char *argv[]) std::string xmlpath; int forcerescale = 0; int forcespacing = 0; + int scipm = 0; int resourcespath = 0; int verbose = 0; @@ -647,6 +649,7 @@ int main(int argc, char *argv[]) {"force-rescale", 0, &forcerescale, 1}, {"force-spacing", 0, &forcespacing, 1}, {"mosaic", 0, &mosaic, 1}, + {"scipm", 0, &scipm, 1}, {"verbose", 0, &verbose, 1}, {"warning", 0, &warning, 1}, @@ -769,6 +772,7 @@ int main(int argc, char *argv[]) gdcm::ImageHelper::SetForceRescaleInterceptSlope(forcerescale ? true : false); gdcm::ImageHelper::SetForcePixelSpacing(forcespacing ? true : false); + gdcm::ImageHelper::SetSecondaryCaptureImagePlaneModule(scipm ? true : false); if( filename.empty() ) { diff --git a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx index f69110a29..888412067 100644 --- a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx @@ -48,6 +48,7 @@ namespace gdcm bool ImageHelper::ForceRescaleInterceptSlope = false; bool ImageHelper::PMSRescaleInterceptSlope = true; bool ImageHelper::ForcePixelSpacing = false; +bool ImageHelper::SecondaryCaptureImagePlaneModule = false; static bool GetOriginValueFromSequence(const DataSet& ds, const Tag& tfgs, std::vector<double> &ori) { @@ -578,7 +579,7 @@ std::vector<double> ImageHelper::GetOriginValue(File const & f) // else const Tag timagepositionpatient(0x0020, 0x0032); - if( ms != MediaStorage::SecondaryCaptureImageStorage && ds.FindDataElement( timagepositionpatient ) ) + if( (ms != MediaStorage::SecondaryCaptureImageStorage || SecondaryCaptureImagePlaneModule) && ds.FindDataElement( timagepositionpatient ) ) { const DataElement& de = ds.GetDataElement( timagepositionpatient ); Attribute<0x0020,0x0032> at = {{0,0,0}}; // default value if empty @@ -730,7 +731,7 @@ std::vector<double> ImageHelper::GetDirectionCosinesValue(File const & f) } dircos.resize( 6 ); - if( ms == MediaStorage::SecondaryCaptureImageStorage || !GetDirectionCosinesFromDataSet(ds, dircos) ) + if( (ms == MediaStorage::SecondaryCaptureImageStorage && !SecondaryCaptureImagePlaneModule) || !GetDirectionCosinesFromDataSet(ds, dircos) ) { dircos[0] = 1; dircos[1] = 0; @@ -774,6 +775,16 @@ bool ImageHelper::GetForcePixelSpacing() return ForcePixelSpacing; } +void ImageHelper::SetSecondaryCaptureImagePlaneModule(bool b) +{ + SecondaryCaptureImagePlaneModule = b; +} + +bool ImageHelper::GetSecondaryCaptureImagePlaneModule() +{ + return SecondaryCaptureImagePlaneModule; +} + bool GetRescaleInterceptSlopeValueFromDataSet(const DataSet& ds, std::vector<double> & interceptslope) { Attribute<0x0028,0x1052> at1; @@ -1264,6 +1275,14 @@ Tag ImageHelper::GetSpacingTagFromMediaStorage(MediaStorage const &ms) t = Tag(0x3002,0x0011); // ImagePlanePixelSpacing break; case MediaStorage::SecondaryCaptureImageStorage: + if( ImageHelper::SecondaryCaptureImagePlaneModule ) { + // Make SecondaryCaptureImagePlaneModule act as ForcePixelSpacing + // This is different from Basic Pixel Spacing Calibration Macro Attributes + t = Tag(0x0028,0x0030); + } else { + t = Tag(0x0018,0x2010); + } + break; case MediaStorage::MultiframeSingleBitSecondaryCaptureImageStorage: case MediaStorage::MultiframeGrayscaleByteSecondaryCaptureImageStorage: case MediaStorage::MultiframeGrayscaleWordSecondaryCaptureImageStorage: diff --git a/Source/MediaStorageAndFileFormat/gdcmImageHelper.h b/Source/MediaStorageAndFileFormat/gdcmImageHelper.h index 2f70231d4..764939f4d 100644 --- a/Source/MediaStorageAndFileFormat/gdcmImageHelper.h +++ b/Source/MediaStorageAndFileFormat/gdcmImageHelper.h @@ -85,6 +85,13 @@ public: static void SetForcePixelSpacing(bool); static bool GetForcePixelSpacing(); + /// Opt into Image Plane Module for Secondary Capture Image Storage + /// Enable reading Image Position Patient (IPP), Image Orientation Patient + /// (IOP) and Pixel Spacing (0028,0030) + /// This is a custom extension for some existing dataset (academic) + static void SetSecondaryCaptureImagePlaneModule(bool); + static bool GetSecondaryCaptureImagePlaneModule(); + /// This function checks tags (0x0028, 0x0010) and (0x0028, 0x0011) for the /// rows and columns of the image in pixels (as opposed to actual distances). /// The output is {col , row} @@ -156,6 +163,7 @@ private: static bool ForceRescaleInterceptSlope; static bool PMSRescaleInterceptSlope; static bool ForcePixelSpacing; + static bool SecondaryCaptureImagePlaneModule; }; } // end namespace gdcm ----------------------------------------------------------------------- Summary of changes: Applications/Cxx/gdcminfo.cxx | 4 ++++ .../MediaStorageAndFileFormat/gdcmImageHelper.cxx | 23 ++++++++++++++++++++-- Source/MediaStorageAndFileFormat/gdcmImageHelper.h | 8 ++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-03-21 14:22:34
|
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, master has been updated via a1572035f45c95ce75ca55951b327b72d2d08d2d (commit) via 033b6d809ace87e814756b1e1559245b9e461051 (commit) from db33d7c7ad1ffd5bbdaf9142f7af127663084f03 (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/a1572035f45c95ce75ca55951b327b72d2d08d2d/ commit a1572035f45c95ce75ca55951b327b72d2d08d2d Merge: db33d7c7a 033b6d809 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Mar 21 07:23:32 2024 -0700 Merge branch 'release' ----------------------------------------------------------------------- Summary of changes: Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-03-21 14:21:46
|
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 033b6d809ace87e814756b1e1559245b9e461051 (commit) from 75e1f8210977afbd64bd4f9093be8a8e75037265 (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/033b6d809ace87e814756b1e1559245b9e461051/ commit 033b6d809ace87e814756b1e1559245b9e461051 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Mar 21 07:22:10 2024 -0700 Ack that MFSPLIT/SIEMENS is using Modality LUT Should reduce noise diff --git a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx index 3dd08ed97..f69110a29 100644 --- a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx @@ -1188,7 +1188,7 @@ std::vector<double> ImageHelper::GetRescaleInterceptSlopeValue(File const & f) // Case is: MAGNETOM Prisma / syngo MR XA30A with MFSPLIT interceptslope[0] = dummy[0]; interceptslope[1] = dummy[1]; - gdcmWarningMacro( "Forcing Modality LUT used for MR Image Storage: [" << dummy[0] << "," << dummy[1] << "]" ); + gdcmDebugMacro( "Forcing Modality LUT used for MR Image Storage: [" << dummy[0] << "," << dummy[1] << "]" ); } } } ----------------------------------------------------------------------- Summary of changes: Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-03-21 14:09:47
|
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, master has been updated via db33d7c7ad1ffd5bbdaf9142f7af127663084f03 (commit) via 75e1f8210977afbd64bd4f9093be8a8e75037265 (commit) from 7d4b775f518ad8beda615df32c7dd868e1548295 (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/db33d7c7ad1ffd5bbdaf9142f7af127663084f03/ commit db33d7c7ad1ffd5bbdaf9142f7af127663084f03 Merge: 7d4b775f5 75e1f8210 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Mar 21 07:10:45 2024 -0700 Merge branch 'release' ----------------------------------------------------------------------- Summary of changes: Utilities/gdcmzlib/CMakeLists.txt | 63 +- Utilities/gdcmzlib/COPYING | 12 +- Utilities/gdcmzlib/ChangeLog | 871 +- Utilities/gdcmzlib/FAQ | 339 - Utilities/gdcmzlib/INDEX | 51 - Utilities/{gdcmmd5/COPYING => gdcmzlib/LICENSE} | 12 +- Utilities/gdcmzlib/README | 100 +- Utilities/gdcmzlib/README.GDCM.txt | 45 +- Utilities/gdcmzlib/adler32.c | 103 +- Utilities/gdcmzlib/algorithm.txt | 209 - Utilities/gdcmzlib/compress.c | 66 +- Utilities/gdcmzlib/crc32.c | 1252 ++- Utilities/gdcmzlib/crc32.h | 9877 ++++++++++++++++++++++- Utilities/gdcmzlib/deflate.c | 1901 +++-- Utilities/gdcmzlib/deflate.h | 134 +- Utilities/gdcmzlib/example.c | 565 -- Utilities/gdcmzlib/examples/README.examples | 42 - Utilities/gdcmzlib/examples/fitblk.c | 233 - Utilities/gdcmzlib/examples/gun.c | 693 -- Utilities/gdcmzlib/examples/gzappend.c | 500 -- Utilities/gdcmzlib/examples/gzjoin.c | 448 - Utilities/gdcmzlib/examples/gzlog.c | 413 - Utilities/gdcmzlib/examples/gzlog.h | 58 - Utilities/gdcmzlib/examples/zlib_how.html | 523 -- Utilities/gdcmzlib/examples/zpipe.c | 191 - Utilities/gdcmzlib/examples/zran.c | 404 - Utilities/gdcmzlib/gzguts.h | 214 + Utilities/gdcmzlib/gzio.c | 1026 --- Utilities/gdcmzlib/infback.c | 155 +- Utilities/gdcmzlib/inffast.c | 162 +- Utilities/gdcmzlib/inffast.h | 4 +- Utilities/gdcmzlib/inffixed.h | 6 +- Utilities/gdcmzlib/inflate.c | 604 +- Utilities/gdcmzlib/inflate.h | 41 +- Utilities/gdcmzlib/inftrees.c | 118 +- Utilities/gdcmzlib/inftrees.h | 31 +- Utilities/gdcmzlib/minigzip.c | 322 - Utilities/gdcmzlib/trees.c | 786 +- Utilities/gdcmzlib/trees.h | 4 +- Utilities/gdcmzlib/uncompr.c | 100 +- Utilities/gdcmzlib/zconf.in.h | 298 +- Utilities/gdcmzlib/zlib.3 | 159 - Utilities/gdcmzlib/zlib.def.in | 2 +- Utilities/gdcmzlib/zlib.h | 1867 +++-- Utilities/gdcmzlib/zlib.rc | 10 +- Utilities/gdcmzlib/zutil.c | 151 +- Utilities/gdcmzlib/zutil.h | 207 +- 47 files changed, 15555 insertions(+), 9817 deletions(-) delete mode 100644 Utilities/gdcmzlib/FAQ delete mode 100644 Utilities/gdcmzlib/INDEX copy Utilities/{gdcmmd5/COPYING => gdcmzlib/LICENSE} (84%) delete mode 100644 Utilities/gdcmzlib/algorithm.txt delete mode 100644 Utilities/gdcmzlib/example.c delete mode 100644 Utilities/gdcmzlib/examples/README.examples delete mode 100644 Utilities/gdcmzlib/examples/fitblk.c delete mode 100644 Utilities/gdcmzlib/examples/gun.c delete mode 100644 Utilities/gdcmzlib/examples/gzappend.c delete mode 100644 Utilities/gdcmzlib/examples/gzjoin.c delete mode 100644 Utilities/gdcmzlib/examples/gzlog.c delete mode 100644 Utilities/gdcmzlib/examples/gzlog.h delete mode 100644 Utilities/gdcmzlib/examples/zlib_how.html delete mode 100644 Utilities/gdcmzlib/examples/zpipe.c delete mode 100644 Utilities/gdcmzlib/examples/zran.c create mode 100644 Utilities/gdcmzlib/gzguts.h delete mode 100644 Utilities/gdcmzlib/gzio.c delete mode 100644 Utilities/gdcmzlib/minigzip.c delete mode 100644 Utilities/gdcmzlib/zlib.3 hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-03-21 14:09:35
|
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 75e1f8210977afbd64bd4f9093be8a8e75037265 (commit) from 6f13bbfc074e4e048d23f21f302579213915be1d (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/75e1f8210977afbd64bd4f9093be8a8e75037265/ commit 75e1f8210977afbd64bd4f9093be8a8e75037265 Author: Sean McBride <se...@ro...> Date: Fri Mar 1 23:01:14 2024 -0500 Update to zlib 1.3.1 diff --git a/Utilities/gdcmzlib/CMakeLists.txt b/Utilities/gdcmzlib/CMakeLists.txt index cd8451efb..834c4ac8f 100644 --- a/Utilities/gdcmzlib/CMakeLists.txt +++ b/Utilities/gdcmzlib/CMakeLists.txt @@ -14,26 +14,41 @@ project(${ZLIB_NAMESPACE} C) # Do full dependency headers. include_regular_expression("^.*$") -# source files for zlib -set(ZLIB_SRCS - adler32.c - compress.c - crc32.c - deflate.c - #example.c - gzio.c - infback.c - inffast.c - inflate.c - inftrees.c - #minigzip.c - trees.c - uncompr.c - zutil.c - ) +#============================================================================ +# zlib +#============================================================================ +set(ZLIB_PUBLIC_HDRS + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h + zlib.h +) +set(ZLIB_PRIVATE_HDRS + crc32.h + deflate.h + gzguts.h + inffast.h + inffixed.h + inflate.h + inftrees.h + trees.h + zutil.h +) +set(ZLIB_SRCS + adler32.c + compress.c + crc32.c + deflate.c + inflate.c + infback.c + inftrees.c + inffast.c + trees.c + uncompr.c + zutil.c +) -# for windows add the .def and .rc files to the source list if building shared libs +# for windows add the .def and .rc files to the source list +# if building shared libs if(WIN32) if(BUILD_SHARED_LIBS) set(ZLIB_DLL 1) @@ -42,15 +57,15 @@ if(WIN32) if(NOT MINGW) set(ZLIB_SRCS ${ZLIB_SRCS} zlib.def zlib.rc ) endif() - endif() - endif() + endif() + endif() endif() endif() - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/zconf.in.h - ${CMAKE_CURRENT_BINARY_DIR}/zconf.h - ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/zconf.in.h + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h +) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/Utilities/gdcmzlib/COPYING b/Utilities/gdcmzlib/COPYING index ce56d6093..ab8ee6f71 100644 --- a/Utilities/gdcmzlib/COPYING +++ b/Utilities/gdcmzlib/COPYING @@ -1,7 +1,6 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.3, July 18th, 2005 +Copyright notice: - Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + (C) 1995-2022 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -21,10 +20,3 @@ Jean-loup Gailly Mark Adler jl...@gz... ma...@al... - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt - (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). -*/ - diff --git a/Utilities/gdcmzlib/ChangeLog b/Utilities/gdcmzlib/ChangeLog index 7f6869d32..b801a1031 100644 --- a/Utilities/gdcmzlib/ChangeLog +++ b/Utilities/gdcmzlib/ChangeLog @@ -1,6 +1,769 @@ ChangeLog file for zlib +Changes in 1.3.1 (22 Jan 2024) +- Reject overflows of zip header fields in minizip +- Fix bug in inflateSync() for data held in bit buffer +- Add LIT_MEM define to use more memory for a small deflate speedup +- Fix decision on the emission of Zip64 end records in minizip +- Add bounds checking to ERR_MSG() macro, used by zError() +- Neutralize zip file traversal attacks in miniunz +- Fix a bug in ZLIB_DEBUG compiles in check_match() +- Various portability and appearance improvements + +Changes in 1.3 (18 Aug 2023) +- Remove K&R function definitions and zlib2ansi +- Fix bug in deflateBound() for level 0 and memLevel 9 +- Fix bug when gzungetc() is used immediately after gzopen() +- Fix bug when using gzflush() with a very small buffer +- Fix crash when gzsetparams() attempted for transparent write +- Fix test/example.c to work with FORCE_STORED +- Rewrite of zran in examples (see zran.c version history) +- Fix minizip to allow it to open an empty zip file +- Fix reading disk number start on zip64 files in minizip +- Fix logic error in minizip argument processing +- Add minizip testing to Makefile +- Read multiple bytes instead of byte-by-byte in minizip unzip.c +- Add memory sanitizer to configure (--memory) +- Various portability improvements +- Various documentation improvements +- Various spelling and typo corrections + +Changes in 1.2.13 (13 Oct 2022) +- Fix configure issue that discarded provided CC definition +- Correct incorrect inputs provided to the CRC functions +- Repair prototypes and exporting of new CRC functions +- Fix inflateBack to detect invalid input with distances too far +- Have infback() deliver all of the available output up to any error +- Fix a bug when getting a gzip header extra field with inflate() +- Fix bug in block type selection when Z_FIXED used +- Tighten deflateBound bounds +- Remove deleted assembler code references +- Various portability and appearance improvements + +Changes in 1.2.12 (27 Mar 2022) +- Cygwin does not have _wopen(), so do not create gzopen_w() there +- Permit a deflateParams() parameter change as soon as possible +- Limit hash table inserts after switch from stored deflate +- Fix bug when window full in deflate_stored() +- Fix CLEAR_HASH macro to be usable as a single statement +- Avoid a conversion error in gzseek when off_t type too small +- Have Makefile return non-zero error code on test failure +- Avoid some conversion warnings in gzread.c and gzwrite.c +- Update use of errno for newer Windows CE versions +- Small speedup to inflate [psumbera] +- Return an error if the gzputs string length can't fit in an int +- Add address checking in clang to -w option of configure +- Don't compute check value for raw inflate if asked to validate +- Handle case where inflateSync used when header never processed +- Avoid the use of ptrdiff_t +- Avoid an undefined behavior of memcpy() in gzappend() +- Avoid undefined behaviors of memcpy() in gz*printf() +- Avoid an undefined behavior of memcpy() in _tr_stored_block() +- Make the names in functions declarations identical to definitions +- Remove old assembler code in which bugs have manifested +- Fix deflateEnd() to not report an error at start of raw deflate +- Add legal disclaimer to README +- Emphasize the need to continue decompressing gzip members +- Correct the initialization requirements for deflateInit2() +- Fix a bug that can crash deflate on some input when using Z_FIXED +- Assure that the number of bits for deflatePrime() is valid +- Use a structure to make globals in enough.c evident +- Use a macro for the printf format of big_t in enough.c +- Clean up code style in enough.c, update version +- Use inline function instead of macro for index in enough.c +- Clarify that prefix codes are counted in enough.c +- Show all the codes for the maximum tables size in enough.c +- Add gznorm.c example, which normalizes gzip files +- Fix the zran.c example to work on a multiple-member gzip file +- Add tables for crc32_combine(), to speed it up by a factor of 200 +- Add crc32_combine_gen() and crc32_combine_op() for fast combines +- Speed up software CRC-32 computation by a factor of 1.5 to 3 +- Use atomic test and set, if available, for dynamic CRC tables +- Don't bother computing check value after successful inflateSync() +- Correct comment in crc32.c +- Add use of the ARMv8 crc32 instructions when requested +- Use ARM crc32 instructions if the ARM architecture has them +- Explicitly note that the 32-bit check values are 32 bits +- Avoid adding empty gzip member after gzflush with Z_FINISH +- Fix memory leak on error in gzlog.c +- Fix error in comment on the polynomial representation of a byte +- Clarify gz* function interfaces, referring to parameter names +- Change macro name in inflate.c to avoid collision in VxWorks +- Correct typo in blast.c +- Improve portability of contrib/minizip +- Fix indentation in minizip's zip.c +- Replace black/white with allow/block. (theresa-m) +- minizip warning fix if MAXU32 already defined. (gvollant) +- Fix unztell64() in minizip to work past 4GB. (Daniël Hörchner) +- Clean up minizip to reduce warnings for testing +- Add fallthrough comments for gcc +- Eliminate use of ULL constants +- Separate out address sanitizing from warnings in configure +- Remove destructive aspects of make distclean +- Check for cc masquerading as gcc or clang in configure +- Fix crc32.c to compile local functions only if used + +Changes in 1.2.11 (15 Jan 2017) +- Fix deflate stored bug when pulling last block from window +- Permit immediate deflateParams changes before any deflate input + +Changes in 1.2.10 (2 Jan 2017) +- Avoid warnings on snprintf() return value +- Fix bug in deflate_stored() for zero-length input +- Fix bug in gzwrite.c that produced corrupt gzip files +- Remove files to be installed before copying them in Makefile.in +- Add warnings when compiling with assembler code + +Changes in 1.2.9 (31 Dec 2016) +- Fix contrib/minizip to permit unzipping with desktop API [Zouzou] +- Improve contrib/blast to return unused bytes +- Assure that gzoffset() is correct when appending +- Improve compress() and uncompress() to support large lengths +- Fix bug in test/example.c where error code not saved +- Remedy Coverity warning [Randers-Pehrson] +- Improve speed of gzprintf() in transparent mode +- Fix inflateInit2() bug when windowBits is 16 or 32 +- Change DEBUG macro to ZLIB_DEBUG +- Avoid uninitialized access by gzclose_w() +- Allow building zlib outside of the source directory +- Fix bug that accepted invalid zlib header when windowBits is zero +- Fix gzseek() problem on MinGW due to buggy _lseeki64 there +- Loop on write() calls in gzwrite.c in case of non-blocking I/O +- Add --warn (-w) option to ./configure for more compiler warnings +- Reject a window size of 256 bytes if not using the zlib wrapper +- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE +- Add --debug (-d) option to ./configure to define ZLIB_DEBUG +- Fix bugs in creating a very large gzip header +- Add uncompress2() function, which returns the input size used +- Assure that deflateParams() will not switch functions mid-block +- Dramatically speed up deflation for level 0 (storing) +- Add gzfread(), duplicating the interface of fread() +- Add gzfwrite(), duplicating the interface of fwrite() +- Add deflateGetDictionary() function +- Use snprintf() for later versions of Microsoft C +- Fix *Init macros to use z_ prefix when requested +- Replace as400 with os400 for OS/400 support [Monnerat] +- Add crc32_z() and adler32_z() functions with size_t lengths +- Update Visual Studio project files [AraHaan] + +Changes in 1.2.8 (28 Apr 2013) +- Update contrib/minizip/iowin32.c for Windows RT [Vollant] +- Do not force Z_CONST for C++ +- Clean up contrib/vstudio [RoÃ] +- Correct spelling error in zlib.h +- Fix mixed line endings in contrib/vstudio + +Changes in 1.2.7.3 (13 Apr 2013) +- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc + +Changes in 1.2.7.2 (13 Apr 2013) +- Change check for a four-byte type back to hexadecimal +- Fix typo in win32/Makefile.msc +- Add casts in gzwrite.c for pointer differences + +Changes in 1.2.7.1 (24 Mar 2013) +- Replace use of unsafe string functions with snprintf if available +- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink] +- Fix gzgetc undefine when Z_PREFIX set [Turk] +- Eliminate use of mktemp in Makefile (not always available) +- Fix bug in 'F' mode for gzopen() +- Add inflateGetDictionary() function +- Correct comment in deflate.h +- Use _snprintf for snprintf in Microsoft C +- On Darwin, only use /usr/bin/libtool if libtool is not Apple +- Delete "--version" file if created by "ar --version" [Richard G.] +- Fix configure check for veracity of compiler error return codes +- Fix CMake compilation of static lib for MSVC2010 x64 +- Remove unused variable in infback9.c +- Fix argument checks in gzlog_compress() and gzlog_write() +- Clean up the usage of z_const and respect const usage within zlib +- Clean up examples/gzlog.[ch] comparisons of different types +- Avoid shift equal to bits in type (caused endless loop) +- Fix uninitialized value bug in gzputc() introduced by const patches +- Fix memory allocation error in examples/zran.c [Nor] +- Fix bug where gzopen(), gzclose() would write an empty file +- Fix bug in gzclose() when gzwrite() runs out of memory +- Check for input buffer malloc failure in examples/gzappend.c +- Add note to contrib/blast to use binary mode in stdio +- Fix comparisons of differently signed integers in contrib/blast +- Check for invalid code length codes in contrib/puff +- Fix serious but very rare decompression bug in inftrees.c +- Update inflateBack() comments, since inflate() can be faster +- Use underscored I/O function names for WINAPI_FAMILY +- Add _tr_flush_bits to the external symbols prefixed by --zprefix +- Add contrib/vstudio/vc10 pre-build step for static only +- Quote --version-script argument in CMakeLists.txt +- Don't specify --version-script on Apple platforms in CMakeLists.txt +- Fix casting error in contrib/testzlib/testzlib.c +- Fix types in contrib/minizip to match result of get_crc_table() +- Simplify contrib/vstudio/vc10 with 'd' suffix +- Add TOP support to win32/Makefile.msc +- Support i686 and amd64 assembler builds in CMakeLists.txt +- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h +- Add vc11 and vc12 build files to contrib/vstudio +- Add gzvprintf() as an undocumented function in zlib +- Fix configure for Sun shell +- Remove runtime check in configure for four-byte integer type +- Add casts and consts to ease user conversion to C++ +- Add man pages for minizip and miniunzip +- In Makefile uninstall, don't rm if preceding cd fails +- Do not return Z_BUF_ERROR if deflateParam() has nothing to write + +Changes in 1.2.7 (2 May 2012) +- Replace use of memmove() with a simple copy for portability +- Test for existence of strerror +- Restore gzgetc_ for backward compatibility with 1.2.6 +- Fix build with non-GNU make on Solaris +- Require gcc 4.0 or later on Mac OS X to use the hidden attribute +- Include unistd.h for Watcom C +- Use __WATCOMC__ instead of __WATCOM__ +- Do not use the visibility attribute if NO_VIZ defined +- Improve the detection of no hidden visibility attribute +- Avoid using __int64 for gcc or solo compilation +- Cast to char * in gzprintf to avoid warnings [Zinser] +- Fix make_vms.com for VAX [Zinser] +- Don't use library or built-in byte swaps +- Simplify test and use of gcc hidden attribute +- Fix bug in gzclose_w() when gzwrite() fails to allocate memory +- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen() +- Fix bug in test/minigzip.c for configure --solo +- Fix contrib/vstudio project link errors [Mohanathas] +- Add ability to choose the builder in make_vms.com [Schweda] +- Add DESTDIR support to mingw32 win32/Makefile.gcc +- Fix comments in win32/Makefile.gcc for proper usage +- Allow overriding the default install locations for cmake +- Generate and install the pkg-config file with cmake +- Build both a static and a shared version of zlib with cmake +- Include version symbols for cmake builds +- If using cmake with MSVC, add the source directory to the includes +- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta] +- Move obsolete emx makefile to old [Truta] +- Allow the use of -Wundef when compiling or using zlib +- Avoid the use of the -u option with mktemp +- Improve inflate() documentation on the use of Z_FINISH +- Recognize clang as gcc +- Add gzopen_w() in Windows for wide character path names +- Rename zconf.h in CMakeLists.txt to move it out of the way +- Add source directory in CMakeLists.txt for building examples +- Look in build directory for zlib.pc in CMakeLists.txt +- Remove gzflags from zlibvc.def in vc9 and vc10 +- Fix contrib/minizip compilation in the MinGW environment +- Update ./configure for Solaris, support --64 [Mooney] +- Remove -R. from Solaris shared build (possible security issue) +- Avoid race condition for parallel make (-j) running example +- Fix type mismatch between get_crc_table() and crc_table +- Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler] +- Fix the path to zlib.map in CMakeLists.txt +- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe] +- Add instructions to win32/Makefile.gcc for shared install [Torri] + +Changes in 1.2.6.1 (12 Feb 2012) +- Avoid the use of the Objective-C reserved name "id" +- Include io.h in gzguts.h for Microsoft compilers +- Fix problem with ./configure --prefix and gzgetc macro +- Include gz_header definition when compiling zlib solo +- Put gzflags() functionality back in zutil.c +- Avoid library header include in crc32.c for Z_SOLO +- Use name in GCC_CLASSIC as C compiler for coverage testing, if set +- Minor cleanup in contrib/minizip/zip.c [Vollant] +- Update make_vms.com [Zinser] +- Remove unnecessary gzgetc_ function +- Use optimized byte swap operations for Microsoft and GNU [Snyder] +- Fix minor typo in zlib.h comments [Rzesniowiecki] + +Changes in 1.2.6 (29 Jan 2012) +- Update the Pascal interface in contrib/pascal +- Fix function numbers for gzgetc_ in zlibvc.def files +- Fix configure.ac for contrib/minizip [Schiffer] +- Fix large-entry detection in minizip on 64-bit systems [Schiffer] +- Have ./configure use the compiler return code for error indication +- Fix CMakeLists.txt for cross compilation [McClure] +- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes] +- Fix compilation of contrib/minizip on FreeBSD [Marquez] +- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath] +- Include io.h for Turbo C / Borland C on all platforms [Truta] +- Make version explicit in contrib/minizip/configure.ac [Bosmans] +- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant] +- Minor cleanup up contrib/minizip/unzip.c [Vollant] +- Fix bug when compiling minizip with C++ [Vollant] +- Protect for long name and extra fields in contrib/minizip [Vollant] +- Avoid some warnings in contrib/minizip [Vollant] +- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip +- Add missing libs to minizip linker command +- Add support for VPATH builds in contrib/minizip +- Add an --enable-demos option to contrib/minizip/configure +- Add the generation of configure.log by ./configure +- Exit when required parameters not provided to win32/Makefile.gcc +- Have gzputc return the character written instead of the argument +- Use the -m option on ldconfig for BSD systems [Tobias] +- Correct in zlib.map when deflateResetKeep was added + +Changes in 1.2.5.3 (15 Jan 2012) +- Restore gzgetc function for binary compatibility +- Do not use _lseeki64 under Borland C++ [Truta] +- Update win32/Makefile.msc to build test/*.c [Truta] +- Remove old/visualc6 given CMakefile and other alternatives +- Update AS400 build files and documentation [Monnerat] +- Update win32/Makefile.gcc to build test/*.c [Truta] +- Permit stronger flushes after Z_BLOCK flushes +- Avoid extraneous empty blocks when doing empty flushes +- Permit Z_NULL arguments to deflatePending +- Allow deflatePrime() to insert bits in the middle of a stream +- Remove second empty static block for Z_PARTIAL_FLUSH +- Write out all of the available bits when using Z_BLOCK +- Insert the first two strings in the hash table after a flush + +Changes in 1.2.5.2 (17 Dec 2011) +- fix ld error: unable to find version dependency 'ZLIB_1.2.5' +- use relative symlinks for shared libs +- Avoid searching past window for Z_RLE strategy +- Assure that high-water mark initialization is always applied in deflate +- Add assertions to fill_window() in deflate.c to match comments +- Update python link in README +- Correct spelling error in gzread.c +- Fix bug in gzgets() for a concatenated empty gzip stream +- Correct error in comment for gz_make() +- Change gzread() and related to ignore junk after gzip streams +- Allow gzread() and related to continue after gzclearerr() +- Allow gzrewind() and gzseek() after a premature end-of-file +- Simplify gzseek() now that raw after gzip is ignored +- Change gzgetc() to a macro for speed (~40% speedup in testing) +- Fix gzclose() to return the actual error last encountered +- Always add large file support for windows +- Include zconf.h for windows large file support +- Include zconf.h.cmakein for windows large file support +- Update zconf.h.cmakein on make distclean +- Merge vestigial vsnprintf determination from zutil.h to gzguts.h +- Clarify how gzopen() appends in zlib.h comments +- Correct documentation of gzdirect() since junk at end now ignored +- Add a transparent write mode to gzopen() when 'T' is in the mode +- Update python link in zlib man page +- Get inffixed.h and MAKEFIXED result to match +- Add a ./config --solo option to make zlib subset with no library use +- Add undocumented inflateResetKeep() function for CAB file decoding +- Add --cover option to ./configure for gcc coverage testing +- Add #define ZLIB_CONST option to use const in the z_stream interface +- Add comment to gzdopen() in zlib.h to use dup() when using fileno() +- Note behavior of uncompress() to provide as much data as it can +- Add files in contrib/minizip to aid in building libminizip +- Split off AR options in Makefile.in and configure +- Change ON macro to Z_ARG to avoid application conflicts +- Facilitate compilation with Borland C++ for pragmas and vsnprintf +- Include io.h for Turbo C / Borland C++ +- Move example.c and minigzip.c to test/ +- Simplify incomplete code table filling in inflate_table() +- Remove code from inflate.c and infback.c that is impossible to execute +- Test the inflate code with full coverage +- Allow deflateSetDictionary, inflateSetDictionary at any time (in raw) +- Add deflateResetKeep and fix inflateResetKeep to retain dictionary +- Fix gzwrite.c to accommodate reduced memory zlib compilation +- Have inflate() with Z_FINISH avoid the allocation of a window +- Do not set strm->adler when doing raw inflate +- Fix gzeof() to behave just like feof() when read is not past end of file +- Fix bug in gzread.c when end-of-file is reached +- Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF +- Document gzread() capability to read concurrently written files +- Remove hard-coding of resource compiler in CMakeLists.txt [Blammo] + +Changes in 1.2.5.1 (10 Sep 2011) +- Update FAQ entry on shared builds (#13) +- Avoid symbolic argument to chmod in Makefile.in +- Fix bug and add consts in contrib/puff [Oberhumer] +- Update contrib/puff/zeros.raw test file to have all block types +- Add full coverage test for puff in contrib/puff/Makefile +- Fix static-only-build install in Makefile.in +- Fix bug in unzGetCurrentFileInfo() in contrib/minizip [Kuno] +- Add libz.a dependency to shared in Makefile.in for parallel builds +- Spell out "number" (instead of "nb") in zlib.h for total_in, total_out +- Replace $(...) with `...` in configure for non-bash sh [Bowler] +- Add darwin* to Darwin* and solaris* to SunOS\ 5* in configure [Groffen] +- Add solaris* to Linux* in configure to allow gcc use [Groffen] +- Add *bsd* to Linux* case in configure [Bar-Lev] +- Add inffast.obj to dependencies in win32/Makefile.msc +- Correct spelling error in deflate.h [Kohler] +- Change libzdll.a again to libz.dll.a (!) in win32/Makefile.gcc +- Add test to configure for GNU C looking for gcc in output of $cc -v +- Add zlib.pc generation to win32/Makefile.gcc [Weigelt] +- Fix bug in zlib.h for _FILE_OFFSET_BITS set and _LARGEFILE64_SOURCE not +- Add comment in zlib.h that adler32_combine with len2 < 0 makes no sense +- Make NO_DIVIDE option in adler32.c much faster (thanks to John Reiser) +- Make stronger test in zconf.h to include unistd.h for LFS +- Apply Darwin patches for 64-bit file offsets to contrib/minizip [Slack] +- Fix zlib.h LFS support when Z_PREFIX used +- Add updated as400 support (removed from old) [Monnerat] +- Avoid deflate sensitivity to volatile input data +- Avoid division in adler32_combine for NO_DIVIDE +- Clarify the use of Z_FINISH with deflateBound() amount of space +- Set binary for output file in puff.c +- Use u4 type for crc_table to avoid conversion warnings +- Apply casts in zlib.h to avoid conversion warnings +- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller] +- Improve inflateSync() documentation to note indeterminacy +- Add deflatePending() function to return the amount of pending output +- Correct the spelling of "specification" in FAQ [Randers-Pehrson] +- Add a check in configure for stdarg.h, use for gzprintf() +- Check that pointers fit in ints when gzprint() compiled old style +- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler] +- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt] +- Add debug records in assembler code [Londer] +- Update RFC references to use http://tools.ietf.org/html/... [Li] +- Add --archs option, use of libtool to configure for Mac OS X [Borstel] + +Changes in 1.2.5 (19 Apr 2010) +- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev] +- Default to libdir as sharedlibdir in configure [Nieder] +- Update copyright dates on modified source files +- Update trees.c to be able to generate modified trees.h +- Exit configure for MinGW, suggesting win32/Makefile.gcc +- Check for NULL path in gz_open [Homurlu] + +Changes in 1.2.4.5 (18 Apr 2010) +- Set sharedlibdir in configure [Torok] +- Set LDFLAGS in Makefile.in [Bar-Lev] +- Avoid mkdir objs race condition in Makefile.in [Bowler] +- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays +- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C +- Don't use hidden attribute when it is a warning generator (e.g. Solaris) + +Changes in 1.2.4.4 (18 Apr 2010) +- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok] +- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty +- Try to use bash or ksh regardless of functionality of /bin/sh +- Fix configure incompatibility with NetBSD sh +- Remove attempt to run under bash or ksh since have better NetBSD fix +- Fix win32/Makefile.gcc for MinGW [Bar-Lev] +- Add diagnostic messages when using CROSS_PREFIX in configure +- Added --sharedlibdir option to configure [Weigelt] +- Use hidden visibility attribute when available [Frysinger] + +Changes in 1.2.4.3 (10 Apr 2010) +- Only use CROSS_PREFIX in configure for ar and ranlib if they exist +- Use CROSS_PREFIX for nm [Bar-Lev] +- Assume _LARGEFILE64_SOURCE defined is equivalent to true +- Avoid use of undefined symbols in #if with && and || +- Make *64 prototypes in gzguts.h consistent with functions +- Add -shared load option for MinGW in configure [Bowler] +- Move z_off64_t to public interface, use instead of off64_t +- Remove ! from shell test in configure (not portable to Solaris) +- Change +0 macro tests to -0 for possibly increased portability + +Changes in 1.2.4.2 (9 Apr 2010) +- Add consistent carriage returns to readme.txt's in masmx86 and masmx64 +- Really provide prototypes for *64 functions when building without LFS +- Only define unlink() in minigzip.c if unistd.h not included +- Update README to point to contrib/vstudio project files +- Move projects/vc6 to old/ and remove projects/ +- Include stdlib.h in minigzip.c for setmode() definition under WinCE +- Clean up assembler builds in win32/Makefile.msc [Rowe] +- Include sys/types.h for Microsoft for off_t definition +- Fix memory leak on error in gz_open() +- Symbolize nm as $NM in configure [Weigelt] +- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt] +- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined +- Fix bug in gzeof() to take into account unused input data +- Avoid initialization of structures with variables in puff.c +- Updated win32/README-WIN32.txt [Rowe] + +Changes in 1.2.4.1 (28 Mar 2010) +- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] +- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] +- Restore "for debugging" comment on sprintf() in gzlib.c +- Remove fdopen for MVS from gzguts.h +- Put new README-WIN32.txt in win32 [Rowe] +- Add check for shell to configure and invoke another shell if needed +- Fix big fat stinking bug in gzseek() on uncompressed files +- Remove vestigial F_OPEN64 define in zutil.h +- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE +- Avoid errors on non-LFS systems when applications define LFS macros +- Set EXE to ".exe" in configure for MINGW [Kahle] +- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] +- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] +- Add DLL install in win32/makefile.gcc [Bar-Lev] +- Allow Linux* or linux* from uname in configure [Bar-Lev] +- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] +- Add cross-compilation prefixes to configure [Bar-Lev] +- Match type exactly in gz_load() invocation in gzread.c +- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func +- Provide prototypes for *64 functions when building zlib without LFS +- Don't use -lc when linking shared library on MinGW +- Remove errno.h check in configure and vestigial errno code in zutil.h + +Changes in 1.2.4 (14 Mar 2010) +- Fix VER3 extraction in configure for no fourth subversion +- Update zlib.3, add docs to Makefile.in to make .pdf out of it +- Add zlib.3.pdf to distribution +- Don't set error code in gzerror() if passed pointer is NULL +- Apply destination directory fixes to CMakeLists.txt [Lowman] +- Move #cmakedefine's to a new zconf.in.cmakein +- Restore zconf.h for builds that don't use configure or cmake +- Add distclean to dummy Makefile for convenience +- Update and improve INDEX, README, and FAQ +- Update CMakeLists.txt for the return of zconf.h [Lowman] +- Update contrib/vstudio/vc9 and vc10 [Vollant] +- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc +- Apply license and readme changes to contrib/asm686 [Raiter] +- Check file name lengths and add -c option in minigzip.c [Li] +- Update contrib/amd64 and contrib/masmx86/ [Vollant] +- Avoid use of "eof" parameter in trees.c to not shadow library variable +- Update make_vms.com for removal of zlibdefs.h [Zinser] +- Update assembler code and vstudio projects in contrib [Vollant] +- Remove outdated assembler code contrib/masm686 and contrib/asm586 +- Remove old vc7 and vc8 from contrib/vstudio +- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe] +- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open() +- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant] +- Remove *64 functions from win32/zlib.def (they're not 64-bit yet) +- Fix bug in void-returning vsprintf() case in gzwrite.c +- Fix name change from inflate.h in contrib/inflate86/inffas86.c +- Check if temporary file exists before removing in make_vms.com [Zinser] +- Fix make install and uninstall for --static option +- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta] +- Update readme.txt in contrib/masmx64 and masmx86 to assemble + +Changes in 1.2.3.9 (21 Feb 2010) +- Expunge gzio.c +- Move as400 build information to old +- Fix updates in contrib/minizip and contrib/vstudio +- Add const to vsnprintf test in configure to avoid warnings [Weigelt] +- Delete zconf.h (made by configure) [Weigelt] +- Change zconf.in.h to zconf.h.in per convention [Weigelt] +- Check for NULL buf in gzgets() +- Return empty string for gzgets() with len == 1 (like fgets()) +- Fix description of gzgets() in zlib.h for end-of-file, NULL return +- Update minizip to 1.1 [Vollant] +- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c +- Note in zlib.h that gzerror() should be used to distinguish from EOF +- Remove use of snprintf() from gzlib.c +- Fix bug in gzseek() +- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant] +- Fix zconf.h generation in CMakeLists.txt [Lowman] +- Improve comments in zconf.h where modified by configure + +Changes in 1.2.3.8 (13 Feb 2010) +- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer] +- Use z_off64_t in gz_zero() and gz_skip() to match state->skip +- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t) +- Revert to Makefile.in from 1.2.3.6 (live with the clutter) +- Fix missing error return in gzflush(), add zlib.h note +- Add *64 functions to zlib.map [Levin] +- Fix signed/unsigned comparison in gz_comp() +- Use SFLAGS when testing shared linking in configure +- Add --64 option to ./configure to use -m64 with gcc +- Fix ./configure --help to correctly name options +- Have make fail if a test fails [Levin] +- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson] +- Remove assembler object files from contrib + +Changes in 1.2.3.7 (24 Jan 2010) +- Always gzopen() with O_LARGEFILE if available +- Fix gzdirect() to work immediately after gzopen() or gzdopen() +- Make gzdirect() more precise when the state changes while reading +- Improve zlib.h documentation in many places +- Catch memory allocation failure in gz_open() +- Complete close operation if seek forward in gzclose_w() fails +- Return Z_ERRNO from gzclose_r() if close() fails +- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL +- Return zero for gzwrite() errors to match zlib.h description +- Return -1 on gzputs() error to match zlib.h description +- Add zconf.in.h to allow recovery from configure modification [Weigelt] +- Fix static library permissions in Makefile.in [Weigelt] +- Avoid warnings in configure tests that hide functionality [Weigelt] +- Add *BSD and DragonFly to Linux case in configure [gentoo 123571] +- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212] +- Avoid access of uninitialized data for first inflateReset2 call [Gomes] +- Keep object files in subdirectories to reduce the clutter somewhat +- Remove default Makefile and zlibdefs.h, add dummy Makefile +- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_ +- Remove zlibdefs.h completely -- modify zconf.h instead + +Changes in 1.2.3.6 (17 Jan 2010) +- Avoid void * arithmetic in gzread.c and gzwrite.c +- Make compilers happier with const char * for gz_error message +- Avoid unused parameter warning in inflate.c +- Avoid signed-unsigned comparison warning in inflate.c +- Indent #pragma's for traditional C +- Fix usage of strwinerror() in glib.c, change to gz_strwinerror() +- Correct email address in configure for system options +- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser] +- Update zlib.map [Brown] +- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok] +- Apply various fixes to CMakeLists.txt [Lowman] +- Add checks on len in gzread() and gzwrite() +- Add error message for no more room for gzungetc() +- Remove zlib version check in gzwrite() +- Defer compression of gzprintf() result until need to +- Use snprintf() in gzdopen() if available +- Remove USE_MMAP configuration determination (only used by minigzip) +- Remove examples/pigz.c (available separately) +- Update examples/gun.c to 1.6 + +Changes in 1.2.3.5 (8 Jan 2010) +- Add space after #if in zutil.h for some compilers +- Fix relatively harmless bug in deflate_fast() [Exarevsky] +- Fix same problem in deflate_slow() +- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown] +- Add deflate_rle() for faster Z_RLE strategy run-length encoding +- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding +- Change name of "write" variable in inffast.c to avoid library collisions +- Fix premature EOF from gzread() in gzio.c [Brown] +- Use zlib header window size if windowBits is 0 in inflateInit2() +- Remove compressBound() call in deflate.c to avoid linking compress.o +- Replace use of errno in gz* with functions, support WinCE [Alves] +- Provide alternative to perror() in minigzip.c for WinCE [Alves] +- Don't use _vsnprintf on later versions of MSVC [Lowman] +- Add CMake build script and input file [Lowman] +- Update contrib/minizip to 1.1 [Svensson, Vollant] +- Moved nintendods directory from contrib to root +- Replace gzio.c with a new set of routines with the same functionality +- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above +- Update contrib/minizip to 1.1b +- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h + +Changes in 1.2.3.4 (21 Dec 2009) +- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility +- Update comments in configure and Makefile.in for default --shared +- Fix test -z's in configure [Marquess] +- Build examplesh and minigzipsh when not testing +- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h +- Import LDFLAGS from the environment in configure +- Fix configure to populate SFLAGS with discovered CFLAGS options +- Adapt make_vms.com to the new Makefile.in [Zinser] +- Add zlib2ansi script for C++ compilation [Marquess] +- Add _FILE_OFFSET_BITS=64 test to make test (when applicable) +- Add AMD64 assembler code for longest match to contrib [Teterin] +- Include options from $SFLAGS when doing $LDSHARED +- Simplify 64-bit file support by introducing z_off64_t type +- Make shared object files in objs directory to work around old Sun cc +- Use only three-part version number for Darwin shared compiles +- Add rc option to ar in Makefile.in for when ./configure not run +- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4* +- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile +- Protect against _FILE_OFFSET_BITS being defined when compiling zlib +- Rename Makefile.in targets allstatic to static and allshared to shared +- Fix static and shared Makefile.in targets to be independent +- Correct error return bug in gz_open() by setting state [Brown] +- Put spaces before ;;'s in configure for better sh compatibility +- Add pigz.c (parallel implementation of gzip) to examples/ +- Correct constant in crc32.c to UL [Leventhal] +- Reject negative lengths in crc32_combine() +- Add inflateReset2() function to work like inflateEnd()/inflateInit2() +- Include sys/types.h for _LARGEFILE64_SOURCE [Brown] +- Correct typo in doc/algorithm.txt [Janik] +- Fix bug in adler32_combine() [Zhu] +- Catch missing-end-of-block-code error in all inflates and in puff + Assures that random input to inflate eventually results in an error +- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/ +- Update ENOUGH and its usage to reflect discovered bounds +- Fix gzerror() error report on empty input file [Brown] +- Add ush casts in trees.c to avoid pedantic runtime errors +- Fix typo in zlib.h uncompress() description [Reiss] +- Correct inflate() comments with regard to automatic header detection +- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays) +- Put new version of gzlog (2.0) in examples with interruption recovery +- Add puff compile option to permit invalid distance-too-far streams +- Add puff TEST command options, ability to read piped input +- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but + _LARGEFILE64_SOURCE not defined +- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart +- Fix deflateSetDictionary() to use all 32K for output consistency +- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h) +- Clear bytes after deflate lookahead to avoid use of uninitialized data +- Change a limit in inftrees.c to be more transparent to Coverity Prevent +- Update win32/zlib.def with exported symbols from zlib.h +- Correct spelling errors in zlib.h [Willem, Sobrado] +- Allow Z_BLOCK for deflate() to force a new block +- Allow negative bits in inflatePrime() to delete existing bit buffer +- Add Z_TREES flush option to inflate() to return at end of trees +- Add inflateMark() to return current state information for random access +- Add Makefile for NintendoDS to contrib [Costa] +- Add -w in configure compile tests to avoid spurious warnings [Beucler] +- Fix typos in zlib.h comments for deflateSetDictionary() +- Fix EOF detection in transparent gzread() [Maier] + +Changes in 1.2.3.3 (2 October 2006) +- Make --shared the default for configure, add a --static option +- Add compile option to permit invalid distance-too-far streams +- Add inflateUndermine() function which is required to enable above +- Remove use of "this" variable name for C++ compatibility [Marquess] +- Add testing of shared library in make test, if shared library built +- Use ftello() and fseeko() if available instead of ftell() and fseek() +- Provide two versions of all functions that use the z_off_t type for + binary compatibility -- a normal version and a 64-bit offset version, + per the Large File Support Extension when _LARGEFILE64_SOURCE is + defined; use the 64-bit versions by default when _FILE_OFFSET_BITS + is defined to be 64 +- Add a --uname= option to configure to perhaps help with cross-compiling + +Changes in 1.2.3.2 (3 September 2006) +- Turn off silly Borland warnings [Hay] +- Use off64_t and define _LARGEFILE64_SOURCE when present +- Fix missing dependency on inffixed.h in Makefile.in +- Rig configure --shared to build both shared and static [Teredesai, Truta] +- Remove zconf.in.h and instead create a new zlibdefs.h file +- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant] +- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt] + +Changes in 1.2.3.1 (16 August 2006) +- Add watcom directory with OpenWatcom make files [Daniel] +- Remove #undef of FAR in zconf.in.h for MVS [Fedtke] +- Update make_vms.com [Zinser] +- Use -fPIC for shared build in configure [Teredesai, Nicholson] +- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] +- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bäck] +- Add some FAQ entries about the contrib directory +- Update the MVS question in the FAQ +- Avoid extraneous reads after EOF in gzio.c [Brown] +- Correct spelling of "successfully" in gzio.c [Randers-Pehrson] +- Add comments to zlib.h about gzerror() usage [Brown] +- Set extra flags in gzip header in gzopen() like deflate() does +- Make configure options more compatible with double-dash conventions + [Weigelt] +- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen] +- Fix uninstall target in Makefile.in [Truta] +- Add pkgconfig support [Weigelt] +- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt] +- Replace set_data_type() with a more accurate detect_data_type() in + trees.c, according to the txtvsbin.txt document [Truta] +- Swap the order of #include <stdio.h> and #include "zlib.h" in + gzio.c, example.c and minigzip.c [Truta] +- Shut up annoying VS2005 warnings about standard C deprecation [Rowe, + Truta] (where?) +- Fix target "clean" from win32/Makefile.bor [Truta] +- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe] +- Update zlib www home address in win32/DLL_FAQ.txt [Truta] +- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove] +- Enable browse info in the "Debug" and "ASM Debug" configurations in + the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta] +- Add pkgconfig support [Weigelt] +- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h, + for use in win32/zlib1.rc [Polushin, Rowe, Truta] +- Add a document that explains the new text detection scheme to + doc/txtvsbin.txt [Truta] +- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta] +- Move algorithm.txt into doc/ [Truta] +- Synchronize FAQ with website +- Fix compressBound(), was low for some pathological cases [Fearnley] +- Take into account wrapper variations in deflateBound() +- Set examples/zpipe.c input and output to binary mode for Windows +- Update examples/zlib_how.html with new zpipe.c (also web site) +- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems + that gcc became pickier in 4.0) +- Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain + un-versioned, the patch adds versioning only for symbols introduced in + zlib-1.2.0 or later. It also declares as local those symbols which are + not designed to be exported." [Levin] +- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure +- Do not initialize global static by default in trees.c, add a response + NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess] +- Don't use strerror() in gzio.c under WinCE [Yakimov] +- Don't use errno.h in zutil.h under WinCE [Yakimov] +- Move arguments for AR to its usage to allow replacing ar [Marot] +- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson] +- Improve inflateInit() and inflateInit2() documentation +- Fix structure size comment in inflate.h +- Change configure help option from --h* to --help [Santos] + Changes in 1.2.3 (18 July 2005) - Apply security vulnerability fixes to contrib/infback9 as well - Clean up some text files (carriage returns, trailing space) @@ -13,7 +776,7 @@ Changes in 1.2.2.4 (11 July 2005) compile - Fix some spelling errors in comments [Betts] - Correct inflateInit2() error return documentation in zlib.h -- Added zran.c example of compressed data random access to examples +- Add zran.c example of compressed data random access to examples directory, shows use of inflatePrime() - Fix cast for assignments to strm->state in inflate.c and infback.c - Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer] @@ -25,7 +788,7 @@ Changes in 1.2.2.4 (11 July 2005) - Be more strict on incomplete code sets in inflate_table() and increase ENOUGH and MAXD -- this repairs a possible security vulnerability for invalid inflate input. Thanks to Tavis Ormandy and Markus Oberhumer for - discovering the vulnerability and providing test cases. + discovering the vulnerability and providing test cases - Add ia64 support to configure for HP-UX [Smith] - Add error return to gzread() for format or i/o error [Levin] - Use malloc.h for OS/2 [Necasek] @@ -61,7 +824,7 @@ Changes in 1.2.2.2 (30 December 2004) - Add Z_FIXED strategy option to deflateInit2() to force fixed trees - Add updated make_vms.com [Coghlan], update README - Create a new "examples" directory, move gzappend.c there, add zpipe.c, - fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html. + fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html - Add FAQ entry and comments in deflate.c on uninitialized memory access - Add Solaris 9 make options in configure [Gilbert] - Allow strerror() usage in gzio.c for STDC @@ -132,7 +895,7 @@ Changes in 1.2.1.1 (9 January 2004) - Fix a big fat bug in inftrees.c that prevented decoding valid dynamic blocks with only literals and no distance codes -- Thanks to "Hot Emu" for the bug report and sample file -- Add a note to puff.c on no distance codes case. +- Add a note to puff.c on no distance codes case Changes in 1.2.1 (17 November 2003) - Remove a tab in contrib/gzappend/gzappend.c @@ -310,7 +1073,7 @@ Changes in 1.2.0.1 (17 March 2003) - Include additional header file on VMS for off_t typedef - Try to use _vsnprintf where it supplants vsprintf [Vollant] - Add some casts in inffast.c -- Enchance comments in zlib.h on what happens if gzprintf() tries to +- Enhance comments in zlib.h on what happens if gzprintf() tries to write more than 4095 bytes before compression - Remove unused state from inflateBackEnd() - Remove exit(0) from minigzip.c, example.c @@ -376,14 +1139,14 @@ Changes in 1.2.0 (9 March 2003) - Add contrib/puff/ simple inflate for deflate format description Changes in 1.1.4 (11 March 2002) -- ZFREE was repeated on same allocation on some error conditions. +- ZFREE was repeated on same allocation on some error conditions This creates a security problem described in http://www.zlib.org/advisory-2002-03-11.txt - Returned incorrect error (Z_MEM_ERROR) on some invalid data - Avoid accesses before window for invalid distances with inflate window - less than 32K. + less than 32K - force windowBits > 8 to avoid a bug in the encoder for a window size - of 256 bytes. (A complete fix will be available in 1.1.5). + of 256 bytes. (A complete fix will be available in 1.1.5) Changes in 1.1.3 (9 July 1998) - fix "an inflate input buffer bug that shows up on rare but persistent @@ -457,7 +1220,7 @@ Changes in 1.1.1 (27 Feb 98) - remove block truncation heuristic which had very marginal effect for zlib (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the compression ratio on some files. This also allows inlining _tr_tally for - matches in deflate_slow. + matches in deflate_slow - added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier) Changes in 1.1.0 (24 Feb 98) @@ -488,7 +1251,7 @@ Changes in 1.0.9 (17 Feb 1998) - Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8 - in inftrees.c, avoid cc -O bug on HP (Farshid Elahi) - in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with - the declaration of FAR (Gilles VOllant) + the declaration of FAR (Gilles Vollant) - install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann) - read_buf buf parameter of type Bytef* instead of charf* - zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout) @@ -502,7 +1265,7 @@ Changes in 1.0.8 (27 Jan 1998) - include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong) - use constant arrays for the static trees in trees.c instead of computing them at run time (thanks to Ken Raeburn for this suggestion). To create - trees.h, compile with GEN_TREES_H and run "make test". + trees.h, compile with GEN_TREES_H and run "make test" - check return code of example in "make test" and display result - pass minigzip command line options to file_compress - simplifying code of inflateSync to avoid gcc 2.8 bug @@ -541,12 +1304,12 @@ Changes in 1.0.6 (19 Jan 1998) - add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code) - Fix a deflate bug occurring only with compression level 0 (thanks to - Andy Buckler for finding this one). -- In minigzip, pass transparently also the first byte for .Z files. + Andy Buckler for finding this one) +- In minigzip, pass transparently also the first byte for .Z files - return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress() - check Z_FINISH in inflate (thanks to Marc Schluper) - Implement deflateCopy (thanks to Adam Costello) -- make static libraries by default in configure, add --shared option. +- make static libraries by default in configure, add --shared option - move MSDOS or Windows specific files to directory msdos - suppress the notion of partial flush to simplify the interface (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4) @@ -558,15 +1321,15 @@ Changes in 1.0.6 (19 Jan 1998) - added Makefile.nt (thanks to Stephen Williams) - added the unsupported "contrib" directory: contrib/asm386/ by Gilles Vollant <in...@wi...> - 386 asm code replacing longest_match(). + 386 asm code replacing longest_match() contrib/iostream/ by Kevin Ruland <ke...@ro...> A C++ I/O streams interface to the zlib gz* functions - contrib/iostream2/ by Tyge Løvset <Tyg...@cm...> + contrib/iostream2/ by Tyge Løvset <Tyg...@cm...> Another C++ I/O streams interface contrib/untgz/ by "Pedro A. Aranda Guti\irrez" <pa...@ti...> A very simple tar.gz file extractor using zlib contrib/visual-basic.txt by Carlos Rios <c_...@so...> - How to use compress(), uncompress() and the gz* functions from VB. + How to use compress(), uncompress() and the gz* functions from VB - pass params -f (filtered data), -h (huffman only), -1 to -9 (compression level) in minigzip (thanks to Tom Lane) @@ -575,8 +1338,8 @@ Changes in 1.0.6 (19 Jan 1998) - add undocumented function inflateSyncPoint() (hack for Paul Mackerras) - add undocumented function zError to convert error code to string (for Tim Smithers) -- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code. -- Use default memcpy for Symantec MSDOS compiler. +- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code +- Use default memcpy for Symantec MSDOS compiler - Add EXPORT keyword for check_func (needed for Windows DLL) - add current directory to LD_LIBRARY_PATH for "make test" - create also a link for libz.so.1 @@ -589,7 +1352,7 @@ Changes in 1.0.6 (19 Jan 1998) - allow compilation with ANSI keywords only enabled for TurboC in large model - avoid "versionString"[0] (Borland bug) - add NEED_DUMMY_RETURN for Borland -- use variable z_verbose for tracing in debug mode (L. Peter Deutsch). +- use variable z_verbose for tracing in debug mode (L. Peter Deutsch) - allow compilation with CC - defined STDC for OS/2 (David Charlap) - limit external names to 8 chars for MVS (Thomas Lund) @@ -599,7 +1362,7 @@ Changes in 1.0.6 (19 Jan 1998) - use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) - added makelcc.bat for lcc-win32 (Tom St Denis) - in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) -- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. +- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion - check for unistd.h in configure (for off_t) - remove useless check parameter in inflate_blocks_free - avoid useless assignment of s->check to itself in inflate_blocks_new @@ -620,7 +1383,7 @@ Changes in 1.0.5 (3 Jan 98) Changes in 1.0.4 (24 Jul 96) - In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF bit, so the decompressor could decompress all the correct data but went - on to attempt decompressing extra garbage data. This affected minigzip too. + on to attempt decompressing extra garbage data. This affected minigzip too - zlibVersion and gzerror return const char* (needed for DLL) - port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno) - use z_error only for DEBUG (avoid problem with DLLs) @@ -650,7 +1413,7 @@ Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] - fix array overlay in deflate.c which sometimes caused bad compressed data - fix inflate bug with empty stored block - fix MSDOS medium model which was broken in 0.99 -- fix deflateParams() which could generated bad compressed data. +- fix deflateParams() which could generate bad compressed data - Bytef is define'd instead of typedef'ed (work around Borland bug) - added an INDEX file - new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), @@ -671,7 +1434,7 @@ Changes in 0.99 (27 Jan 96) - allow preset dictionary shared between compressor and decompressor - allow compression level 0 (no compression) - add deflateParams in zlib.h: allow dynamic change of compression level - and compression strategy. + and compression strategy - test large buffers and deflateParams in example.c - add optional "configure" to build zlib as a shared library - suppress Makefile.qnx, use configure instead @@ -710,33 +1473,33 @@ Changes in 0.99 (27 Jan 96) - fix typo in Make_vms.com (f$trnlnm -> f$getsyi) - in fcalloc, normalize pointer if size > 65520 bytes - don't use special fcalloc for 32 bit Borland C++ -- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc... +- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc. - use Z_BINARY instead of BINARY - document that gzclose after gzdopen will close the file -- allow "a" as mode in gzopen. +- allow "a" as mode in gzopen - fix error checking in gzread - allow skipping .gz extra-field on pipes - added reference to Perl interface in README - put the crc table in FAR data (I dislike more and more the medium model :) - added get_crc_table -- added a dimension to all arrays (Borland C can't count). +- added a dimension to all arrays (Borland C can't count) - workaround Borland C bug in declaration of inflate_codes_new & inflate_fast - guard against multiple inclusion of *.h (for precompiled header on Mac) -- Watcom C pretends to be Microsoft C small model even in 32 bit mode. +- Watcom C pretends to be Microsoft C small model even in 32 bit mode - don't use unsized arrays to avoid silly warnings by Visual C++: warning C4746: 'inflate_mask' : unsized array treated as '__far' - (what's wrong with far data in far model?). + (what's wrong with far data in far model?) - define enum out of inflate_blocks_state to allow compilation with C++ Changes in 0.95 (16 Aug 95) - fix MSDOS small and medium model (now easier to adapt to any compiler) - inlined send_bits - fix the final (:-) bug for deflate with flush (output was correct but - not completely flushed in rare occasions). + not completely flushed in rare occasions) - default window size is same for compression and decompression - (it's now sufficient to set MAX_WBITS in zconf.h). + (it's now sufficient to set MAX_WBITS in zconf.h) - voidp -> voidpf and voidnp -> voidp (for consistency with other - typedefs and because voidnp was not near in large model). + typedefs and because voidnp was not near in large model) Changes in 0.94 (13 Aug 95) - support MSDOS medium model @@ -745,12 +1508,12 @@ Changes in 0.94 (13 Aug 95) - added support for VMS - allow a compression level in gzopen() - gzflush now calls fflush -- For deflate with flush, flush even if no more input is provided. +- For deflate with flush, flush even if no more input is provided - rename libgz.a as libz.a - avoid complex expression in infcodes.c triggering Turbo C bug - work around a problem with gcc on Alpha (in INSERT_STRING) - don't use inline functions (problem with some gcc versions) -- allow renaming of Byte, uInt, etc... with #define. +- allow renaming of Byte, uInt, etc... with #define - avoid warning about (unused) pointer before start of array in deflate.c - avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c - avoid reserved word 'new' in trees.c @@ -769,7 +1532,7 @@ Changes in 0.92 (3 May 95) - no memcpy on Pyramid - suppressed inftest.c - optimized fill_window, put longest_match inline for gcc -- optimized inflate on stored blocks. +- optimized inflate on stored blocks - untabify all sources to simplify patches Changes in 0.91 (2 May 95) @@ -787,7 +1550,7 @@ Changes in 0.9 (1 May 95) - let again gzread copy uncompressed data unchanged (was working in 0.71) - deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented - added a test of inflateSync in example.c -- moved MAX_WBITS to zconf.h because users might want to change that. +- moved MAX_WBITS to zconf.h because users might want to change that - document explicitly that zalloc(64K) on MSDOS must return a normalized pointer (zero offset) - added Makefiles for Microsoft C, Turbo C, Borland C++ @@ -796,7 +1559,7 @@ Changes in 0.9 (1 May 95) Changes in 0.8 (29 April 95) - added fast inflate (inffast.c) - deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this - is incompatible with previous versions of zlib which returned Z_OK. + is incompatible with previous versions of zlib which returned Z_OK - work around a TurboC compiler bug (bad code for b << 0, see infutil.h) (actually that was not a compiler bug, see 0.81 above) - gzread no longer reads one extra byte in certain cases @@ -806,50 +1569,50 @@ Changes in 0.8 (29 April 95) Changes in 0.71 (14 April 95) - Fixed more MSDOS compilation problems :( There is still a bug with - TurboC large model. + TurboC large model Changes in 0.7 (14 April 95) -- Added full inflate support. +- Added full inflate support - Simplified the crc32() interface. The pre- and post-conditioning (one's complement) is now done inside crc32(). WARNING: this is - incompatible with previous v... [truncated message content] |
From: malat <ma...@us...> - 2024-03-21 12:59:13
|
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, master has been updated via 7d4b775f518ad8beda615df32c7dd868e1548295 (commit) via 6f13bbfc074e4e048d23f21f302579213915be1d (commit) from b5b2b4b6014abfd650e9ff038c7755f78ff79d9c (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/7d4b775f518ad8beda615df32c7dd868e1548295/ commit 7d4b775f518ad8beda615df32c7dd868e1548295 Merge: b5b2b4b60 6f13bbfc0 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Mar 21 06:00:11 2024 -0700 Merge branch 'release' ----------------------------------------------------------------------- Summary of changes: Source/MediaStorageAndFileFormat/gdcmEquipmentManufacturer.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-03-21 12:58:54
|
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 6f13bbfc074e4e048d23f21f302579213915be1d (commit) from 9fe1ceed72a2ab38ba1b0b754e254550f475729f (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/6f13bbfc074e4e048d23f21f302579213915be1d/ commit 6f13bbfc074e4e048d23f21f302579213915be1d Author: Mathieu Malaterre <mat...@gm...> Date: Thu Mar 21 05:59:19 2024 -0700 Handle more MFSPLIT case from SIEMENS diff --git a/Source/MediaStorageAndFileFormat/gdcmEquipmentManufacturer.cxx b/Source/MediaStorageAndFileFormat/gdcmEquipmentManufacturer.cxx index c3bd50423..2ada1f9f1 100644 --- a/Source/MediaStorageAndFileFormat/gdcmEquipmentManufacturer.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmEquipmentManufacturer.cxx @@ -219,8 +219,11 @@ EquipmentManufacturer::Type EquipmentManufacturer::Compute(DataSet const& ds) { manu.SetFromDataSet(ds); manufacturer = manu.GetValue().Trim(); // TODO: contributing equipement ? - } else { + } + if( manufacturer.empty() ) + { // MFSPLIT export seems to remove the attribute completely: + // or in some case make it empty manufacturer = GetPrivateTagValueOrEmpty<VR::SH, VM::VM1>( ds, PrivateTag(0x0021, 0x0022, "SIEMENS MR SDS 01")); } ----------------------------------------------------------------------- Summary of changes: Source/MediaStorageAndFileFormat/gdcmEquipmentManufacturer.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-03-21 12:25:23
|
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, master has been updated via b5b2b4b6014abfd650e9ff038c7755f78ff79d9c (commit) via 9fe1ceed72a2ab38ba1b0b754e254550f475729f (commit) via dda17aa8d5939e4e255ebba67aacf34b09d88692 (commit) via 371c2d937e37b08a46eeb0628c553ce4608a45df (commit) via 21a793095ab3aecb794c56439873e5b181ea9d91 (commit) via 43b01630b87338c5a1dd83d3c0d0fa25b14df8cb (commit) via 93f8dca32b33784bacd656167919a4d8e20c3082 (commit) via 231e0754de4bb1397eb90437b36cd2ca3ea586a4 (commit) via 77e7193f00f2f533bff71b323e97bf3791301466 (commit) via 5658af7a194edde974e754aeaa0bee49a67c5cc7 (commit) via 6ccc2eb5c1f790887967dfed2f1f31db1c0c69c1 (commit) via 625721afe7c1cda5cb5501f65043cf07099a46d5 (commit) from 424e5f22db27ba2c7b8e8dde2020635e48b56e8d (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/b5b2b4b6014abfd650e9ff038c7755f78ff79d9c/ commit b5b2b4b6014abfd650e9ff038c7755f78ff79d9c Merge: 424e5f22d 9fe1ceed7 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Mar 21 05:26:17 2024 -0700 Merge branch 'release' ----------------------------------------------------------------------- Summary of changes: .../gdcmElement.h | 4 +- .../gdcmDirectionCosines.cxx | 13 ++- .../gdcmDirectionCosines.h | 3 + .../gdcmImageChangeTransferSyntax.cxx | 1 + .../MediaStorageAndFileFormat/gdcmImageCodec.cxx | 11 +- .../MediaStorageAndFileFormat/gdcmImageHelper.cxx | 2 + .../gdcmJPEG2000Codec.cxx | 9 +- .../MediaStorageAndFileFormat/gdcmLookupTable.cxx | 5 +- .../MediaStorageAndFileFormat/gdcmPixmapReader.cxx | 8 +- Source/MediaStorageAndFileFormat/gdcmRAWCodec.cxx | 11 +- .../gdcmSplitMosaicFilter.cxx | 119 +++++++++++++++++---- .../gdcmSplitMosaicFilter.h | 9 ++ 12 files changed, 157 insertions(+), 38 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-03-21 12:25:06
|
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 9fe1ceed72a2ab38ba1b0b754e254550f475729f (commit) from dda17aa8d5939e4e255ebba67aacf34b09d88692 (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/9fe1ceed72a2ab38ba1b0b754e254550f475729f/ commit 9fe1ceed72a2ab38ba1b0b754e254550f475729f Author: Andras Lasso <la...@qu...> Date: Mon Mar 18 23:03:51 2024 -0400 BUG: Fix GDCM crash when reading DICOM image GDCM crashed when a DICOM image that had 32 bits allocated. The problem was that DoOverlayCleanup returned failure but that return value was ignored and later an empty buffer read was attempted. This fix avoids the crash by not ignoring the failed overlay cleanup. Applications can detect the error and switch to DCMTK IO to read such files (DCMTK can correctly read files with 32 bits allocated). diff --git a/Source/MediaStorageAndFileFormat/gdcmImageCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmImageCodec.cxx index c2030c0a8..2c25a90f9 100644 --- a/Source/MediaStorageAndFileFormat/gdcmImageCodec.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmImageCodec.cxx @@ -675,6 +675,7 @@ bool ImageCodec::DecodeByStreams(std::istream &is, std::ostream &os) // Do the overlay cleanup (cleanup the unused bits) // must be the last operation (duh!) + bool copySuccess = false; if ( PF.GetBitsAllocated() != PF.GetBitsStored() && PF.GetBitsAllocated() != 8 ) { @@ -685,21 +686,23 @@ bool ImageCodec::DecodeByStreams(std::istream &is, std::ostream &os) // Sigh, I finally found someone not declaring that unused bits where not zero: // gdcmConformanceTests/dcm4chee_unusedbits_not_zero.dcm if( NeedOverlayCleanup ) - DoOverlayCleanup(*cur_is,os); + { + copySuccess = DoOverlayCleanup(*cur_is, os); + } else { // Once the issue with IMAGES/JPLY/RG3_JPLY aka gdcmData/D_CLUNIE_RG3_JPLY.dcm is solved the previous // code will be replace with a simple call to: - DoSimpleCopy(*cur_is,os); + copySuccess = DoSimpleCopy(*cur_is, os); } } else { assert( PF.GetBitsAllocated() == PF.GetBitsStored() ); - DoSimpleCopy(*cur_is,os); + copySuccess = DoSimpleCopy(*cur_is, os); } - return true; + return copySuccess; } bool ImageCodec::IsValid(PhotometricInterpretation const &) ----------------------------------------------------------------------- Summary of changes: Source/MediaStorageAndFileFormat/gdcmImageCodec.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-02-21 12:58:58
|
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 dda17aa8d5939e4e255ebba67aacf34b09d88692 (commit) via 371c2d937e37b08a46eeb0628c553ce4608a45df (commit) via 21a793095ab3aecb794c56439873e5b181ea9d91 (commit) from 43b01630b87338c5a1dd83d3c0d0fa25b14df8cb (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/dda17aa8d5939e4e255ebba67aacf34b09d88692/ commit dda17aa8d5939e4e255ebba67aacf34b09d88692 Author: Mathieu Malaterre <mat...@gm...> Date: Wed Feb 21 02:44:55 2024 -0800 Remove symptoms from TALOS-2024-1944 diff --git a/Source/MediaStorageAndFileFormat/gdcmRAWCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmRAWCodec.cxx index 19f739399..46392461e 100644 --- a/Source/MediaStorageAndFileFormat/gdcmRAWCodec.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmRAWCodec.cxx @@ -112,9 +112,7 @@ bool RAWCodec::DecodeBytes(const char* inBytes, size_t inBufferLength, if(!r) return false; std::string str = os.str(); - //std::string::size_type check = str.size();//unused - if( this->GetPixelFormat() == PixelFormat::UINT12 || this->GetPixelFormat() == PixelFormat::INT12 ) { @@ -135,7 +133,14 @@ bool RAWCodec::DecodeBytes(const char* inBytes, size_t inBufferLength, // DermaColorLossLess.dcm //assert (check == inOutBufferLength || check == inOutBufferLength + 1); // problem with: SIEMENS_GBS_III-16-ACR_NEMA_1.acr - memcpy(outBytes, str.c_str(), inOutBufferLength); + size_t len = str.size(); + if( inOutBufferLength <= len ) + memcpy(outBytes, str.c_str(), inOutBufferLength); + else + { + gdcmWarningMacro( "Requesting too much data. Truncating result" ); + memcpy(outBytes, str.c_str(), len); + } } return r; https://sourceforge.net/p/gdcm/gdcm/ci/371c2d937e37b08a46eeb0628c553ce4608a45df/ commit 371c2d937e37b08a46eeb0628c553ce4608a45df Author: Mathieu Malaterre <mat...@gm...> Date: Wed Feb 21 02:18:35 2024 -0800 Remove symptoms from TALOS-2024-1935 diff --git a/Source/MediaStorageAndFileFormat/gdcmImageChangeTransferSyntax.cxx b/Source/MediaStorageAndFileFormat/gdcmImageChangeTransferSyntax.cxx index fcb61e611..9457c5e9b 100644 --- a/Source/MediaStorageAndFileFormat/gdcmImageChangeTransferSyntax.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmImageChangeTransferSyntax.cxx @@ -421,6 +421,7 @@ bool ImageChangeTransferSyntax::Change() if( !b ) { gdcmErrorMacro( "Error in getting buffer from input image." ); + delete bv0; return false; } pixeldata.SetValue( *bv0 ); diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx index 10ac23cca..430a24a87 100644 --- a/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx @@ -826,8 +826,13 @@ std::pair<char *, size_t> JPEG2000Codec::DecodeByStreamsCommon(char *dummy_buffe // ELSCINT1_JP2vsJ2K.dcm // -> prec = 12, bpp = 0, sgnd = 0 - //assert( wr == Dimensions[0] ); - //assert( hr == Dimensions[1] ); + if( wr != Dimensions[0] || hr != Dimensions[1] ) { + gdcmErrorMacro("Invalid dimension"); + delete[] raw; + opj_destroy_codec(dinfo); + opj_image_destroy(image); + return std::pair<char*,size_t>(nullptr,0); + } if( comp->sgnd != PF.GetPixelRepresentation() ) { PF.SetPixelRepresentation( (uint16_t)comp->sgnd ); https://sourceforge.net/p/gdcm/gdcm/ci/21a793095ab3aecb794c56439873e5b181ea9d91/ commit 21a793095ab3aecb794c56439873e5b181ea9d91 Author: Mathieu Malaterre <mat...@gm...> Date: Wed Feb 21 02:00:38 2024 -0800 Remove symptoms of TALOS-2024-1924 diff --git a/Source/DataStructureAndEncodingDefinition/gdcmElement.h b/Source/DataStructureAndEncodingDefinition/gdcmElement.h index b49b093dc..15fb3a117 100644 --- a/Source/DataStructureAndEncodingDefinition/gdcmElement.h +++ b/Source/DataStructureAndEncodingDefinition/gdcmElement.h @@ -473,7 +473,7 @@ public: assert( _is ); // Is stream valid ? _is.read( reinterpret_cast<char*>(data+0), type_size); for(unsigned long i=1; i<length; ++i) { - assert( _is ); + if( _is ) _is.read( reinterpret_cast<char*>(data+i), type_size ); } //ByteSwap<T>::SwapRangeFromSwapCodeIntoSystem(data, @@ -489,7 +489,7 @@ public: assert( _is ); // Is stream valid ? _is.read( reinterpret_cast<char*>(data+0), type_size); for(unsigned long i=1; i<length; ++i) { - assert( _is ); + if( _is ) _is.read( reinterpret_cast<char*>(data+i), type_size ); } //ByteSwap<T>::SwapRangeFromSwapCodeIntoSystem(data, diff --git a/Source/MediaStorageAndFileFormat/gdcmLookupTable.cxx b/Source/MediaStorageAndFileFormat/gdcmLookupTable.cxx index 0d5a99c40..2c566923b 100644 --- a/Source/MediaStorageAndFileFormat/gdcmLookupTable.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmLookupTable.cxx @@ -130,7 +130,10 @@ void LookupTable::SetLUT(LookupTableType type, const unsigned char *array, if( !IncompleteLUT ) { - assert( Internal->RGB.size() == 3*Internal->Length[type]*(BitSample/8) ); + if( Internal->RGB.size() != 3*Internal->Length[type]*(BitSample/8) ) { + gdcmErrorMacro( "Invalid length for LUT data" ); + return; + } } // Too funny: 05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm // There is pseudo PALETTE_COLOR LUT in the Icon, if one look carefully the LUT values diff --git a/Source/MediaStorageAndFileFormat/gdcmPixmapReader.cxx b/Source/MediaStorageAndFileFormat/gdcmPixmapReader.cxx index 9c30ff8b9..258a23c1f 100644 --- a/Source/MediaStorageAndFileFormat/gdcmPixmapReader.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmPixmapReader.cxx @@ -306,8 +306,12 @@ static void DoIconImage(const DataSet& rootds, Pixmap& image) unsigned long check = (el_us3.GetValue(0) ? el_us3.GetValue(0) : 65536) * el_us3.GetValue(2) / 8; - assert( check == lut_raw->GetLength() || 2 * check == lut_raw->GetLength() - || check + 1 == lut_raw->GetLength() ); (void)check; + if(!( check == lut_raw->GetLength() || 2 * check == lut_raw->GetLength() + || check + 1 == lut_raw->GetLength() )) { + gdcmErrorMacro( "Icon Sequence is invalid. Giving up" ); + pixeldata.Clear(); + return; + } } else if( ds.FindDataElement( seglut ) ) { ----------------------------------------------------------------------- Summary of changes: Source/DataStructureAndEncodingDefinition/gdcmElement.h | 4 ++-- .../gdcmImageChangeTransferSyntax.cxx | 1 + Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx | 9 +++++++-- Source/MediaStorageAndFileFormat/gdcmLookupTable.cxx | 5 ++++- Source/MediaStorageAndFileFormat/gdcmPixmapReader.cxx | 8 ++++++-- Source/MediaStorageAndFileFormat/gdcmRAWCodec.cxx | 11 ++++++++--- 6 files changed, 28 insertions(+), 10 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-02-09 08:34:37
|
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 43b01630b87338c5a1dd83d3c0d0fa25b14df8cb (commit) from 93f8dca32b33784bacd656167919a4d8e20c3082 (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/43b01630b87338c5a1dd83d3c0d0fa25b14df8cb/ commit 43b01630b87338c5a1dd83d3c0d0fa25b14df8cb Author: Mathieu Malaterre <mat...@gm...> Date: Fri Feb 9 00:34:50 2024 -0800 Add support for single SliceArray diff --git a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx index 4aef69b4d..6f368e0c5 100644 --- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx @@ -313,21 +313,41 @@ bool SplitMosaicFilter::ComputeMOSAICImagePositionPatient( double ret[3], if( b ) { size_t size = sa.Slices.size(); if( size ) { - if( size != mosaic_dims[2] ) { + // two cases: + if( size == mosaic_dims[2] ) { + // all mosaic have there own slice position, simply need to pick the right one + // Handle inverted case: + size_t index = inverted ? size - 1 : 0; + MrProtocol::Slice & slice = sa.Slices[index]; + MrProtocol::Vector3 & p = slice.Position; + double pos[3]; + pos[0] = p.dSag; + pos[1] = p.dCor; + pos[2] = p.dTra; + for(int i = 0; i < 3; ++i ) { + ipp_csa[i] = pos[i] - mosaic_dims[0] / 2. * pixelspacing[0] * x[i] - mosaic_dims[1] / 2. * pixelspacing[1] * y[i]; + } + hasIppCsa = true; + } else if( size == 1 /*&& mosaic_dims[2] % 2 == 0*/) { + // there is a single SliceArray but multiple mosaics, assume this is exactly the center one + double z[3]={}; + dc.Cross(z); + DirectionCosines::Normalize(z); + size_t index = 0; + MrProtocol::Slice & slice = sa.Slices[index]; + MrProtocol::Vector3 & p = slice.Position; + double pos[3]; + pos[0] = p.dSag; + pos[1] = p.dCor; + pos[2] = p.dTra; + for(int i = 0; i < 3; ++i ) { + ipp_csa[i] = pos[i] - mosaic_dims[0] / 2. * pixelspacing[0] * x[i] - mosaic_dims[1] / 2. * pixelspacing[1] * y[i] + - (mosaic_dims[2] - 1) / 2. * pixelspacing[2] * z[i]; + } + hasIppCsa = true; + } else { gdcmWarningMacro( "Inconsistent SliceArray: " << size << " vs expected: " << mosaic_dims[2] ); } - // Handle inverted case: - size_t index = inverted ? size - 1 : 0; - MrProtocol::Slice & slice = sa.Slices[index]; - MrProtocol::Vector3 & p = slice.Position; - double pos[3]; - pos[0] = p.dSag; - pos[1] = p.dCor; - pos[2] = p.dTra; - for(int i = 0; i < 3; ++i ) { - ipp_csa[i] = pos[i] - mosaic_dims[0] / 2. * pixelspacing[0] * x[i] - mosaic_dims[1] / 2. * pixelspacing[1] * y[i]; - } - hasIppCsa = true; } } } ----------------------------------------------------------------------- Summary of changes: .../gdcmSplitMosaicFilter.cxx | 46 ++++++++++++++++------ 1 file changed, 33 insertions(+), 13 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-02-09 07:50:41
|
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 93f8dca32b33784bacd656167919a4d8e20c3082 (commit) from 231e0754de4bb1397eb90437b36cd2ca3ea586a4 (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/93f8dca32b33784bacd656167919a4d8e20c3082/ commit 93f8dca32b33784bacd656167919a4d8e20c3082 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Feb 8 23:50:45 2024 -0800 Reduce error to warning level diff --git a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx index a38a69532..4aef69b4d 100644 --- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx @@ -313,6 +313,9 @@ bool SplitMosaicFilter::ComputeMOSAICImagePositionPatient( double ret[3], if( b ) { size_t size = sa.Slices.size(); if( size ) { + if( size != mosaic_dims[2] ) { + gdcmWarningMacro( "Inconsistent SliceArray: " << size << " vs expected: " << mosaic_dims[2] ); + } // Handle inverted case: size_t index = inverted ? size - 1 : 0; MrProtocol::Slice & slice = sa.Slices[index]; @@ -344,8 +347,7 @@ bool SplitMosaicFilter::ComputeMOSAICImagePositionPatient( double ret[3], } double n = DirectionCosines::Norm(diff); if( n > 1e-4 ) { - gdcmErrorMacro( "Inconsistent values for IPP/CSA" ); - return false; + gdcmWarningMacro( "Inconsistent values for IPP/CSA: (" << ipp_dcm[0] << "," << ipp_dcm[1] << "," << ipp_dcm[2] << ") vs (" << ipp_csa[0] << "," << ipp_csa[1] << "," << ipp_csa[2] << ")" ); } } // no error set origin: ----------------------------------------------------------------------- Summary of changes: Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-02-08 15:32:07
|
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 231e0754de4bb1397eb90437b36cd2ca3ea586a4 (commit) from 77e7193f00f2f533bff71b323e97bf3791301466 (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/231e0754de4bb1397eb90437b36cd2ca3ea586a4/ commit 231e0754de4bb1397eb90437b36cd2ca3ea586a4 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Feb 8 07:32:15 2024 -0800 Handle the famous inverted case diff --git a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx index a740f9b86..a38a69532 100644 --- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx @@ -288,11 +288,11 @@ bool SplitMosaicFilter::ComputeMOSAICSliceNormal( double slicenormalvector[3], b } bool SplitMosaicFilter::ComputeMOSAICImagePositionPatient( double ret[3], - const double ipp[6], - const double dircos[6], - const double pixelspacing[3], - const unsigned int image_dims[3] , - const unsigned int mosaic_dims[3] ) + const double ipp[6], + const double dircos[6], + const double pixelspacing[3], + const unsigned int image_dims[3] , + const unsigned int mosaic_dims[3] , bool inverted) { CSAHeader csa; DataSet& ds = GetFile().GetDataSet(); @@ -313,11 +313,11 @@ bool SplitMosaicFilter::ComputeMOSAICImagePositionPatient( double ret[3], if( b ) { size_t size = sa.Slices.size(); if( size ) { - size_t index = 0; + // Handle inverted case: + size_t index = inverted ? size - 1 : 0; MrProtocol::Slice & slice = sa.Slices[index]; MrProtocol::Vector3 & p = slice.Position; double pos[3]; - // FIXME should I care about inverted case ? pos[0] = p.dSag; pos[1] = p.dCor; pos[2] = p.dTra; @@ -343,8 +343,8 @@ bool SplitMosaicFilter::ComputeMOSAICImagePositionPatient( double ret[3], diff[i] = ipp_dcm[i] - ipp_csa[i]; } double n = DirectionCosines::Norm(diff); - if( n > 1e-6 ) { - gdcmErrorMacro( "Inconcistent values for IPP/CSA" ); + if( n > 1e-4 ) { + gdcmErrorMacro( "Inconsistent values for IPP/CSA" ); return false; } } @@ -410,7 +410,7 @@ bool SplitMosaicFilter::Split() hasOriginCSA = false; } #else - if(!ComputeMOSAICImagePositionPatient( origin, inputimage.GetOrigin(), inputimage.GetDirectionCosines(), inputimage.GetSpacing(), inputimage.GetDimensions(), dims )) + if(!ComputeMOSAICImagePositionPatient( origin, inputimage.GetOrigin(), inputimage.GetDirectionCosines(), inputimage.GetSpacing(), inputimage.GetDimensions(), dims, inverted )) { gdcmWarningMacro( "Origin will not be accurate" ); hasOriginCSA = false; diff --git a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h index a7656c841..06f281a3d 100644 --- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h +++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h @@ -66,7 +66,7 @@ public: const double dircos[6], const double pixelspacing[3], const unsigned int image_dims[3] , - const unsigned int mosaic_dims[3] ); + const unsigned int mosaic_dims[3], bool inverted ); void SetImage(const Image& image); const Image &GetImage() const { return *I; } ----------------------------------------------------------------------- Summary of changes: .../gdcmSplitMosaicFilter.cxx | 20 ++++++++++---------- .../gdcmSplitMosaicFilter.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-02-08 14:41:23
|
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 77e7193f00f2f533bff71b323e97bf3791301466 (commit) from 5658af7a194edde974e754aeaa0bee49a67c5cc7 (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/77e7193f00f2f533bff71b323e97bf3791301466/ commit 77e7193f00f2f533bff71b323e97bf3791301466 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Feb 8 06:41:31 2024 -0800 Refactor the API to not require GetImage() diff --git a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx index 8da71bbff..a740f9b86 100644 --- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx @@ -287,13 +287,15 @@ bool SplitMosaicFilter::ComputeMOSAICSliceNormal( double slicenormalvector[3], b return snvfound; } -bool SplitMosaicFilter::ComputeMOSAICImagePositionPatient( double ret[3], const unsigned int mosaic_dims[3] ) +bool SplitMosaicFilter::ComputeMOSAICImagePositionPatient( double ret[3], + const double ipp[6], + const double dircos[6], + const double pixelspacing[3], + const unsigned int image_dims[3] , + const unsigned int mosaic_dims[3] ) { CSAHeader csa; DataSet& ds = GetFile().GetDataSet(); - const Image &inputimage = GetImage(); - const double *dircos = inputimage.GetDirectionCosines(); - const double *pixelspacing = inputimage.GetSpacing(); DirectionCosines dc( dircos ); dc.Normalize(); const double *dircos_normalized = dc; @@ -330,8 +332,6 @@ bool SplitMosaicFilter::ComputeMOSAICImagePositionPatient( double ret[3], const // https://nipy.org/nibabel/dicom/dicom_mosaic.html#dicom-mosaic double ipp_dcm[3] = {}; { - const unsigned int * image_dims = inputimage.GetDimensions(); - const double *ipp = inputimage.GetOrigin(); for(int i = 0; i < 3; ++i ) { ipp_dcm[i] = ipp[i] + (image_dims[0] - mosaic_dims[0]) / 2. * pixelspacing[0] * x[i] + (image_dims[1] - mosaic_dims[1]) / 2. * pixelspacing[1] * y[i] ; @@ -402,6 +402,7 @@ bool SplitMosaicFilter::Split() } (void)hasNormalCSA; double origin[3]; + const Image &inputimage = GetImage(); #if 0 if( !ComputeMOSAICSlicePosition( origin, inverted ) ) { @@ -409,14 +410,13 @@ bool SplitMosaicFilter::Split() hasOriginCSA = false; } #else - if(!ComputeMOSAICImagePositionPatient( origin, dims )) + if(!ComputeMOSAICImagePositionPatient( origin, inputimage.GetOrigin(), inputimage.GetDirectionCosines(), inputimage.GetSpacing(), inputimage.GetDimensions(), dims )) { gdcmWarningMacro( "Origin will not be accurate" ); hasOriginCSA = false; } #endif - const Image &inputimage = GetImage(); if( inputimage.GetPixelFormat() != PixelFormat::UINT16 ) { gdcmErrorMacro( "Expecting UINT16 PixelFormat" ); diff --git a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h index 4ab218b34..a7656c841 100644 --- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h +++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h @@ -61,7 +61,12 @@ public: bool ComputeMOSAICSlicePosition( double pos[3], bool inverted ); /// Extract the value for ImagePositionPatient - bool ComputeMOSAICImagePositionPatient( double pos[3], const unsigned int mosaic_dims[3] ); + bool ComputeMOSAICImagePositionPatient( double pos[3], + const double ipp[6], + const double dircos[6], + const double pixelspacing[3], + const unsigned int image_dims[3] , + const unsigned int mosaic_dims[3] ); void SetImage(const Image& image); const Image &GetImage() const { return *I; } ----------------------------------------------------------------------- Summary of changes: .../MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx | 16 ++++++++-------- Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h | 7 ++++++- 2 files changed, 14 insertions(+), 9 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-02-08 13:18:21
|
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 5658af7a194edde974e754aeaa0bee49a67c5cc7 (commit) from 6ccc2eb5c1f790887967dfed2f1f31db1c0c69c1 (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/5658af7a194edde974e754aeaa0bee49a67c5cc7/ commit 5658af7a194edde974e754aeaa0bee49a67c5cc7 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Feb 8 05:18:21 2024 -0800 Fix logic in SIEMENS/MOSAIC IPP computation diff --git a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx index 1b1e6e6c9..8da71bbff 100644 --- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx @@ -287,6 +287,74 @@ bool SplitMosaicFilter::ComputeMOSAICSliceNormal( double slicenormalvector[3], b return snvfound; } +bool SplitMosaicFilter::ComputeMOSAICImagePositionPatient( double ret[3], const unsigned int mosaic_dims[3] ) +{ + CSAHeader csa; + DataSet& ds = GetFile().GetDataSet(); + const Image &inputimage = GetImage(); + const double *dircos = inputimage.GetDirectionCosines(); + const double *pixelspacing = inputimage.GetSpacing(); + DirectionCosines dc( dircos ); + dc.Normalize(); + const double *dircos_normalized = dc; + const double *x = dircos_normalized; + const double *y = dircos_normalized + 3; + + double ipp_csa[3] = {}; + bool hasIppCsa = false; + MrProtocol mrprot; + // https://www.nmr.mgh.harvard.edu/~greve/dicom-unpack + if( csa.GetMrProtocol(ds, mrprot) ) + { + MrProtocol::SliceArray sa; + bool b = mrprot.GetSliceArray(sa); + if( b ) { + size_t size = sa.Slices.size(); + if( size ) { + size_t index = 0; + MrProtocol::Slice & slice = sa.Slices[index]; + MrProtocol::Vector3 & p = slice.Position; + double pos[3]; + // FIXME should I care about inverted case ? + pos[0] = p.dSag; + pos[1] = p.dCor; + pos[2] = p.dTra; + for(int i = 0; i < 3; ++i ) { + ipp_csa[i] = pos[i] - mosaic_dims[0] / 2. * pixelspacing[0] * x[i] - mosaic_dims[1] / 2. * pixelspacing[1] * y[i]; + } + hasIppCsa = true; + } + } + } + + // https://nipy.org/nibabel/dicom/dicom_mosaic.html#dicom-mosaic + double ipp_dcm[3] = {}; + { + const unsigned int * image_dims = inputimage.GetDimensions(); + const double *ipp = inputimage.GetOrigin(); + for(int i = 0; i < 3; ++i ) { + ipp_dcm[i] = ipp[i] + (image_dims[0] - mosaic_dims[0]) / 2. * pixelspacing[0] * x[i] + + (image_dims[1] - mosaic_dims[1]) / 2. * pixelspacing[1] * y[i] ; + } + } + if(hasIppCsa ) { + double diff[3]; + for(int i = 0; i < 3; ++i ) { + diff[i] = ipp_dcm[i] - ipp_csa[i]; + } + double n = DirectionCosines::Norm(diff); + if( n > 1e-6 ) { + gdcmErrorMacro( "Inconcistent values for IPP/CSA" ); + return false; + } + } + // no error set origin: + for(int i = 0; i < 3; ++i ) + ret[i] = ipp_dcm[i]; + + return true; +} + bool SplitMosaicFilter::ComputeMOSAICSlicePosition( double pos[3], bool ) { CSAHeader csa; @@ -301,25 +369,6 @@ bool SplitMosaicFilter::ComputeMOSAICSlicePosition( double pos[3], bool ) size_t size = sa.Slices.size(); if( !size ) return false; -#if 0 - { - double z[3]; - for( int i = 0; i < size; ++i ) - { - MrProtocol::Slice & slice = sa.Slices[i]; - MrProtocol::Vector3 & p = slice.Position; - z[0] = p.dSag; - z[1] = p.dCor; - z[2] = p.dTra; - const double snv_dot = DirectionCosines::Dot( slicenormalvector, z ); - if( (1. - snv_dot) < 1e-6 ) - { - gdcmErrorMacro("Invalid direction found"); - return false; - } - } - } -#endif size_t index = 0; MrProtocol::Slice & slice = sa.Slices[index]; @@ -353,11 +402,19 @@ bool SplitMosaicFilter::Split() } (void)hasNormalCSA; double origin[3]; +#if 0 if( !ComputeMOSAICSlicePosition( origin, inverted ) ) { gdcmWarningMacro( "Origin will not be accurate" ); hasOriginCSA = false; } +#else + if(!ComputeMOSAICImagePositionPatient( origin, dims )) + { + gdcmWarningMacro( "Origin will not be accurate" ); + hasOriginCSA = false; + } +#endif const Image &inputimage = GetImage(); if( inputimage.GetPixelFormat() != PixelFormat::UINT16 ) diff --git a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h index 7f30b0a25..4ab218b34 100644 --- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h +++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h @@ -57,8 +57,12 @@ public: bool ComputeMOSAICSliceNormal( double dims[3], bool & inverted ); /// Extract the value for ImagePositionPatient (requires inverted flag) + /// Deprecated bool ComputeMOSAICSlicePosition( double pos[3], bool inverted ); + /// Extract the value for ImagePositionPatient + bool ComputeMOSAICImagePositionPatient( double pos[3], const unsigned int mosaic_dims[3] ); + void SetImage(const Image& image); const Image &GetImage() const { return *I; } Image &GetImage() { return *I; } ----------------------------------------------------------------------- Summary of changes: .../gdcmSplitMosaicFilter.cxx | 95 +++++++++++++++++----- .../gdcmSplitMosaicFilter.h | 4 + 2 files changed, 80 insertions(+), 19 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-01-18 14:24:00
|
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 6ccc2eb5c1f790887967dfed2f1f31db1c0c69c1 (commit) from 625721afe7c1cda5cb5501f65043cf07099a46d5 (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/6ccc2eb5c1f790887967dfed2f1f31db1c0c69c1/ commit 6ccc2eb5c1f790887967dfed2f1f31db1c0c69c1 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Jan 18 06:23:28 2024 -0800 Expose Norm API diff --git a/Source/MediaStorageAndFileFormat/gdcmDirectionCosines.cxx b/Source/MediaStorageAndFileFormat/gdcmDirectionCosines.cxx index 275d74855..119a7b4a8 100644 --- a/Source/MediaStorageAndFileFormat/gdcmDirectionCosines.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmDirectionCosines.cxx @@ -98,15 +98,20 @@ double DirectionCosines::Dot() const } // static function is within gdcm:: namespace, so should not pollute too much on UNIX -static inline double Norm(const double x[3]) +static inline double NormImpl(const double x[3]) { return sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]); } +double DirectionCosines::Norm(const double v[3]) +{ + return NormImpl(v); +} + void DirectionCosines::Normalize(double v[3]) { double den; - if ( (den = Norm(v)) != 0.0 ) + if ( (den = NormImpl(v)) != 0.0 ) { for (int i=0; i < 3; i++) { @@ -119,7 +124,7 @@ void DirectionCosines::Normalize() { double *x = Values; double den; - if ( (den = Norm(x)) != 0.0 ) + if ( (den = NormImpl(x)) != 0.0 ) { for (int i=0; i < 3; i++) { @@ -127,7 +132,7 @@ void DirectionCosines::Normalize() } } x = Values+3; - if ( (den = Norm(x)) != 0.0 ) + if ( (den = NormImpl(x)) != 0.0 ) { for (int i=0; i < 3; i++) { diff --git a/Source/MediaStorageAndFileFormat/gdcmDirectionCosines.h b/Source/MediaStorageAndFileFormat/gdcmDirectionCosines.h index 73717fdc0..1313146cf 100644 --- a/Source/MediaStorageAndFileFormat/gdcmDirectionCosines.h +++ b/Source/MediaStorageAndFileFormat/gdcmDirectionCosines.h @@ -49,6 +49,9 @@ public: /// Normalize in-place static void Normalize(double v[3]); + /// Return norm of the vector + static double Norm(const double v[3]); + /// Make the class behave like a const double * operator const double* () const { return Values; } ----------------------------------------------------------------------- Summary of changes: Source/MediaStorageAndFileFormat/gdcmDirectionCosines.cxx | 13 +++++++++---- Source/MediaStorageAndFileFormat/gdcmDirectionCosines.h | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-01-18 09:50:11
|
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 625721afe7c1cda5cb5501f65043cf07099a46d5 (commit) from b4ece2ddf57cad3f8ed4c1d424503ac477ac3f7e (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/625721afe7c1cda5cb5501f65043cf07099a46d5/ commit 625721afe7c1cda5cb5501f65043cf07099a46d5 Author: Mathieu Malaterre <mat...@gm...> Date: Thu Jan 18 01:49:21 2024 -0800 Make sure to re-normalize normal for proper computation For dataset with numerous slices, tiny approx in the slice length would impact the result in non acceptable ways diff --git a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx index e32e46b0e..3dd08ed97 100644 --- a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx @@ -205,6 +205,7 @@ static bool ComputeZSpacingFromIPP(const DataSet &ds, double &zspacing) double normal[3]; DirectionCosines dc( cosines.data() ); dc.Cross( normal ); + DirectionCosines::Normalize(normal); // For each item SequenceOfItems::SizeType nitems = sqi->GetNumberOfItems(); @@ -2027,6 +2028,7 @@ void ImageHelper::SetOriginValue(DataSet & ds, const Image & image) double normal[3]; dc.Cross( normal ); + DirectionCosines::Normalize(normal); for(unsigned int i = 0; i < dimz; ++i ) { ----------------------------------------------------------------------- Summary of changes: Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-01-17 13:13:57
|
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, master has been updated via 424e5f22db27ba2c7b8e8dde2020635e48b56e8d (commit) via b4ece2ddf57cad3f8ed4c1d424503ac477ac3f7e (commit) from 9a0611c791f8b16430b38d6750327dd88e65562c (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/424e5f22db27ba2c7b8e8dde2020635e48b56e8d/ commit 424e5f22db27ba2c7b8e8dde2020635e48b56e8d Merge: 9a0611c79 b4ece2ddf Author: Mathieu Malaterre <mat...@gm...> Date: Wed Jan 17 05:13:55 2024 -0800 Merge branch 'release' ----------------------------------------------------------------------- Summary of changes: Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-01-17 13:13:38
|
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 b4ece2ddf57cad3f8ed4c1d424503ac477ac3f7e (commit) from 4172c18da4b17244a53b9bfc6b4b8c2c0060405c (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/b4ece2ddf57cad3f8ed4c1d424503ac477ac3f7e/ commit b4ece2ddf57cad3f8ed4c1d424503ac477ac3f7e Author: Mathieu Malaterre <mat...@gm...> Date: Wed Jan 17 05:13:31 2024 -0800 Default init variable diff --git a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx index d3c43ebf8..1b1e6e6c9 100644 --- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx +++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx @@ -342,7 +342,7 @@ bool SplitMosaicFilter::Split() return false; } const unsigned int div = (unsigned int )ceil(sqrt( (double)dims[2]) ); - bool inverted; + bool inverted = false; double normal[3]; bool hasOriginCSA = true; bool hasNormalCSA = true; ----------------------------------------------------------------------- Summary of changes: Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-01-10 13:08:12
|
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, master has been updated via 9a0611c791f8b16430b38d6750327dd88e65562c (commit) from e59d2c6126c78ac330617bf867b370b11603ea59 (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/9a0611c791f8b16430b38d6750327dd88e65562c/ commit 9a0611c791f8b16430b38d6750327dd88e65562c Author: Mathieu Malaterre <mat...@gm...> Date: Wed Jan 10 05:08:02 2024 -0800 release 3.0.23 diff --git a/Utilities/Release/release.sh b/Utilities/Release/release.sh index ba6437100..7b9cb6d3b 100755 --- a/Utilities/Release/release.sh +++ b/Utilities/Release/release.sh @@ -19,7 +19,7 @@ echo "" major=3 minor=0 -patch=22 +patch=23 dirversion="$major.$minor" version="$major.$minor.$patch" version2="$major-$minor-$patch" diff --git a/Utilities/Release/upload.sh b/Utilities/Release/upload.sh index d238f90c0..10e3ddb30 100755 --- a/Utilities/Release/upload.sh +++ b/Utilities/Release/upload.sh @@ -19,7 +19,7 @@ echo "" major=3 minor=0 -patch=22 +patch=23 dirversion="$major.$minor" version="$major.$minor.$patch" version2="$major-$minor-$patch" ----------------------------------------------------------------------- Summary of changes: Utilities/Release/release.sh | 2 +- Utilities/Release/upload.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-01-10 09:54:16
|
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, master has been updated via e59d2c6126c78ac330617bf867b370b11603ea59 (commit) via 4172c18da4b17244a53b9bfc6b4b8c2c0060405c (commit) via 9b644bf26244693e52b1363cf61d0fd7a0e00fae (commit) via bd7c78f4408fd5ff000dc4931c454f9089b616b9 (commit) via 0875db9ead1a5d715cfb7b206a816d10bdeaa52b (commit) via b0da3c2ecb666cd7764854d682f40834afa692fe (commit) via ebc521c9496821437ce8214cae85f5b428a062ea (commit) from 391e031e0e5ebc5646b8cbaaec28ba5701eb77b8 (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/e59d2c6126c78ac330617bf867b370b11603ea59/ commit e59d2c6126c78ac330617bf867b370b11603ea59 Merge: 391e031e0 4172c18da Author: Mathieu Malaterre <mat...@gm...> Date: Wed Jan 10 01:54:12 2024 -0800 Merge branch 'release' ----------------------------------------------------------------------- Summary of changes: Applications/Cxx/gdcmclean.cxx | 9 +++++- Applications/Cxx/gdcmdump.cxx | 15 ++++++---- .../gdcmCSAHeader.cxx | 10 ++++++- Source/MediaStorageAndFileFormat/gdcmCleaner.cxx | 33 ++++++++++++++++++---- Source/MediaStorageAndFileFormat/gdcmCleaner.h | 3 ++ Utilities/gdcmext/csa.c | 23 ++++++++++----- 6 files changed, 73 insertions(+), 20 deletions(-) hooks/post-receive -- Grassroots DICOM |
From: malat <ma...@us...> - 2024-01-10 09:53:36
|
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 tag, v3.0.23 has been created at 4172c18da4b17244a53b9bfc6b4b8c2c0060405c (commit) - Log ----------------------------------------------------------------- commit 4172c18da4b17244a53b9bfc6b4b8c2c0060405c Author: Mathieu Malaterre <mat...@gm...> Date: Wed Jan 10 01:52:59 2024 -0800 Release 3.0.23 ----------------------------------------------------------------------- hooks/post-receive -- Grassroots DICOM |