Skip to content

AFNI and NIfTI Server for NIMH/NIH/PHS/DHHS/USA/Earth

Sections
Personal tools
You are here: Home » AFNI » Documentation » Tutorials » Classroom Setup » tutorial-all-pages

Classroom Setup

Document Actions

Note: This is the print view with all the tutorial pages on one page. The paginated version is available here, if you prefer that.

Details of classroom setup. Largely based on the experiences of the SSCC in AFNI Bootcamp.

What You Need

The basic ingredients.

Classroom

Computers

  • CIT provides laptops.

  • 2 persons per computer.

Teacher(s)

AFNI/SUMA Binaries

Sample Data

Class Handouts

Students

Extra Hardware

  • In addition to the basic ingredients we always bring:
  • A Portable PA System, simliar to the one shown here. It helps the people in the back.
  • A mini projector. Some presentations require two displays.

What To Do

How to setup your computers.

If you have made it this far then you probably have a date, a time, a classroom, some students, and one or more teachers to teach AFNI. Now you need to setup your computers. Here are the steps.

1. Create User

  • The first thing to do is create a generic user account on your system preferably with a password that is easy to type. You don't want to spend 15 minutes walking around the class and helping people type "4FN1isC00L" just to get started. You also don't want to walk around and login to every workstation. We write the password in huge letters on the classroom whiteboard.
  • Unfortunately adding users is beyond the scope of this document. If you aren't familiar with the process, contact a system administrator or unix geek in your group. I will only give a brief overview here:
    • We create a normal user called "user" with the password "afni123" and no administrative privileges.
    • In Linux, the commands (run as super-user) look like this:
[root@foo ~]# adduser user
[root@foo ~]# passwd user
Changing password for user user.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
    • There are also graphical programs to administrate users in Linux.
    • In Mac OS X:
      • Click on: Finder -> System Preferences -> Accounts -> Click the lock to make changes -> +
        • Enter these fields:
        • Name: user
        • Short Name: user
        • Password: afni123
        • Confirm: afni123
      • Click on: Finder -> System Preferences -> Quit System Preferences.

2. Change Shell

  • Once you have created a user you should change the user's shell to "tcsh". Again, that is beyond the scope of this document, but here is an overview:
    • In Linux, one way would be to run the "chsh" program.
      • This has the advantage of being simple, but the disadvantage of using the default editor "vi", which may confuse some people.
      • A possible solution is to set the EDITOR environment variable to another user friendly editor like nedit then run "chsh", shown in Mac OS X here but the idea is the same:
afni_classtest.png
    • In Linux, another way would be to edit the /etc/passwd file with your favorite text editor.
      • Find the line with your user on it and change "/bin/bash" to "/bin/tcsh".
      • It will look something like this before:
user:x:517:518::/home/user:/bin/bash


      • and this after:


user:x:517:518::/home/user:/bin/tcsh

    • In Mac OS X:
      • Click On: Finder -> Applications -> Utilities -> Netinfo Manager -> users -> user -> Click the lock to make changes -> shell ->
      • Edit the "shell" field
      • Change "/bin/bash" to "/bin/tcsh"
      • You can also use the "chsh" program to change your shell in Mac OS X (as shown above).

    3. Install Binaries

    • There are many ways to accomplish this, the process is explained in detail in‚ HowTo #00.
    • For now I'll explain the simplest case:

    tar -zxvf linux_gcc32.tgz

    mv linux_gcc32 abin

    4. Install Sample Data

    • Essentially you want to download the Sample Data files and extract them in the user's home dir. In addition we have some scripts that may help you with this process.
    rm -rf AFNI_data1
    rm -rf AFNI_data2
    rm -rf suma_demo
    rm -rf std_meshes
    rm -rf dicom

      • Install latest data:
    tar -zxvf AFNI_data1.tgz
    tar -zxvf AFNI_data2.tgz
    tar -zxvf SUMA_demo.tgz
    tar -zxvf SUMA_StandardMeshses.tgz
    tar -zxvf dicom.tgz

    5. Install Dot Files

    These are the hidden system files that allow you to customize your environment to run AFNI. They should go in the user's home directory.

    6. Optionally use the AFNI Bootcamp CD

    In order to streamline the above process you can use our install CD to automate steps 4 & 5.
    Unfortunately the process of burning a CD is beyond the scope of this document, but here is an overview:

    In a subdirectory of the data directory we keep a CD directory that contains all of the data and dotfiles mentioned above, as well as three shell scripts to automate the installation process. There is also a compressed archive of the CD directory located in the data directory.

    Assuming you have transferred the contents of the CD directory or CD.tgz to a CDROM, then do the following:

    • login as your afni user
    • mount the cdrom (sometimes done for you automatically by autofs in linux)
    • mount /mnt/cdrom
    • run s1.rm.old.data ~
    • run s2.cp.data /mnt/cdrom ~

    Note: the dicom.tgz package is not included with the CD package (as it would exceed the CD size limit).



    7. Configure Ownership and Permissions

    • It's always a good idea in UNIX (when doing things as the super-user) to make sure your user "owns" everything that he or she should own (ie. has the appropriate ownership and permission settings for his or her files).
    • To that end you should issue a global-set-ownership command when you are finished installing the binaries and data.
    • Something like:


    chown -R user:users /home/user

    This command recursively changes the owner and group of /home/user to user:users (user: user ; group: users).

    8. You might be done

    If everything went ok you are done, time for testing.

      What To Test

      Once you have finished everything else

      At this point you have probably installed the AFNI/SUMA Software and AFNI/SUMA Sample Data  on  at least one of your classroom computers. You should now verify that everything works properly. Here are some tips to check everything from basic to advanced functionality.

      Basic

      • Check to make sure the AFNI user is configured correctly.
        • Make sure that the AFNI user's shell is tcsh:
      [user@elrond ~]$ echo $shell
      /bin/tcsh
        • Make sure that the AFNI binaries directory is in your path:

      [user@elrond ~]$ echo $path
      /bin /usr/bin /usr/local/bin /usr/X11R6/bin /home/user/abin
        • Make sure that the AFNI binaries and data are in the AFNI users's home directory.

      [melkor:~] user% ls
      AFNI_data1      Desktop         Movies          Public          std_meshes
      AFNI_data2      Documents       Music           Sites           suma_demo
      CD              Library         Pictures        abin

      Medium

      • Check to make sure that AFNI runs on command
        • Change the current working directory to one that contains AFNI Sample Data and run afni.
      cd AFNI_data1/afni
      afni &

      Advanced

      • Establish a talk connection between AFNI and SUMA.
        • cd suma_demo/afni
        • afni -niml &
        • ./run_suma &
        • With the mouse focus on SUMA's window, which should be showing you a surface, hit the 't' key on the keyboard.
        • That will send surfaces over to AFNI. In AFNI, click on Image (Axial) and make sure you see blue contours on top of the anatomical image.
        • At that point, we know that AFNI and SUMA are communicating properly.
      • Lastly, press the 'F12' key in SUMA for the speed test and let us know what the results are.
        • The surface will flicker 20 times and the speed report is printed in a pop window and the shell from which you launched SUMA.
        • Usable speeds are of 4 displays per second. Top speeds are around 34.

      Optionally Test with the AFNI Bootcamp CD

      We use the s3.test script from the AFNI Bootcamp CD to test our installations. To test with s3.test:

      • login as your afni user
      • mount the AFNI Bootcamp CD (as described earlier)
      • Run s3.test
      • Perform the steps described in the Advanced section to establish a connection between AFNI and SUMA
      • It should look something like this:

      afni_classtest.png

       

      Powered by Plone

      This site conforms to the following standards: