Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(DataSource): simplified data structure #635

Merged

Conversation

floryst
Copy link
Collaborator

@floryst floryst commented Aug 7, 2024

DataSource objects now represent a single type, rather than the bag-of-types done originally.

@PaulHax this is the PR to test (stacked on simplified-state-load-restore and streaming-base).

@floryst floryst force-pushed the simplified-state-load-restore branch from 382c45e to f59f77d Compare August 8, 2024 00:44
@floryst floryst force-pushed the simplified-datasource-structure branch from e69b644 to af41f54 Compare August 8, 2024 00:46
@PaulHax
Copy link
Collaborator

PaulHax commented Aug 9, 2024

Little bug I'm having trouble fixing:
When I drag and drop a PET and CT series from the same study, they are automatically layered. But I get an error:

macros2.js:50 attempt to set zero width color range
vtkErrorMacro	@	macros2.js:50
publicAPI.setMappingRange	@	ColorTransferFunction.js:981
applyColoring	@	useColoringEffect.ts:47
applyLayerColoring	@	VtkLayerSliceRepresentation.vue:97
callWithErrorHandling	@	runtime-core.esm-bundler.js:158

As const imageDataRange = image.getPointData().getScalars().getRange(); returns [0, 0]. I think the image is not fully loaded yet, and need to defer the color map setup for the layer until then...

@floryst
Copy link
Collaborator Author

floryst commented Aug 9, 2024

Yeah, that's something we should guard against. I suspect the PET image has slices that are completely empty, so they are initializing the range to [0, 0]. We can defer colormap application, or we can guess a "reasonable" initial data range if that's even acceptable.

@floryst
Copy link
Collaborator Author

floryst commented Aug 9, 2024

FYI I do something similar in VolumeRendering, where the opacity function editor is delayed until the entire dataset is available (because it needs to compute a histogram).

@floryst floryst force-pushed the simplified-state-load-restore branch from f59f77d to ef98d95 Compare March 26, 2025 20:36
@floryst floryst force-pushed the simplified-datasource-structure branch from ff8d9d6 to 35628c1 Compare March 26, 2025 20:36
@floryst floryst merged commit 6745ed1 into simplified-state-load-restore Mar 26, 2025
0 of 3 checks passed
@floryst floryst deleted the simplified-datasource-structure branch March 26, 2025 20:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants