Mercurial > hg > orthanc
comparison Core/DicomFormat/DicomImageInformation.cpp @ 2416:feb0d2dcfa9b
try and fix compiler bugs
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 03 Oct 2017 10:30:06 +0200 |
parents | 16e45af17a4d |
children | 5a7c5c541a1d |
comparison
equal
deleted
inserted
replaced
2415:7e217a1cc63f | 2416:feb0d2dcfa9b |
---|---|
176 catch (OrthancException&) | 176 catch (OrthancException&) |
177 { | 177 { |
178 throw OrthancException(ErrorCode_NotImplemented); | 178 throw OrthancException(ErrorCode_NotImplemented); |
179 } | 179 } |
180 | 180 |
181 try | 181 if (values.HasTag(DICOM_TAG_NUMBER_OF_FRAMES)) |
182 { | 182 { |
183 numberOfFrames_ = boost::lexical_cast<unsigned int>(values.GetValue(DICOM_TAG_NUMBER_OF_FRAMES).GetContent()); | 183 try |
184 } | 184 { |
185 catch (OrthancException&) | 185 numberOfFrames_ = boost::lexical_cast<unsigned int>(values.GetValue(DICOM_TAG_NUMBER_OF_FRAMES).GetContent()); |
186 { | 186 } |
187 // If the tag "NumberOfFrames" is absent, assume there is a single frame | 187 catch (boost::bad_lexical_cast&) |
188 { | |
189 throw OrthancException(ErrorCode_NotImplemented); | |
190 } | |
191 } | |
192 else | |
193 { | |
188 numberOfFrames_ = 1; | 194 numberOfFrames_ = 1; |
189 } | |
190 catch (boost::bad_lexical_cast&) | |
191 { | |
192 throw OrthancException(ErrorCode_NotImplemented); | |
193 } | 195 } |
194 | 196 |
195 if ((bitsAllocated_ != 8 && bitsAllocated_ != 16 && | 197 if ((bitsAllocated_ != 8 && bitsAllocated_ != 16 && |
196 bitsAllocated_ != 24 && bitsAllocated_ != 32) || | 198 bitsAllocated_ != 24 && bitsAllocated_ != 32) || |
197 numberOfFrames_ == 0 || | 199 numberOfFrames_ == 0 || |