Skip to content

Commit e221616

Browse files
authored
Merge pull request Kitware#779 from sankhesh/remove_downsampling
fix(rendering): Removes downsampling of the volume
2 parents 02eb9c7 + a041c8c commit e221616

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

src/components/vtk/VtkBaseVolumeRepresentation.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,6 @@ watchEffect(() => {
167167
mapper,
168168
});
169169
170-
if (isImageStreaming.value) {
171-
// reduce the quality of the volume until the entire volume is loaded
172-
const sampleDistance = mapper.getSampleDistance();
173-
mapper.setSampleDistance(sampleDistance * 15);
174-
}
175-
176170
view.requestRender();
177171
});
178172

src/utils/volumeProperties.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,6 @@ import vtkVolumeProperty from '@kitware/vtk.js/Rendering/Core/VolumeProperty';
1212
import { Vector3 } from '@kitware/vtk.js/types';
1313
import { vec3 } from 'gl-matrix';
1414

15-
/**
16-
* Sets the volume sampling distance.
17-
* @param mapper
18-
* @param distance A value betweeen 0 and 1.
19-
* @param imageData
20-
*/
21-
export function setSamplingDistance(
22-
mapper: vtkVolumeMapper,
23-
distance: number,
24-
imageData: vtkImageData
25-
) {
26-
const sampleDistance =
27-
0.7 *
28-
Math.sqrt(
29-
imageData
30-
.getSpacing()
31-
.map((v) => v * v)
32-
.reduce((a, b) => a + b, 0)
33-
);
34-
mapper.setSampleDistance(sampleDistance * 2 ** (distance * 3.0 - 1.5));
35-
}
36-
3715
/**
3816
* Sets the edge gradient.
3917
* @param property

0 commit comments

Comments
 (0)