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

Select zone as scoring object. #1906

Merged
merged 30 commits into from
Jan 10, 2025

Conversation

jagodek
Copy link
Contributor

@jagodek jagodek commented Dec 15, 2024

This pull request includes several changes to improve the scoring functionality in the ThreeEditor module, particularly focusing on the ScoringOutput class and related components. The changes introduce new features such as handling different scoring types (detector and zone) and updating the UI components to reflect these changes.

Enhancements to Scoring Functionality:

  • src/ThreeEditor/Simulation/Scoring/ScoringOutput.ts:

    • Added new properties zoneUuid and scoringType to ScoringOutputJSON and corresponding private fields _zone and _scoringType to the ScoringOutput class. [1] [2]
    • Implemented getter and setter methods for zone, scoringType, and detector.
    • Updated the toJSON and fromJSON methods to include the new properties. [1] [2]
    • Added a method removeAllQuantities to clear all quantities from the scoring output.
  • src/ThreeEditor/Simulation/Scoring/ScoringManager.ts:

    • Added a method getOutputByQuantityUuid to retrieve a scoring output by a quantity UUID.

UI and Component Updates:

  • src/ThreeEditor/components/Dialog/ChangeScoringTypeDialog.tsx:

    • Created a new dialog component to handle changing the scoring type, with options to clear existing quantities.
  • src/ThreeEditor/components/Sidebar/properties/category/OutputConfiguration.tsx:

    • Added a toggle button group to switch between detector and zone scoring types, and updated the UI to show relevant fields based on the selected scoring type. [1] [2] [3] [4]
  • src/ThreeEditor/components/Sidebar/properties/category/ObjectInfo.tsx:

    • Displayed the scoring type for scoring quantities in the properties panel. [1] [2] [3]

Additional Changes:

  • src/ThreeEditor/Simulation/Scoring/ScoringOutputTypes.ts:

    • Added new constants for FLUKA zone keyword and modifier options.
  • src/ThreeEditor/Simulation/Zones/ZoneManager.ts:

    • Added a method getZoneOptionsForScoring to retrieve zone options formatted for scoring.

These changes collectively enhance the flexibility and functionality of the scoring system, allowing for more precise and varied simulation configurations.

@jagodek jagodek linked an issue Dec 15, 2024 that may be closed by this pull request
@jagodek jagodek self-assigned this Dec 15, 2024
@jagodek jagodek marked this pull request as ready for review December 28, 2024 23:41
@jagodek jagodek requested a review from grzanka December 28, 2024 23:41
@grzanka
Copy link
Contributor

grzanka commented Dec 30, 2024

I've started to add new zone-based quantity to an Fluka example.

The popup was somehow misleading. Why yaptide wanted to remove quantites ?
There were none added to my output at that moment.

image

@grzanka
Copy link
Contributor

grzanka commented Dec 30, 2024

It seems that the converter functionality is still missing to handle Zone scoring for Fluka:

image
image

@grzanka
Copy link
Contributor

grzanka commented Jan 8, 2025

@jagodek fix merge conflicts

@jagodek jagodek requested a review from grzanka January 9, 2025 00:32
@grzanka
Copy link
Contributor

grzanka commented Jan 9, 2025

image

why do I get this window if no quantities are defined ?

@grzanka
Copy link
Contributor

grzanka commented Jan 9, 2025

What is ENERGY quantity ? If that is a deposited energy, then it should be called dose

image

@jagodek
Copy link
Contributor Author

jagodek commented Jan 9, 2025

image

why do I get this window if no quantities are defined ?

There is automatically created quantity alongside new output. Should I get rid of it?

@grzanka
Copy link
Contributor

grzanka commented Jan 9, 2025

image
why do I get this window if no quantities are defined ?

There is automatically created quantity alongside new output. Should I get rid of it?

Ah, I see. I haven't seen it as the Output item was collapsed. Is it possible to un-collapse Output item upon creation ? Then such Warning can stay.

@jagodek
Copy link
Contributor Author

jagodek commented Jan 9, 2025

I'm trying but it's tricky

@grzanka
Copy link
Contributor

grzanka commented Jan 9, 2025

I'm trying but it's tricky

Then lets forget about it, its not that problematic, better to dedicate some effort to fix this: #1601

@grzanka
Copy link
Contributor

grzanka commented Jan 9, 2025

Looks good, except small comment on aria labels

@grzanka grzanka added this pull request to the merge queue Jan 10, 2025
Merged via the queue into master with commit 584696f Jan 10, 2025
8 checks passed
@grzanka grzanka deleted the 1891-select-detector-in-sidebar-for-scoring branch January 10, 2025 09:31
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.

Select Zone in sidebar for scoring
2 participants