Hi Aurelien,
A couple things. I’d suggest using XnatDataClient rather than XNATRestClient. That’s the tool we’ll be supporting going forward. It is somewhat (and will become more so) XNAT aware and will do some things to help get your data into XNAT appropriately.
That said, what you’re doing is a pretty straightforward operation that can be done with even as simple a tool as curl, since you’re just pushing data to the server. There is no metadata going up with that push, regardless of whether you use curl, XnatDataClient, XNATRestClient, or even upload the data directly through the XNAT user interface. This is at least in part because there’s very little metadata in NIFTI itself.
Because of this, currently the primary data format with which XNAT works is DICOM. What you’re seeing is a side effect of this. You are associating your NIFTI data with a particular scan, which is probably OK, but as far as XNAT is concerned, that scan is empty because there’s no DICOM. You’ll notice, however, that the Files column indicates that you have 135.6KB in 1 file. If you hover your mouse over that, it should tell you what that one file is and it will tell you that it’s a NIFTI file. So your data is there, it’s just not appearing in the way you expect it to appear.
Another thing is that you’re seeing the broken image in there because of how XNAT generates snapshots of incoming DICOM data. There is currently a pipeline that launches at the time that incoming DICOM data is moved into a project (in XNAT terminology, it’s archived, which means that it’s promoted from the prearchive). That pipeline goes through the DICOM and creates GIF thumbnails of the DICOM and posts them back to XNAT as resources. When you go to a DICOM session and look at the scans, you’ll see these snapshot GIFs. Since your session didn’t go through this process AND has no DICOM data associated with it, you won’t see these snapshots.
We’ve been kicking around ways to make NIFTI a first-class citizen in XNAT for quite some time, but there are a number of issues surrounding that, most going back to the lack of metadata I mentioned earlier. Future releases of XNAT will have some means of handling NIFTI better, but I can’t tell you exactly what that will look like. As for the screen shot thing, we hope to have a much better approach for that as well.
One last thing: if you want to have a look at what you have in your session for NIFTI files, try using the Manage Files feature. That can be launched by clicking Manage Files on the Actions menu over to the right side of the session page.
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
--
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 http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.
Thank you very much .
Re: #1, it’s not a problem with XNAT itself. You probably don’t have the pipeline engine configured properly. The snapshot images that display in the list of scans are actually generated by the pipeline engine through the AutoRun pipeline that is launched whenever a new session is moved into the archive. If you have snapshots, you’ll see them in the Manage Files dialog in addition to the DICOM files:

Have a look at your XNAT logs (specifically application.log) and the pipeline logs (which will be in a folder named logs in your pipeline engine folder). If you can’t determine what’s going wrong from those, you should be able to find the commands that launched the failed pipelines and run those from the command line
I can’t really say anything about the NullPointerException on its own. I’d need to see the stacktrace that’s generated. One of the buttons on that dialog (don’t know which one, sorry, I can’t read Chinese J) will show you more information about the error and that will indicate where it’s actually occurring.
Pyxnat is a fine tool for uploading data, but I’m not sure what you mean about configuring a pipeline. Those are separate things. You can configure pipelines through the user interface then run the pipelines on data uploaded by XNAT.
Re: #4, there’s documentation on using the prearchive in 1.6 here: https://wiki.xnat.org/display/XNAT16/Using+the+Prearchive. We’re working on updating our documentation now and a description of the prearchive and archive are part of that. They’re not completed yet, though.
--
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
Visit this group at https://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.
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.
//create subject_test
XnatDataClient -u MyUsername -p MyPassword -r "http://localhost/xnat/data/projects/MyProjectName/subjects/subject_test" -m PUT
//creat session1
XnatDataClient -u MyUsername -p MyPassword -r "http://localhost/xnat/data/projects/ MyProjectName /subjects/subject_test /experiments/session1?xnat:mrSessionData/date=01/02/07" -m PUT
//creat SCAN1
XnatDataClient -u MyUsername -p MyPassword -r "http://localhost/xnat/data/projects/ MyProjectName /subjects/subject_test /experiments/session1 /scans/SCAN1?xsiType=xnat:mrScanData&xnat:mrScanData/type=T1" -m PUT
//upload SCAN1 files
XnatDataClient -u MyUsername -p MyPassword -r "http://localhost/xnat/data/projects/ MyProjectName /subjects/subject_test /experiments/session1 /scans/SCAN1 /resources/DICOM/resources/DICOM?format=DICOM&content=T1_RAW" -m PUT
//upload SCAN1 files
XnatDataClient -u MyUsername -p MyPassword -r "http://localhost/xnat/data/projects/ MyProjectName /subjects/subject_test /experiments/session1 /scans/SCAN1 /resources/DICOM/ files/1232132.dcm" -m PUT -l /localpath/1232132.dcm
//create reconstruction 1
XnatDataClient -u MyUsername -p MyPassword -m PUT -r "/data/projects/ MyProjectName /subjects/subject_test/experiments/session1/reconstructions/session1_recon_0343?xnat:reconstructedImageData/type=T1_RECON"
//create resource collection to put files into
XnatDataClient -u MyUsername -p MyPassword -m PUT -r "/data/projects/ MyProjectName /subjects/subject_test/experiments/session1/reconstructions/session1_recon_0343/resources/NIFTI?format=NIFTI"
//upload reconstruction 1 files...
XnatDataClient -u MyUsername -p MyPassword -m PUT -r "/data/projects/ MyProjectName /subjects/ subject_test /experiments/session1/reconstructions/session1_recon_0343/resources/NIFTI/files/0343.nii" -l /localpath/0343.nii
I executed the command line one by one,and all the command lines were executed successfully except the last one.The error information shown below.
Rick,
Thank you very much for your reply , Is there some document to describe the ways on how to run the pipeline and make it a snapshots ?
Also , can Xnat deal with the NIFTI image now ? ie, to make snapshots for those NIFTI file and transfer them to image files as well ?
Thank you very much .
" You can configure pipelines through the user interface then run the pipelines on data uploaded by XNAT."
zhang...@alu.fudan.edu.cn
BTW, I don't know why can not send mail to xnat_discussion<xnat_discu...@googlegroups.com> .it;s returned with below the error msg :