comparison Framework/Volumes/ImageBuffer3D.cpp @ 192:371da7fe2c0e wasm

FiniteProjectiveCamera::ApplyRaytracer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Mar 2018 17:11:11 +0100
parents a12ca0f4aaaa
children fccffbf99ba1
comparison
equal deleted inserted replaced
191:46cb2eedc2e0 192:371da7fe2c0e
28 #include <string.h> 28 #include <string.h>
29 29
30 namespace OrthancStone 30 namespace OrthancStone
31 { 31 {
32 Orthanc::ImageAccessor ImageBuffer3D::GetAxialSliceAccessor(unsigned int slice, 32 Orthanc::ImageAccessor ImageBuffer3D::GetAxialSliceAccessor(unsigned int slice,
33 bool readOnly) 33 bool readOnly) const
34 { 34 {
35 if (slice >= depth_) 35 if (slice >= depth_)
36 { 36 {
37 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 37 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
38 } 38 }
53 return accessor; 53 return accessor;
54 } 54 }
55 55
56 56
57 Orthanc::ImageAccessor ImageBuffer3D::GetCoronalSliceAccessor(unsigned int slice, 57 Orthanc::ImageAccessor ImageBuffer3D::GetCoronalSliceAccessor(unsigned int slice,
58 bool readOnly) 58 bool readOnly) const
59 { 59 {
60 if (slice >= height_) 60 if (slice >= height_)
61 { 61 {
62 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 62 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
63 } 63 }
351 style.customWindowWidth_ = 256.0; 351 style.customWindowWidth_ = 256.0;
352 return false; 352 return false;
353 } 353 }
354 354
355 355
356 ImageBuffer3D::SliceReader::SliceReader(ImageBuffer3D& that, 356 ImageBuffer3D::SliceReader::SliceReader(const ImageBuffer3D& that,
357 VolumeProjection projection, 357 VolumeProjection projection,
358 unsigned int slice) 358 unsigned int slice)
359 { 359 {
360 switch (projection) 360 switch (projection)
361 { 361 {