When I try this, the files are loaded into slicer, but the nodes are not returned in ‘loadedNodes’.Trying this code with a .nrrd file returns the correct nodes. Is this expected behavior?
The scene reader does not provide a list of all nodes that are loaded, only a success/fail flag. However, you can easily get the list of loaded nodes by adding an observer to the scene:
Thanks @Sam_Horvath. The success variable was ‘True’ and slicer.util.loadScene() does work.
Thanks @lassoan for clarifying how the scene reader works. I now understand that the Sample Data module was checking for a list of loaded nodes after importing my MRB file because the parameters were not set properly when registering the custom data set.