Skip to content.

Software Requirement:

  1. Python 2.5.1
  2. PythonXML module
  3. sudo account

AIDB upload script checklist:

  1. Install Python on the linux/Mac platfor
  2. Install PyhonXML module, download it from http://sourceforge.net/project/showfiles.php?group_id=6473
    1. Untar file
    2. After the installation completes,
      1. set environmental variable PYTHONPATH to the directory that contains "_xmlplus"
      2. then start python interactive mode by typing >> Python
      3. type in >> import sys >> import xml >> import xml.xpath
      4. press return.

Upload data

  1. If you have a more updated version that downloaded from CVS, run

    >>./ReInstall.sh

    otherwise, run

    >> ./Install.sh

  2. Edit ConfigureSite file, to make sure all the entries are present. The entries should be similar to the following:
    ScriptInstallDir="/Users/me/aidb/uploader"
    Institution="loni"
    InstitutionID=7
    TempDIR="/Users/me/aidb/uploader/temp"
    DBHost="bcc-stage-00.nbirn.net"
    DBPort=1521
    DBInstance="hiddev"
    DBUser=""
    DBPass=""
    User=""
    UseCXOracle=0
    UserName=""
    HostString="bcc-stage-00.nbirn.net:1521:hiddev"
    HIDPRD=""
  3. Navigate to the installed directory, and run the following:
    1. Add protocol and subject group information to the database.
      ** Note: You should only ever have to do this once, unless the project setup file changes.

      >> sh AddExperiment2HID.sh

    2. Configure Scanners and Behavior Equipment you use for this phase of data collection.

      >> sh ScannerInfo.sh

    3. Create an image directory structure.

      ** Note: you need to make sure all the image data for a visit is available from a single directory tree.
      The root of this tree will have several subdirectories, each corresponding to an anatomical or
      functional scan. Inside each subdirectory should be the image data in whatever format your scanner
      produces.
      Example
      MRI study in DICOM format collectin a T1, T2, and a proton density image
      Image Directory Structure:
      /t1/*.dcm
      /t2/*.dcm
      /pd/*.dcm
      t1, t2, pd are arbitrary names we pick, you can use any name that is relevant to your experiment.

    4. Create an upload .xml file storing Subject and Visit information

      ** Note: Once you have created the image directory structure, create a new upload XML file for the visit you
      are uploading. You should base this on the file FBIRNSubject2007TE_Template.xml in the upload script
      directory. Do not change the "nameStandard" fields! Make sure to enter info for all fields, especially
      "sliceorder" and "discacqs". There are comments in this file to help you along. The template file is
      set up to do a "Local-SRB" upload, i.e. it will maintain a local copy of what it is uploading to the
      SRB. This is a good idea. If you absolutely don't have space, you can change this to "SRB".

    5. Add visit, segments, study, series information to database

      >> sh AddVisit2HID.sh SubjectVisit.xml

    6. Upload image data to SRB

      >> sh Upload.sh /Volumes/Supersize/BXD-exp/BXD (series must be under the bxd file)
      ../ImageWrapper.xml
      ../<temp directory>

FAQ

  1. Q. If you get the error: ImportError: No module named xpath after entering import xml.xpath when running python in interactive mode.

    1. You need to install PythonXML module. Make sure to set the enviornment variables PYTHONPATH to the directory that contains "_xmlplus".