Rodrigo Perea
unread,Jun 30, 2011, 5:17:54 PM6/30/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to xnat_discussion
So...I've been playing around the pipelines and I am trying to create
a test pipeline for segmentating my image. First I created a dcm2nii
conversion pipeline and successfully uploaded my niftii conversion
using the xnatrest client. Now, I want to get the uploaded file but I
am having some problems with the remote argument when I called my
XNATRestClient resource descriptor......any help?
Here is my step used to upload my NIFTI file in my dcm2nii XML
pipeline descriptor:
<step id="3" description="Upload files to XNAT" >
<resource name="XnatRestClient" location="xnat_tools">
<argument id="user">
<value>^/Pipeline/parameters/parameter[name='user']/values/unique/
text()^</value>
</argument>
<argument id="password">
<value>^/Pipeline/parameters/parameter[name='pwd']/values/unique/
text()^</value>
</argument>
<argument id="host">
<value>^/Pipeline/parameters/parameter[name='host']/values/unique/
text()^</value>
</argument>
<argument id="method">
<value>PUT</value>
</argument>
<argument id="remote">
<value>^concat('"/data/archive/projects/',/Pipeline/parameters/
parameter[name='project']/values/unique/text(),'/subjects/',/Pipeline/
parameters/parameter[name='subject']/values/unique/text(),'/
experiments/',/Pipeline/parameters/parameter[name='xnat_id']/values/
unique/text(),'/scans/',PIPELINE_LOOPON(series),'/resources/NIFTI/
files/',PIPELINE_LOOPON(series),'.nii?
format=NIFTI&content=NIFTI_RAW"')^</value>
</argument>
<argument id="local">
<value>^concat(/Pipeline/parameters/parameter[name='workdir']/
values/unique/text(),'/NIFTI/',PIPELINE_LOOPON(series),'/*.nii')^</
value>
</argument>
</resource>
</step>
Here is my step that I am trying to create for downloading my niftii
file. specifically I am having problems in the argument "remote". Is
there any more documentation on how the files are organized in the
remote host in the XNATRestClient?? I am a little lost here. Any XML
editors that might be useful?
<step id="1a" description="GET Scan NIFTII DATA">
<resource name="XnatRestClient" location="xnat_tools">
<argument id="user">
<value>^/Pipeline/parameters/parameter[name='user']/values/unique/
text()^</value>
</argument>
<argument id="password">
<value>^/Pipeline/parameters/parameter[name='pwd']/values/unique/
text()^</value>
</argument>
<argument id="host">
<value>^/Pipeline/parameters/parameter[name='host']/values/unique/
text()^</value>
</argument>
<argument id="method">
<value>GET</value>
</argument>
<argument id="remote">
<value>^concat('"/data/archive/projects/',/Pipeline/parameters/
parameter[name='project']/values/unique/text(),'/subjects/',/Pipeline/
parameters/parameter[name='subject']/values/unique/text(),'/
experiments/',/Pipeline/parameters/parameter[name='xnat_id']/values/
unique/text(),'/scans/',PIPELINE_LOOPON(series),'/resources/NIFTI/
files/','PIPELINE_LOOPON(series)/files?format=nii"')^</value>
</argument>
<argument id="redirect_output">
<value>^concat(/Pipeline/parameters/parameter[name='workdir']/
values/unique/text(),'/SPM_Seg/',PIPELINE_LOOPON(series),'/Seg_RAW')^</
value>
</argument>
</resource>
</step>