Mercurial > hg > orthanc-wsi
diff Framework/Outputs/DicomPyramidWriter.cpp @ 84:727670c5c125
fix generation of "Dimension Index Sequence" and "Dimension Index Values"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 15 Dec 2016 12:36:20 +0100 |
parents | 7a3853d51c45 |
children | ff0ef01c332c |
line wrap: on
line diff
--- a/Framework/Outputs/DicomPyramidWriter.cpp Thu Dec 15 11:51:58 2016 +0100 +++ b/Framework/Outputs/DicomPyramidWriter.cpp Thu Dec 15 12:36:20 2016 +0100 @@ -61,9 +61,14 @@ std::string tmpX = boost::lexical_cast<std::string>(physicalX); std::string tmpY = boost::lexical_cast<std::string>(physicalY); std::string tmpZ = boost::lexical_cast<std::string>(physicalZ); + + // NB: Method DcmItem::putAndInsertUint32Array() should be used at + // this point, but it is missing in DCMTK 3.6.0 + std::string index = (boost::lexical_cast<std::string>(x / GetTileWidth() + 1) + "\\" + + boost::lexical_cast<std::string>(y / GetTileHeight() + 1)); std::auto_ptr<DcmItem> dimension(new DcmItem); - if (!dimension->putAndInsertUint32(DCM_DimensionIndexValues, frame).good()) + if (!dimension->putAndInsertString(DCM_DimensionIndexValues, index.c_str()).good()) { throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); }