Commit 07f1768b authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED default spacing should be a positive value

parent c830616f
......@@ -65,7 +65,7 @@ void Slice::init() {
currentSliceIndex = 0;
for (int i=0; i<3; i++) {
originalSpacing[i] = -1.0;
originalSpacing[i] = 1.0;
}
originalVolume = nullptr;
......@@ -100,9 +100,9 @@ void Slice::setOriginalVolume(vtkSmartPointer<vtkImageData> volume) {
originalSize[i] = originalDimensions[i] * originalSpacing[i];
// As originalSpacing[i] will be used to get the slice number
// for 2D images, lets replace 0.0 by -1.0 to avoid division by 0
// for 2D images, lets replace 0.0 by 1.0 to avoid division by 0
if (originalSpacing[i] == 0.0) {
originalSpacing[i] = -1.0;
originalSpacing[i] = 1.0;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment