Mercurial > hg > orthanc
diff OrthancServer/Internals/DicomImageDecoder.cpp @ 860:80c7e53a69b5 jpeg
bugfix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 07 Jun 2014 10:32:15 +0200 |
parents | 610a9a1ed855 |
children | a546b05a43da |
line wrap: on
line diff
--- a/OrthancServer/Internals/DicomImageDecoder.cpp Fri Jun 06 18:12:31 2014 +0200 +++ b/OrthancServer/Internals/DicomImageDecoder.cpp Sat Jun 07 10:32:15 2014 +0200 @@ -169,12 +169,6 @@ return slowAccessor_->GetInformation().GetHeight(); } - unsigned int GetBytesPerPixel() const - { - assert(slowAccessor_.get() != NULL); - return slowAccessor_->GetInformation().GetBytesPerPixel(); - } - unsigned int GetChannelCount() const { assert(slowAccessor_.get() != NULL); @@ -324,7 +318,8 @@ { LOG(WARNING) << "Unsupported DICOM image: " << info.GetBitsStored() << "bpp, " << info.GetChannelCount() << " channels, " - << (info.IsSigned() ? "signed" : "unsigned"); + << (info.IsSigned() ? "signed" : "unsigned") + << (info.IsPlanar() ? ", planar" : ", non-planar"); throw OrthancException(ErrorCode_NotImplemented); } @@ -438,7 +433,7 @@ sourceImage.AssignReadOnly(sourceFormat, info.GetWidth(), info.GetHeight(), - info.GetWidth() * info.GetBytesPerPixel(), + info.GetWidth() * GetBytesPerPixel(sourceFormat), source.GetAccessor().GetPixelData()); ImageProcessing::Convert(targetAccessor, sourceImage); @@ -466,7 +461,7 @@ case PixelFormat_Grayscale8: CopyPixels<uint8_t>(targetAccessor, source.GetAccessor()); break; - + case PixelFormat_Grayscale16: CopyPixels<uint16_t>(targetAccessor, source.GetAccessor()); break; @@ -612,9 +607,7 @@ { ImageAccessor a(target.GetAccessor()); ImageAccessor b(tmp.GetAccessor()); - printf("IN\n"); ImageProcessing::Convert(a, b); - printf("OUT\n"); return true; }