My first question would be:
The distinction between on-server and in-database was apparently removed and POSTs to xapi/docker/images are no longer possible. Now all my images only have an image-id (sha256:....) and a tag only. Is there a way to add information to the image?
Also:
Saving a command from the image label doesn't do anything, tried with your dcm2niix container, is this known?
How should I format the request to get it to work?
curl -u ${username}:${password} -X POST ${xnat}/xapi/commands/${commandId}/launch\?paramName1=paramValue1\¶mName2=paramValue2\&...
import requests
s = requests.Session()
s.auth = (username, password)
r = s.post(xnat + '/xapi/commands/%d/launch' % commandId, params = {'paramName1': 'paramValue1', 'paramName2': 'paramValue2', ...})
--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at https://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.
It’s not a bug, just the way it’s been done with XNAT historically. I honestly have no idea why that field was used in particular. It would be pretty easy to change in code, but at this point does require changing Java code.
--
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussion+unsubscribe@googlegroups.com.
To post to this group, send email to xnat_discussion@googlegroups.com.
It would require Java code, but you can create a DICOM object identifier on its own and include that in a plugin. 1.7.3 will add the ability to set the DICOM object identifier on a per-DICOM receiver basis (actually, that ability is already there but without any UI: that UI is what will be added in 1.7.3). So you could create a new receiver and set your alternative DICOM object identifier for that receiver. I had started a sample DICOM object identifier for the template plugin project but haven’t committed that yet.
--
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
Voice: (314) 273-1645
Web: http://www.xnat.org
Twitter: @NrgXnat
Hi Jens,
FixedDicomProjectIdentifier would work to route the DICOM to a single project, but right now that’s only included in one CompositeDicomObjectIdentifier implementation, which is FixedProjectSubjectDicomObjectIdentifier. That identifier is mostly for development purposes, since it only sends to a single fixed subject as well as a single fixed project. It would be very easy to just copy the ClassicDicomObjectIdentifier class, replace Xnat15DicomProjectIdentifier with FixedDicomProjectIdentifier, and create a session extractor that uses the StudyID tag. I actually did this and have attached it to this post.
To get this up and running, you can create an @XnatPlugin-annotated class that creates an instance of the identifier, something like this:
@XnatPlugin(value = "myPlugin", name = "My Plugin")
public class MyPlugin {
@Bean
public CompositeDicomObjectIdentifier myProjectIdentifier(final XnatUserProvider userProvider) {
return new FixedProjectStudyIdDicomObjectIdentifier("My Project Identifier", "My_Project", userProvider);
}
}
Once that’s up and running, you can assign it to a DICOM receiver by setting the identifier property on the receiver to the appropriate value, in this case “myProjectIdentifer”:
{"aeTitle": "HELLO", "port": 8105, "identifier": "myProjectIdentifier"}
We plan to make this easier to configure dynamically (i.e. without code) at some point, but we’re just not there right now.
Ah sorry, my bad. I should have thought of this. The way these dependencies are tied together uses the Spring Framework’s annotation configuration function. In that framework, when you have an @Bean-annotated method like the myProjectIdentifier() method below, Spring tries to resolve any parameters to the method by looking in the application context, which is essentially a map of object instances with the bean name as the key. The ways that it tries to fill in those parameters is by looking for:
· Beans that have the same name as the parameter (and type: if it finds a bean with the same name but wrong type, you’ll get an exception for that)
· Beans that have the same type as the parameter
In the sample case below, it looks for a bean named userProvider. There is no bean named userProvider, so it moves on to find a unique bean of type XnatUserProvider. As you can see, there is no unique bean of type XnatUserProvider, so it doesn’t know which one to wire in as the parameter submitted to the myProjectIdentifier() method.
But it’s an easy fix. Just change the name of your parameter:
@XnatPlugin(value = "myPlugin", name = "My Plugin")
public class MyPlugin {
@Bean
public CompositeDicomObjectIdentifier myProjectIdentifier(final XnatUserProvider receivedFileUserProvider) {
return new FixedProjectStudyIdDicomObjectIdentifier("My Project Identifier", "My_Project", userProvider);
}
}
And you’re correct: you want to use the receivedFileUserProvider instance. You could also create your own user provider if, for some reason, you wanted received file operations for a particular project identifier or DICOM receiver to be logged under that user’s name, but that’s pretty straightforward.
--
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
Voice: (314) 273-1645
Web: http://www.xnat.org
Twitter: @NrgXnat
Without seeing the code it’s hard to say. I’m actually not even sure where you’re getting that error, so there could be a few reasons why. Can you provide the method that’s trying to instantiate the identifier, as well as the identifier code?