[Gdcm-hackers] gdcm-git:Grassroots DICOM branch master updated. 5b1c145f628fce5c083e8205fa9d46ae044
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Mathieu M. <ma...@us...> - 2013-05-31 16:06:05
|
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 5b1c145f628fce5c083e8205fa9d46ae044bb206 (commit)
via 57228df2ff043aec0a3c8579cf75c146f6f13ef7 (commit)
from aeaff626dbc35bc730872865eb88ba7e3fe066b8 (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/5b1c145f628fce5c083e8205fa9d46ae044bb206/
commit 5b1c145f628fce5c083e8205fa9d46ae044bb206
Author: Christoph Ruegge <c.r...@ma...>
Date: Fri May 31 18:04:25 2013 +0200
Bug in SplitMosaicFilter
I think I found a small bug in SplitMosaicFilter.cxx: the offset in y
direction is calculated using the slice dimension in x direction,
leading to wrong results for Mosaic images with non-square slices.
I've attached a (trivial) patch fixing the problem.
diff --git a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx
index 5ddd838..4c05457 100644
--- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx
@@ -38,7 +38,7 @@ static bool reorganize_mosaic(const unsigned short *input, const unsigned int *i
{
const size_t outputidx = x + y*outputdims[0] + z*outputdims[0]*outputdims[1];
const size_t inputidx = (x + (z%square)*outputdims[0]) +
- (y + (z/square)*outputdims[0])*inputdims[0];
+ (y + (z/square)*outputdims[1])*inputdims[0];
output[ outputidx ] = input[ inputidx ];
}
}
https://sourceforge.net/p/gdcm/gdcm/ci/57228df2ff043aec0a3c8579cf75c146f6f13ef7/
commit 57228df2ff043aec0a3c8579cf75c146f6f13ef7
Author: Mathieu Malaterre <mat...@gm...>
Date: Fri May 31 18:00:14 2013 +0200
Technically there is at most one comment
See BUG: 290 for more reference
diff --git a/Source/MediaStorageAndFileFormat/gdcmPNMCodec.cxx b/Source/MediaStorageAndFileFormat/gdcmPNMCodec.cxx
index f983558..5719753 100644
--- a/Source/MediaStorageAndFileFormat/gdcmPNMCodec.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmPNMCodec.cxx
@@ -234,8 +234,9 @@ bool PNMCodec::GetHeaderInfo(std::istream &is, TransferSyntax &ts)
is >> dims[0]; is >> dims[1];
unsigned int maxval;
is >> maxval;
+ // http://netpbm.sourceforge.net/doc/pgm.html
// some kind of empty line...
- while( is.peek() == '\n' )
+ if( is.peek() == '\n' )
{
is.get();
}
@@ -246,6 +247,8 @@ bool PNMCodec::GetHeaderInfo(std::istream &is, TransferSyntax &ts)
if( m * dims[0] * dims[1] != (size_t)len - pos )
{
std::cerr << "Problem computing length" << std::endl;
+ std::cerr << "Pos: " << len - pos << std::endl;
+ std::cerr << "expected: " << m * dims[0] * dims[1] << std::endl;
return false;
}
gdcm::PixelFormat pf;
-----------------------------------------------------------------------
Summary of changes:
Source/MediaStorageAndFileFormat/gdcmPNMCodec.cxx | 5 ++++-
.../gdcmSplitMosaicFilter.cxx | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
Grassroots DICOM
|