comparison OrthancServer/SliceOrdering.cpp @ 1737:ec66a16aa398

removal of DicomStringValue and DicomNullValue
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 22 Oct 2015 07:52:24 +0200
parents b80e76dd1d56
children 697ae8d0e287
comparison
equal deleted inserted replaced
1736:b953c6eef28d 1737:ec66a16aa398
80 unsigned int expectedSize) 80 unsigned int expectedSize)
81 { 81 {
82 const DicomValue* value = map.TestAndGetValue(tag); 82 const DicomValue* value = map.TestAndGetValue(tag);
83 83
84 if (value == NULL || 84 if (value == NULL ||
85 value->IsNull()) 85 value->IsNull() ||
86 value->IsBinary())
86 { 87 {
87 return false; 88 return false;
88 } 89 }
89 else 90 else
90 { 91 {
91 return TokenizeVector(result, value->AsString(), expectedSize); 92 return TokenizeVector(result, value->GetContent(), expectedSize);
92 } 93 }
93 } 94 }
94 95
95 96
96 struct SliceOrdering::Instance : public boost::noncopyable 97 struct SliceOrdering::Instance : public boost::noncopyable
115 throw OrthancException(ErrorCode_UnknownResource); 116 throw OrthancException(ErrorCode_UnknownResource);
116 } 117 }
117 118
118 const DicomValue* frames = instance.TestAndGetValue(DICOM_TAG_NUMBER_OF_FRAMES); 119 const DicomValue* frames = instance.TestAndGetValue(DICOM_TAG_NUMBER_OF_FRAMES);
119 if (frames != NULL && 120 if (frames != NULL &&
120 !frames->IsNull()) 121 !frames->IsNull() &&
122 !frames->IsBinary())
121 { 123 {
122 try 124 try
123 { 125 {
124 framesCount_ = boost::lexical_cast<unsigned int>(frames->AsString()); 126 framesCount_ = boost::lexical_cast<unsigned int>(frames->GetContent());
125 } 127 }
126 catch (boost::bad_lexical_cast&) 128 catch (boost::bad_lexical_cast&)
127 { 129 {
128 } 130 }
129 } 131 }