Mercurial > hg > orthanc-wsi
comparison 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 |
comparison
equal
deleted
inserted
replaced
83:0cb3ac4f9159 | 84:727670c5c125 |
---|---|
59 volume_.GetLocation(physicalX, physicalY, x, y, totalWidth, totalHeight); | 59 volume_.GetLocation(physicalX, physicalY, x, y, totalWidth, totalHeight); |
60 | 60 |
61 std::string tmpX = boost::lexical_cast<std::string>(physicalX); | 61 std::string tmpX = boost::lexical_cast<std::string>(physicalX); |
62 std::string tmpY = boost::lexical_cast<std::string>(physicalY); | 62 std::string tmpY = boost::lexical_cast<std::string>(physicalY); |
63 std::string tmpZ = boost::lexical_cast<std::string>(physicalZ); | 63 std::string tmpZ = boost::lexical_cast<std::string>(physicalZ); |
64 | |
65 // NB: Method DcmItem::putAndInsertUint32Array() should be used at | |
66 // this point, but it is missing in DCMTK 3.6.0 | |
67 std::string index = (boost::lexical_cast<std::string>(x / GetTileWidth() + 1) + "\\" + | |
68 boost::lexical_cast<std::string>(y / GetTileHeight() + 1)); | |
64 | 69 |
65 std::auto_ptr<DcmItem> dimension(new DcmItem); | 70 std::auto_ptr<DcmItem> dimension(new DcmItem); |
66 if (!dimension->putAndInsertUint32(DCM_DimensionIndexValues, frame).good()) | 71 if (!dimension->putAndInsertString(DCM_DimensionIndexValues, index.c_str()).good()) |
67 { | 72 { |
68 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); | 73 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); |
69 } | 74 } |
70 | 75 |
71 // From Supp 145: The column position of the top left pixel of the | 76 // From Supp 145: The column position of the top left pixel of the |