Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(DataSource): simplified data structure #635

Open
wants to merge 9 commits into
base: simplified-state-load-restore
Choose a base branch
from

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
DataSource objects now represent a single type, rather than the
bag-of-types done originally.
@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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants