This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get a session | |
http --auth admin:minda --session=admin xnat164.xnat.org/data/projects | |
# Create the reconstruction and resource folder | |
http --session=admin PUT xnat164.xnat.org/data/archive/projects/prj001/subjects/prj001_001/experiments/prj001_001_MR2/reconstructions/prj001_001_MR2_recon_001 xnat:reconstructedImageData/type==RECON_A | |
http --session=admin PUT xnat164.xnat.org/data/archive/projects/prj001/subjects/prj001_001/experiments/prj001_001_MR2/reconstructions/prj001_001_MR2_recon_001/resources/NIFTI format==NIFTI | |
# Upload NIFTI and JSON to the reconstruction resource | |
for SERIES in t1_mpr_1mm_p2_pos50_20061214091206_4 t1_mpr_1mm_p2_pos50_20061214091206_5 t2_spc_1mm_p2_20061214091206_6; do | |
http --session=admin PUT xnat164.xnat.org/data/archive/projects/prj001/subjects/prj001_001/experiments/prj001_001_MR2/reconstructions/prj001_001_MR2_recon_001/resources/NIFTI/files/${SERIES}.nii.gz inbody==true < ${SERIES}.nii.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Change 'xnat' to the database user that owns the XNAT tables. | |
-- You need to stop Tomcat before running this query. | |
SELECT drop_user_views('xnat'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dpham@ipg-radiology:~$ xnatimport http://cnrmimages.ninds.nih.gov radiologics /data/cnrmimages/images/test Test | |
Setting work folder to /home/dpham/xnat/20160905191242. | |
radiologics is sending data for subject in /data/cnrmimages/images/test to project Test on the server http://cnrmimages.ninds.nih.gov | |
Enter host password for user 'radiologics': | |
Found session SUBJECT_02_MR03 in folder /data/cnrmimages/images/test/SUBJECT_02 | |
Committing session to /data/prearchive/projects/Test/20160905_191248631/SUBJECT_02_MR03 | |
Found session SUBJECT_02_MR02 in folder /data/cnrmimages/images/test/SUBJECT_02 | |
Committing session to /data/prearchive/projects/Test/20160905_191259072/SUBJECT_02_MR02 | |
Found session SUBJECT_02_MR01 in folder /data/cnrmimages/images/test/SUBJECT_02 | |
Committing session to /data/prearchive/projects/Test/20160905_191310101/SUBJECT_02_MR01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00000000: 7573 6572 6e61 6d65 4077 6f72 6b73 7461 username@worksta | |
00000010: 7469 6f6e 207e 2024 2073 7368 2073 6572 tion ~ $ ssh ser | |
00000020: 7665 720a 4c61 7374 206c 6f67 696e 3a20 ver.Last login: | |
00000030: 5361 7420 5365 7020 2033 2031 343a 3034 Sat Sep 3 14:04 | |
00000040: 3a30 3820 3230 3136 2066 726f 6d20 3130 :08 2016 from 10 | |
00000050: 2e32 302e 3530 2e38 380a 0a1b 5d31 3333 .20.50.88...]133 | |
00000060: 373b 5265 6d6f 7465 486f 7374 3d75 7365 7;RemoteHost=use | |
00000070: 726e 616d 6540 7365 7276 6572 2e68 6f73 rname@server.hos | |
00000080: 742e 6564 751b 5d31 3333 373b 4375 7272 t.edu.]1337;Curr | |
00000090: 656e 7444 6972 3d2f 686f 6d65 2f75 7365 entDir=/home/use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<DisplayField id="WORKSHOP_BIOSAMPLECOLLECTION_PROJECT_IDENTIFIER" header="WORKSHOP_BIOSAMPLECOLLECTION ID" visible="true" searchable="false" data-type="string" xsi:type="SubQueryField"> | |
<Content type="sql">workshop_biosamplecollection_project_id</Content> | |
<HTML-Link> | |
<SecureLink elementName="workshop:biosampleCollection"> | |
<securityMappingValue displayFieldId="PROJECTS" schemaElementMap="workshop:biosampleCollection/sharing/share/project"/> | |
<securityMappingValue displayFieldId="PROJECT" schemaElementMap="workshop:biosampleCollection/project"/> | |
</SecureLink> | |
<Property name="HREF" value="@WEBAPPapp/action/DisplayItemAction/search_value/@Field1/search_element/workshop:biosampleCollection/search_field/workshop:biosampleCollection.ID/project/@Field2"> | |
<InsertValue id="Field1" field="EXPT_ID"/> | |
<InsertValue id="Field2" field="@WHERE"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shut down Tomcat if it's running. | |
[[ $(sudo service tomcat7 status) == *running* ]] && { echo Tomcat 7 is running, shutting it down.; sudo service tomcat7 stop; } || { echo Tomcat 7 is not running.; } | |
# Sleep for a couple seconds just to make sure it's done. | |
sleep 2 | |
# Clear the database and recreate it. | |
psql -lqt | cut -d \| -f 1 | grep -qw xnatdev | |
[[ $? == 0 ]] && { echo Dropping existing database xnatdev...; dropdb xnatdev; } || { echo Database xnatdev does not exist.; } | |
echo Creating new empty database xnatdev. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def get_nifti_resource_id(json): | |
result_set = json['ResultSet'] | |
if result_set is None: | |
return | |
result = result_set['Result'] | |
if result is None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feb 04, 2016 7:35:50 PM javax.jmdns.impl.constants.DNSRecordClass classForIndex | |
WARNING: Could not find record class for index: -1 | |
Feb 04, 2016 7:35:50 PM javax.jmdns.impl.DNSIncoming$MessageInputStream readName | |
SEVERE: bad domain name: possible circular name detected. Bad offset: 0xffffffff at 0x2d | |
Feb 04, 2016 7:35:50 PM javax.jmdns.impl.constants.DNSRecordType typeForIndex | |
SEVERE: Could not find record type for index: -1 | |
Feb 04, 2016 7:35:50 PM javax.jmdns.impl.DNSIncoming readQuestion | |
SEVERE: Could not find record type: dns[query,158.255.6.220:36002, length=47, id=0x0, questions=10990 | |
questions: | |
[DNSQuestion@1096711572 type: TYPE_IGNORE index 0, class: CLASS_UNKNOWN index 0, name: ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/exports: the access control list for filesystems which may be exported | |
# to NFS clients. See exports(5). | |
# | |
# Example for NFSv2 and NFSv3: | |
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) | |
# | |
# Example for NFSv4: | |
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) | |
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# If you're on Ubuntu/Debian or a different version of Tomcat, you'll need to change this path. | |
cd /usr/share/tomcat6/webapps/xnat/WEB-INF/lib | |
wget -O standard-1.1.2.jar http://search.maven.org/remotecontent?filepath=taglibs/standard/1.1.2/standard-1.1.2.jar | |
wget -O jstl-1.2.jar http://search.maven.org/remotecontent?filepath=javax/servlet/jstl/1.2/jstl-1.2.jar |