UCL / SkullBaseNavigation

Other
2 stars 1 forks source link

Save multiple us reconstructions - [merged] #95

Closed tdowrick closed 3 years ago

tdowrick commented 3 years ago

In GitLab by @RolandGuichard on Jul 11, 2019, 16:11

_Merges save-multiple-US-reconstructions -> startdeps

Fixes #70

I have checked on Slicer that the box is checked correctly.

@ThomasDowrick @AnastasisGeorgoulas a quick review maybe ?

I am mostly wondering if using the findChild method would be better than getting all the children of the same name and selecting the only element from that returned list.

tdowrick commented 3 years ago

In GitLab by @RolandGuichard on Jul 11, 2019, 16:11

changed the description

tdowrick commented 3 years ago

In GitLab by @ThomasDowrick on Jul 12, 2019, 08:20

It looks like you branched this from master? Is it possible to rebase/edit from start_deps instead, so that it is easier to see what the changes were?

tdowrick commented 3 years ago

In GitLab by @ThomasDowrick on Jul 12, 2019, 08:31

Nevermind, I see that it was branched from start_deps, but it is being merged into master.

Can you edit the merge request so that it merges to start_deps instead?

tdowrick commented 3 years ago

In GitLab by @RolandGuichard on Jul 12, 2019, 08:54

changed target branch from master to start_deps

tdowrick commented 3 years ago

In GitLab by @RolandGuichard on Jul 12, 2019, 08:54

Of course, silly me. Done.

tdowrick commented 3 years ago

In GitLab by @ThomasDowrick on Jul 12, 2019, 10:22

Looks fine for me.

tdowrick commented 3 years ago

In GitLab by @ThomasDowrick on Jul 12, 2019, 13:52

I just checked this in the OR and get the following error:

Traceback (most recent call last):
  File "<string>", line 7, in <module>
  File "C:/Users/SBN/Code/skullbasenavigation/skullbasenavigation/sbn_slicelet.py", line 480, in <module>
    slicelet = TractographySlicelet()
  File "C:/Users/SBN/Code/skullbasenavigation/skullbasenavigation/sbn_slicelet.py", line 405, in __init__
    super(TractographySlicelet, self).__init__()
  File "C:/Users/SBN/Code/skullbasenavigation/skullbasenavigation/sbn_slicelet.py", line 96, in __init__
    self.check_add_timestamp_to_filename_box(self.ctk_recon_box)
  File "C:/Users/SBN/Code/skullbasenavigation/skullbasenavigation/sbn_slicelet.py", line 200, in check_add_timestamp_to_filename_box
    live_adv_param_btn = live_recon_btn[0]
IndexError: list index out of range

Which version of Slcier did you test on?

tdowrick commented 3 years ago

In GitLab by @RolandGuichard on Jul 12, 2019, 13:53

4.10 Hm...Ok, I can retry with 4.8.

tdowrick commented 3 years ago

In GitLab by @AnastasisGeorgoulas on Jul 12, 2019, 14:03

This is probably the missing names issue again... Some widgets (including the PlusRemote module's, I think) have empty names in their 4.8 version, so you can't find them by name. We did something similar in get_plus_remote_connector_selector in functions.py. You can use their "location" (once you find it...) or the class of the widget, or a combination.

tdowrick commented 3 years ago

In GitLab by @RolandGuichard on Jul 12, 2019, 14:08

But in that case, it means the lines 88 in the slicelet:

btn = [widget for widget in plus_wid
               if widget.name == "VolumeReconstructionCollapsibleButton"]

are wrong. In fact, I am just checking now that the output of

plus_w = slicer.modules.plusremote.widgetRepresentation().children()

is:

(QVBoxLayout (QVBoxLayout at: 0x12ca6bbc0), ctkCollapsibleButton (ctkCollapsibleButton at: 0x12ca6ff30), ctkCollapsibleButton (ctkCollapsibleButton at: 0x12be481e0), ctkCollapsibleButton (ctkCollapsibleButton at: 0x12be64340), ctkCollapsibleButton (ctkCollapsibleButton at: 0x124af8f10), ctkCollapsibleButton (ctkCollapsibleButton at: 0x12bf0b0d0), ctkCollapsibleButton (ctkCollapsibleButton at: 0x12ca89ac0), ctkCollapsibleButton (ctkCollapsibleButton at: 0x12bf22d70))

In Slicer4.8. A bunch of collapsible buttons.

tdowrick commented 3 years ago

In GitLab by @RolandGuichard on Jul 12, 2019, 17:30

added 1 commit

Compare with previous version

tdowrick commented 3 years ago

In GitLab by @RolandGuichard on Jul 12, 2019, 17:32

@ThomasDowrick OK this should fix it. If you can, please test it and tell me if that doesn't work. The Add timestamp to filename check box in the live reconstruction should now be checked by default.

tdowrick commented 3 years ago

In GitLab by @ThomasDowrick on Jul 15, 2019, 10:46

Yes, the button is checked by default now.

I think the default save location for these files is in the PlusApp folder (C:\Users\SBN\PlusApp-2.6.0.20190221-StealthLink-Win32\data). We can always copy the data afterwards, but is it possible to change this to the data output folder where we save everything else?

tdowrick commented 3 years ago

In GitLab by @RolandGuichard on Jul 15, 2019, 11:07

Uh...I don't know yet. There must be a way to change the default folder in one of the Slicer config. Will have a look at that.

tdowrick commented 3 years ago

In GitLab by @AnastasisGeorgoulas on Jul 15, 2019, 11:14

The file saving is done through PLUS, and all the commands for that communication are pre-defined in the PLUS Remote widget buttons, so it might not be easy to customise. Maybe if you give an absolute path in the text box, it will use that? That's just a guess (and a long shot), though!

tdowrick commented 3 years ago

In GitLab by @RolandGuichard on Jul 15, 2019, 12:35

Yeah, makes sense since we are dealing with the PLUS remote module. Maybe the XML config file has got anything ? Will have a look.

tdowrick commented 3 years ago

In GitLab by @ThomasDowrick on Jul 19, 2019, 14:32

added 1 commit

Compare with previous version

tdowrick commented 3 years ago

In GitLab by @DavidPerez-Suarez on Aug 20, 2019, 16:11

added 13 commits

Compare with previous version

tdowrick commented 3 years ago

In GitLab by @DavidPerez-Suarez on Aug 20, 2019, 16:27

merged