Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/components/vtk/VtkBaseVolumeRepresentation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,6 @@ watchEffect(() => {
mapper,
});

if (isImageStreaming.value) {
// reduce the quality of the volume until the entire volume is loaded
const sampleDistance = mapper.getSampleDistance();
mapper.setSampleDistance(sampleDistance * 15);
}

view.requestRender();
});

Expand Down
22 changes: 0 additions & 22 deletions src/utils/volumeProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,6 @@ import vtkVolumeProperty from '@kitware/vtk.js/Rendering/Core/VolumeProperty';
import { Vector3 } from '@kitware/vtk.js/types';
import { vec3 } from 'gl-matrix';

/**
* Sets the volume sampling distance.
* @param mapper
* @param distance A value betweeen 0 and 1.
* @param imageData
*/
export function setSamplingDistance(
mapper: vtkVolumeMapper,
distance: number,
imageData: vtkImageData
) {
const sampleDistance =
0.7 *
Math.sqrt(
imageData
.getSpacing()
.map((v) => v * v)
.reduce((a, b) => a + b, 0)
);
mapper.setSampleDistance(sampleDistance * 2 ** (distance * 3.0 - 1.5));
}

/**
* Sets the edge gradient.
* @param property
Expand Down