Path of the loaded fiber bundle

Dear developers,
I am trying to get the file path of the fiber bundle loaded in the slicer, here I use a selector to assign a data, and I try to use command GetStorageNode().GetFileName() to get the path.
This is my code:

However, it failed

It seems like the ‘atlas’ file I loaded doesn’t have a storage node,
but I indeed load it from local disk.
I wonder how to solve this problem.

Best wishes and thanks!

Good question.

It looks like the AddFiberBundle method doesn’t include these lines that are in the corresponding code of the AddModel method.

As a result you are getting a blank storage node instead of the one used to read the data.

Would you be able to make a pull request for this?

Dear piper,
I found there some differents between volume and fiber bundle
Does it just need these codes?
// Associate with storage node

// Set the storage node ID for the fiber bundle node


Yes, from what I can see that is the missing code that needs to be added. If you aren’t familiar with the process I can probably find time to add it and test that it works, but if you can give it a try it would be appreciated.

I’m sorry I’m not familiar with this process, * I thought you might be needed to complete this step

I went ahead and added the missing line. It will be in tomorrow’s version of SlicerDMI and it would be great if you could test it out.

1 Like

Dear pieper,
Thanks a lot, I will test it tomorrow.
Best regards,