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
15 changes: 6 additions & 9 deletions src/components/tools/ScalarProbe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,26 +96,23 @@ const pointPicker = vtkPointPicker.newInstance();
pointPicker.setPickFromList(true);

watch(
sampleSet,
(samples) => {
pointPicker.setPickList(
samples.length > 0 && samples[0] ? [samples[0].rep.actor] : []
);
() => baseRep.value?.actor,
(actor) => {
pointPicker.setPickList(actor ? [actor] : []);
},
{ immediate: true }
);

const getImageSamples = (x: number, y: number) => {
const firstToSample = sampleSet.value[0];
if (!firstToSample?.image) return undefined;
if (!currentImageData.value) return undefined;

pointPicker.pick([x, y, 1.0], view.renderer);
if (pointPicker.getActors().length === 0) return undefined;

// Get world position from the picked point
// Get world position from the picked point (in base image space)
const pickedIjk = pointPicker.getPointIJK() as unknown as ReadonlyVec3;
const worldPosition = vec3.clone(
firstToSample.image.indexToWorld(pickedIjk) as vec3
currentImageData.value.indexToWorld(pickedIjk) as vec3
);

const samples = sampleSet.value
Expand Down
5 changes: 0 additions & 5 deletions tests/specs/configTestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ export const MINIMAL_501_SESSION = {
name: 'minimal-501-session.volview.zip',
} as const;

export const ANOTHER_DICOM = {
url: 'https://data.kitware.com/api/v1/file/655d42a694ef39bf0a4a8bb3/download',
name: '1-001.dcm',
} as const;

export const PROSTATEX_DATASET = {
url: 'https://data.kitware.com/api/v1/item/63527c7311dab8142820a338/download',
name: 'prostate.zip',
Expand Down
12 changes: 5 additions & 7 deletions tests/specs/remote-manifest.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { volViewPage } from '../pageobjects/volview.page';
import { MINIMAL_DICOM } from './configTestUtils';
import { downloadFile, writeManifestToFile, openVolViewPage } from './utils';
import { ANOTHER_DICOM } from './configTestUtils';

describe('VolView loading of remoteManifest.json', () => {
it('should show error when there is no name and URL is malformed', async () => {
Expand All @@ -9,18 +9,16 @@ describe('VolView loading of remoteManifest.json', () => {
};
const fileName = 'remoteFilesBadUrl.json';
await writeManifestToFile(manifest, fileName);

const urlParams = `?urls=[tmp/${fileName}]`;
await volViewPage.open(urlParams);
await openVolViewPage(fileName);

await volViewPage.waitForNotification();
});

it('should load relative URI with no name property', async () => {
await downloadFile(ANOTHER_DICOM.url, ANOTHER_DICOM.name);
it.skip('should load relative URI with no name property', async () => {
await downloadFile(MINIMAL_DICOM.url, MINIMAL_DICOM.name);

const manifest = {
resources: [{ url: `/tmp/${ANOTHER_DICOM.name}` }],
resources: [{ url: `/tmp/${MINIMAL_DICOM.name}` }],
};
const fileName = 'remoteFilesRelativeURI.json';
await writeManifestToFile(manifest, fileName);
Expand Down
4 changes: 0 additions & 4 deletions wdio.shared.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ const TEST_DATASETS = [
url: 'https://data.kitware.com/api/v1/file/68e9807dbf0f869935e36481/download',
name: 'minimal.dcm',
},
{
url: 'https://data.kitware.com/api/v1/file/655d42a694ef39bf0a4a8bb3/download',
name: '1-001.dcm',
},
{
url: 'https://data.kitware.com/api/v1/item/63527c7311dab8142820a338/download',
name: 'prostate.zip',
Expand Down
Loading