comparison Framework/Toolbox/SortedFrames.cpp @ 1490:5d892f5dd9c4

SortedFrames::IsFrameMonochrome1()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 Jun 2020 17:17:06 +0200
parents 60be4627ae52
children
comparison
equal deleted inserted replaced
1486:b931ddbe070e 1490:5d892f5dd9c4
19 **/ 19 **/
20 20
21 21
22 #include "SortedFrames.h" 22 #include "SortedFrames.h"
23 23
24 #include "GeometryToolbox.h"
25
24 #include <OrthancException.h> 26 #include <OrthancException.h>
25 27 #include <Toolbox.h>
26 #include "GeometryToolbox.h"
27 28
28 namespace OrthancStone 29 namespace OrthancStone
29 { 30 {
30 SortedFrames::Instance::Instance(const Orthanc::DicomMap& tags) 31 SortedFrames::Instance::Instance(const Orthanc::DicomMap& tags)
31 { 32 {
42 numberOfFrames_ = tmp; 43 numberOfFrames_ = tmp;
43 } 44 }
44 else 45 else
45 { 46 {
46 numberOfFrames_ = 1; 47 numberOfFrames_ = 1;
48 }
49
50 std::string photometric;
51 if (tags.LookupStringValue(photometric, Orthanc::DICOM_TAG_PHOTOMETRIC_INTERPRETATION, false))
52 {
53 Orthanc::Toolbox::StripSpaces(photometric);
54 monochrome1_ = (photometric == "MONOCHROME1");
55 }
56 else
57 {
58 monochrome1_ = false;
47 } 59 }
48 60
49 hasPosition_ = ( 61 hasPosition_ = (
50 LinearAlgebra::ParseVector(position_, tags, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT) && 62 LinearAlgebra::ParseVector(position_, tags, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT) &&
51 position_.size() == 3 && 63 position_.size() == 3 &&