Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Pyxnat 0.9.3

    Download button

    No screenshots available
    Downloads: 404  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Yannick Schwartz | More programs
    BSD License / FREE
    February 29th, 2012, 07:07 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Pyxnat description

    Xnat in Python

    Pyxnat is a simple Python library that relies on the REST API provided by the XNAT platform since its 1.4 version. XNAT is an extensible database for neuroimaging data. The main objective is to ease communications with an XNAT server to plug-in external tools or python scripts to process the data. It features:

     1. resources browsing capabilities
     2. read and write access to resources
     3. complex searches
     4. disk-caching of requested files and resources

    [1] http://www.xnat.org/
    [2] http://packages.python.org/pyxnat/

     A short overview

     Setup the connection

     >>> from pyxnat import Interface
     >>> interface = Interface(server='http://central.xnat.org:8080',
     user='login',
     password='pass',
     datastore=os.path.join( os.path.expanduser('~'),
     'XnatStore'
     )
     )


     Browse the resources

     >>> interface.projects()
     [u'CENTRAL_OASIS_CS', u'CENTRAL_OASIS_LONG', ...]


     Create new resources

     >>> interface.project('my_project').create()
     >>> interface.project('my_project').file('image.nii').put('/tmp/image.nii')


     Metadata support

     >>> proj = interface.project('my_project')
     >>> proj.attrib.keys()
     ['note','alias','secondary_ID','name','pi_lastname',
     'label','keywords','pi_firstname','ID','description']
     >>> proj.attrib.set('note', 'a note')
     >>> proj.attrib.get('note')
     'a note'


     Make complex searches

     >>> search = interface.search( 'my_search',
     [ ('xnat:subjectData/SUBJECT_ID','LIKE','%'),
     ('xnat:subjectData/PROJECT', '=', 'my_project'),
     'AND'
     ]
     )
     >>> search.get_subjects()



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    Python Xnat | Python library | REST API | Xnat | Python | library

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM