-
Notifications
You must be signed in to change notification settings - Fork 60
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
Allow loading user defined treatment machines in Room's Eye View #218
Comments
You can count on me, if you need help with models transform programming and other stuff! |
Thank you :) |
Working on a sample JSON file to describe the existing Varian machine. This is what I have now. Please comment on anything that could need to be added or changed:
One thing that made me thinking is that the movement of the imaging panels is more complex than a simple translation or rotation (first rotates in then starts to translate too). After checking, actually, it seems that the movement of the panels is broken. It seems out of scope for this project to fix that I guess (I may still do it), but certainly worth mentioning that there are some magic numbers in the code that moves the imaging panels, and also worth considering if we want to load that parameter from JSON as well: SlicerRT/RoomsEyeView/Logic/vtkSlicerRoomsEyeViewModuleLogic.cxx Lines 1030 to 1037 in 19572b5
|
Looks very good, thanks for your work! Some comments below:
|
Thanks for the comments! Good that you have more ideas now seeing this file - I only added those that we defined at our meeting. A few things:
Here's the updated sample JSON file. I changed some element names to be more unambiguous (title vs name, active vs visible vs enabled):
|
Sounds good.
Perfect.
Agreed.
Good idea, too.
Great.
You're right.
Perfect. Thanks so much :) |
The basic loading of treatment machine from JSON descriptor file works now for the default Varian TrueBeam machine. One question I have is what to do with the user interface. So far there has been a combobox with the two default machines. For now, as the easiest solution, I added a third option "From file...", clicking on which a file selector pops up and we can load the machine using that: @ferdymercury @gregsharp what do you think the ideal GUI would look like for machine selection? |
@ferdymercury Also an idea as I was thinking about the Enabled state. I can imagine you want to show the model but not include it in the collision detection (also for speedup reasons). Should we include this somehow? |
Sounds good. Maybe it would be worth defining State as a string with three possible options:
|
Thanks, it's looking great. |
Thanks a lot for the answers, I agree with both. |
I implemented all the features discussed related to loading a treatment machine model already included in the JSON files (part name, file path, file to RAS matrix, color, state), and tested with the two default machines. I integrated (#226) the commits into the upstream to make it easier to try what is ready so far. This means that tomorrow afternoon (when the build machines in the US are done building and testing all extensions too) you can download the latest Slicer preview, install SlicerRT, and try the latest changes. A few outstanding things:
I think what we already discussed and is missing are:
Anything else? |
Perfect! thanks. |
A little progress:
I'll continue with the tasks one by one in the meantime. Thanks! |
Sounds good, agreed, thanks! |
Warnings appeared when calling the deprecated functions. Re #218
Lovely :) |
More intuitive rotating "left or right" than going all the way from 0 to 359 if we want to rotate "left" Re #218
I started working on this task
This means that if the user changes the gantry angle for example, we jump to "world 1", in which the patient is seen correctly oriented with respect to the table and the gantry, but if the user changes a patient support parameter, we jump to "world 2". I propose that we try to fix this simply by considering the isocenter in the tabletop-driven scenario, and see how the rest of the application behaves (changing beam parameters, changing gantry angle in REV module, etc.). One thing that I think we'll have to do is that if the user changes table top parameters we need to deselect the beam, but not sure about that. @ferdymercury please let me know if this is OK with you. Thanks! |
Oh, I see, thanks for the analysis. Yep, sounds good. Everything tabletop-driven. Which if I understand correctly, should be similar to patient-beam-isocenter-driven, because the tabletop is glued to the posterior of the patient. In principle, if a beam isocenter is selected, we should allow to change the couch rotation and gantry angle without having to unselect that beam. Tabletop and patient remain glued at the same position, only walls with gantry rotate around. Or am I misunderstanding something? |
Thanks for the quick response! Yes, the solution is basically to merge the two and be both beam and tabletop driven.
You're right, I will keep thinking about this part. It seemed that things fall apart a bit when starting to change those, hence I suggested that I do the first fix and see how the rest behaves. |
See #218 (comment) Still to fix: when beam is selected in REV module the patient support related transforms do not consider the beam. Re #218
It was impossible to move the isocenter in 3D when a beam was shown as the closest point on the beam was always picked. Re #218
I implemented a very simple way to prevent lengthy collision detections: if the product of the number of triangles for the two models taking part in collision detection is higher than a threshold, that collision detection is disabled, and the user is warned. This threshold is now 1e10, so for example two models of 100,000 triangles. This is how the warning looks: @ferdymercury Please let me know if this works for now. |
Hi Csaba, thanks. I am not sure if this addresses the issue I was seeing. The problem was (I believe) not the algorithm taking too long, but rather that while 'sliding', it was queuing many times the collision detetion for many intermediate angles, is that possible? I think it should 'abort' / throw out of the queue previous calculations if the slider moves faster than the solution of the previous angle. Concerning the threshold, it sounds good, but maybe there should be an additional button saying 'calculate anyway even if it takes a long time' ? |
I spent the whole day today trying to see the reason for this phenomenon and how to fix it
|
Ohh, ok, I see. Also, we might explore faster (less accurate) collision detection algorithms such as Dice Similarity Coefficient with a threshold. |
Sounds good, let's keep it like now and write down the improvement ideas for the future :) |
Many times researchers would like to calculate collisions for their machines but they cannot share the treatment machine models. At the same time they would be willing to define the parts if there was a relatively convenient way to do so.
This could be achieved by defining a JSON schema that describes the parts. The currently available treatment machines should be converted to this new method as well. A separate repository could be set up for the publicly available machine definitions.
A project with @ferdymercury
The text was updated successfully, but these errors were encountered: