Page MenuHomePhabricator

Creating new folder in XNAT Tree Browser is an invalid operation
Closed, ResolvedPublic

Description

Actual behavior:
Using the XNAT Tree Browser, it is currently not possible to drag & drop a data node (e.g. segmentation.nrrd file) into the 'Resource' folder of an xnat:Session (experiment). The user is prompted to enter a folder name, which will be created. But the folder cannot be created, leaving the user with a message: "The requested operation is invalid for this protocol". A warning says: "Resource folder could not be created".

Currently a folder has to be added via right-click or the 'Create folder' button, while the xnat:Session (experiment) level is selected. Then the *.nrrd-file can be directly dropped into the newly created folder.

Expected behavior:
When asked to create a new folder by dropping a file into the corresponding 'Resource' folder, the plugin should create such a named folder as a child of the 'Resource' folder.

I suspect this may have something to do with the function "InternalAddResourceFolder" function of the 'QmitkXnatTreeBrowserView.cpp', which somehow always seems to put the new folder as a child of a 'Resource' folder. If such a folder does not exists, it creates this folder, which is not allowed ('Resource' folder have a different folder type than the manually created folder).

Event Timeline

Important for reproduction:
You drag and drop it on the patient or on the Resources/data folder and it will work. You can not however drop it on the Resources entry itself

Should be possible now.

In a side note:
When drag&dropping a node on a subject which did not have the Resourceses/data folder previously there would be a Qt assert complaining about out of bounds. This issue is being adressed in https://github.com/commontk/CTK/pull/666

kalali added a project: Restricted Project.Sep 14 2016, 10:44 AM
floca moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Oct 19 2016, 10:42 AM