View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002990 | Slicer4 | Core: GUI | public | 2013-02-28 12:47 | 2017-06-07 23:27 |
Reporter | lassoan | Assigned To | jcfr | ||
Priority | high | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | Slicer 4.2.2-1 | ||||
Target Version | Slicer 4.4.0 | Fixed in Version | Slicer 4.4.0 | ||
Summary | 0002990: Allow modules to define custom layouts | ||||
Description | A module should be able to define custom layout(s). If a custom layout is selected and the scene is saved then when the scene is loaded that custom layout should be displayed. Unique identifier is needed for each layout. Currently the identifier is an enum, so either A has administrative overhead and difficult to enforce, so B is preferred. Also, it is desirable to save the description of at least the currently selected custom layout to the scene, so that the scene appears correctly even if the creator module is not available. | ||||
Tags | No tags attached. | ||||
From: Julien Finet [mailto:julien.finet@kitware.com] I agree with you Andras, the layouts should be identified with a unique string. Feel free to enter a feature request (and suggest a patch :-) ) |
|
-----Original Message----- FWIW I've been playing with a module that does dynamic layouts [1] based on what data is loaded. Right now it just has a logic class [2] that I used from other code but I hope to give it a convenient GUI at some point. Anyway I ran into the same kind of issues with the layout ID so I ended up using 100 (since I'm redefining it all the time, I didn't see any reason for it to be a unique number). But one downside is that when you exit the application with a non-standard view number assigned and then restart the app you get a blank screen because an unknown layout id is saved in the settings. I see two options 1) if the layout id in the settings is undefined we could go back to the Conventional layout 2) we could add the layout xml to the settings and restore the last layout. I think 0000001 is better - any thoughts? -Steve |
|
From: slicer-devel-bounces@bwh.harvard.edu [mailto:slicer-devel-bounces@bwh.harvard.edu] On Behalf Of Julien Finet I agree with 1), vtkMRMLLayoutNode should be a bit more robust (default to DefaultLayout instead of NoneLayout). Julien. |
|
-----Original Message----- 1) is a simple solution, but not saving the selected layout in certain cases would be a strong limitation. We often define complete experimental setups by setting up everything in the scene then saving it. Implementing 1) would mean that we can never use custom layouts for these projects. 2) could be useful, because even if the module that defined the custom layout is not available on the Slicer instance where the scene is loaded (e.g., the corresponding extension is not installed), we could still see the correct layout. In addition to 2) there is still needed a policy to assign reserved layout enums or switch to string IDs (to avoid undefined behavior caused by multiple modules randomly redefining the same layout). Andras |
|
On Thu, Feb 28, 2013 at 5:49 PM, Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com> wrote: We should really really reference layout by string. If we don't do it now, we will be scratching our head when we will actually implement it and we will have to tweak the scene reader so that older scene can be read. Patch are welcome :) 1) If not doing so, we could reference additional layout with the following scheme .. but doing so would be like promoting what we should NOT be doing. Layout Id would be computed using the following scheme: SlicerLayoutUserView We would then create a page on the wiki where we keep track of the moduleId. The wiki page would list all the ModuleIds: Foo: 0 The offset could be set to 100. 2) We could also use a hash function to go from string to integer. Hth |
|
r22142 [1] helps with this. I've been using custom layouts and when I restart I was getting a blank screen. With this patch I think the situation is usable and probably no further changes are needed for my use case. [1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22142 |
|
Based on Steve comment, resolving the issue. While not "optimal", it is currently possible to create custom layour from either cpp or python. |
|
I agree that the current behavior is acceptable but it should be fixed at some point. I think it's better to keep track of this issue so that when someone touches the layout implementation then this problem can be be addressed as well. |
|
Slicer: 2145-support-for-installing-extension-from-file 623f3827 2013-07-05 11:32:50 Details Diff |
BUG: 0002990 use conventional layout if saved layout not available When a module or extension creates a custom layout the number (say, 100) is saved in the settings file and slicer tries to restore that on the next start up. However these layouts can be transient creations and won't be available at startup. This patch improves handling of that case - rather than printing a warning and showing a blank screen, the program now starts with the regular layout which leads to less user confusion. git-svn-id: http://svn.slicer.org/Slicer4/trunk@22142 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Libs/MRML/Widgets/qMRMLLayoutManager.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-02-28 12:47 | lassoan | New Issue | |
2013-02-28 12:47 | lassoan | Status | new => assigned |
2013-02-28 12:47 | lassoan | Assigned To | => kikinis |
2013-02-28 12:48 | lassoan | Note Added: 0008076 | |
2013-02-28 12:49 | lassoan | Note Added: 0008077 | |
2013-02-28 12:49 | lassoan | Note Added: 0008078 | |
2013-02-28 12:49 | lassoan | Note Added: 0008079 | |
2013-02-28 12:54 | jcfr | Tag Attached: I-want-to-contribute | |
2013-02-28 12:54 | jcfr | Assigned To | kikinis => |
2013-02-28 12:54 | jcfr | Priority | normal => high |
2013-02-28 12:54 | jcfr | Target Version | => Slicer 4.3.0 |
2013-02-28 12:54 | jcfr | Note Added: 0008081 | |
2013-02-28 12:55 | jcfr | Note Edited: 0008081 | |
2013-07-05 07:34 | pieper | Note Added: 0008865 | |
2013-07-05 13:21 | jcfr | Note Edited: 0008865 | |
2013-08-27 12:00 | jcfr | Target Version | Slicer 4.3.0 => Slicer 4.4.0 |
2014-03-06 08:48 | nicole | Status | assigned => new |
2014-03-06 09:16 | jcfr | Severity | minor => feature |
2014-05-12 23:20 | jcfr | Tag Renamed | I-want-to-contribute => help-wanted |
2014-05-13 10:57 | jcfr | Tag Detached: help-wanted | |
2014-05-13 10:57 | jcfr | Note Added: 0011784 | |
2014-05-13 10:57 | jcfr | Status | new => resolved |
2014-05-13 10:57 | jcfr | Fixed in Version | => Slicer 4.4.0 |
2014-05-13 10:57 | jcfr | Resolution | open => fixed |
2014-05-13 10:57 | jcfr | Assigned To | => jcfr |
2014-05-13 10:57 | jcfr | Status | resolved => closed |
2014-05-13 11:55 | lassoan | Note Added: 0011813 | |
2017-06-07 23:27 | pieper | Changeset attached | => Slicer 2145-support-for-installing-extension-from-file 623f3827 |