comparison Framework/dev.h @ 158:a053ca7fa5c6 wasm

LinearAlgebra toolbox
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 14 Feb 2018 08:58:31 +0100
parents 77c4fef7f4a5
children 0a73d76333db
comparison
equal deleted inserted replaced
157:2309e8d86efe 158:a053ca7fa5c6
84 { 84 {
85 LOG(ERROR) << "The width/height of the slices change across the volume image"; 85 LOG(ERROR) << "The width/height of the slices change across the volume image";
86 return false; 86 return false;
87 } 87 }
88 88
89 if (!GeometryToolbox::IsNear(a.GetPixelSpacingX(), b.GetPixelSpacingX()) || 89 if (!LinearAlgebra::IsNear(a.GetPixelSpacingX(), b.GetPixelSpacingX()) ||
90 !GeometryToolbox::IsNear(a.GetPixelSpacingY(), b.GetPixelSpacingY())) 90 !LinearAlgebra::IsNear(a.GetPixelSpacingY(), b.GetPixelSpacingY()))
91 { 91 {
92 LOG(ERROR) << "The pixel spacing of the slices change across the volume image"; 92 LOG(ERROR) << "The pixel spacing of the slices change across the volume image";
93 return false; 93 return false;
94 } 94 }
95 95
136 spacingZ = 1; 136 spacingZ = 1;
137 } 137 }
138 138
139 for (size_t i = 1; i < loader.GetSliceCount(); i++) 139 for (size_t i = 1; i < loader.GetSliceCount(); i++)
140 { 140 {
141 if (!GeometryToolbox::IsNear(spacingZ, GetDistance(loader.GetSlice(i - 1), loader.GetSlice(i)), 141 if (!LinearAlgebra::IsNear(spacingZ, GetDistance(loader.GetSlice(i - 1), loader.GetSlice(i)),
142 0.001 /* this is expressed in mm */)) 142 0.001 /* this is expressed in mm */))
143 { 143 {
144 LOG(ERROR) << "The distance between successive slices is not constant in a volume image"; 144 LOG(ERROR) << "The distance between successive slices is not constant in a volume image";
145 SlicedVolumeBase::NotifyGeometryError(); 145 SlicedVolumeBase::NotifyGeometryError();
146 return; 146 return;
147 } 147 }