Attached Files | 0001-BUG-guard-the-auto-adjustment-of-sample-distance-in.patch [^] (1,234 bytes) 2010-06-14 08:21 [Show Content] [Hide Content]From 3b464551604527c8b41e8c76d606c097bf537706 Mon Sep 17 00:00:00 2001
From: Stephan Schmitt <sschmitt@inria.fr>
Date: Mon, 14 Jun 2010 09:45:48 +0200
Subject: [PATCH] BUG: guard the auto adjustment of sample distance in 3D texture mapper
In vtkVolumeTextureMapper3D it was assumed that the average voxel
spacing of the dataset is greater than the sample distance requested by
the user. However this assumption is not valid in general.
---
VolumeRendering/vtkVolumeTextureMapper3D.cxx | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/VolumeRendering/vtkVolumeTextureMapper3D.cxx b/VolumeRendering/vtkVolumeTextureMapper3D.cxx
index 00de75d..f7bb256 100644
--- a/VolumeRendering/vtkVolumeTextureMapper3D.cxx
+++ b/VolumeRendering/vtkVolumeTextureMapper3D.cxx
@@ -1220,6 +1220,8 @@ int vtkVolumeTextureMapper3D::UpdateColorLookup( vtkVolume *vol )
this->GetVolumeSpacing(spacing);
this->ActualSampleDistance =
0.333 * (static_cast<double>(spacing[0]) + static_cast<double>(spacing[1]) + static_cast<double>(spacing[2]));
+ if ( this->ActualSampleDistance < this->SampleDistance )
+ this->ActualSampleDistance = this->SampleDistance;
}
// How many components?
--
1.6.0.6
|