Scanning Instructions

From VISTA LAB WIKI

Jump to: navigation, search

Contents

[edit] General

Scanning can be quite a challenge .... good luck!

If you have any questions about safety or screening (for example, a potential subject has some atypical dental work), you should contact Anne Sawyer BEFORE scanning the subject: amsaywer@stanford.edu. You should also contact Anne if you run over your scheduled scan time or finish early so she can update the schedule. If you see a potential abnormality in the MR image, also send an email to Anne.

Emails to Anne should have the following information:

  1. Group ID
  2. Scanner (1.5T or 3T)
  3. Date of scheduled scan
  4. Time slot of scheduled scan (beginning & ending times)
  5. If regarding a potential abnormality: subject name, exam number, series number, image number of abnormality, short description

Shortcut to scanner schedule

[edit] Scanners

We currently use three scanners at the Lucas Center: one 1.5 Tesla scanner, mostly used for volume anatomy collection, and two 3 Tesla scanners. Separate pages have been set up, with scanner specific information in each:

[[1.5T]] is the anatomy scanner, and is not used that often.

3T Number 1 is the scanner we use most often. It has a calibrated display, and several coils.

3T Number 2 is a new scanner up and running at the Lucas Center. It is located on the ground floor of Lucas Center, near the stairwell that leads down to the 3T #1.

[edit] Prepping the Scan

[edit] Consent and Preparation Forms

All subjects are required to fill out a consent form and a pre-examination screening form, which is the white with green title text boxes on the clipboard in the control room. Lab members can add their signature and date to their existing consent form; scan subjects not from the lab should sign 2 consent forms: one copy for the lab, and another for the subject to keep. We keep the pre-screening forms and consent forms for our records. Get consent forms: Human Subjects & Consent Forms

[edit] Equipment Setup

[edit] Computer

Set the computer up to the right of the scan terminal, and plug it in to the outlet. The computer has to be conected to three things: the monitor output, the button box, and scantrig.

Button Box: Connect the button box cable (large black box, usually near projector switches) to the usb port. Check that the button box is operating before you landmark the subject. Note that the keys stick sometimes, and sometimes matlab has problems getting the USB input. Test out the inputs while running matlab before continuing.

Keyspan/Scantrig: Connect keyspan device to USB port of the computer (it's located in the laptop bag, and has a USB port on one side, and serial ports on the other. Connect the serial connection (labeled "scan trig", located by the audio box) to the number 1 keyspan port (or the one with the big check mark).

We have two keyspan devices, but they've been acting funny lately (early 2006) on the old KGS laptop. Some folks in the Wagner lab graciously let us use theirs from time to time; make sure you have permission before doing this though.

Visual Display: NOTE: Some recent measures are required on account of the KGS Silver Powerbook laptop being old and beat down. First, before you proceed with the instructions below, you need to connect the Mac laptop to an external monitor, turn it on so that you can see the second screen on the external monitor, THEN switch it to the projector cable. See below for further instructions:

Connect the VGA connector to the back of the laptop (for many Macs, this requires that Mac Proprietary Fascist Connector Format -> VGA converter thingy). Connect the VGA cable labelled 'To the Laptop' to this connector. Then, adjust the VGA boxes below the table such that the first says 'Laptop'. The small white NEC Multisync 1550V monitor next to the blank sony monitor for the old Mac (which is the 'Eprime computer') should mirror what's shown on the projector, and should therefore show the laptop's second screen. The laptop can be set to either mirror mode, or to output two separate monitors; two is better, as it lets you see the MATLAB command window while the subject sees the stimulus.

Note: You need to have the switch under the Eprime computer set to 'Laptop' **before** you start up the laptop, or else it will not detect a second monitor.

[edit] Projector

Turn the projector on. The button is on the top of the projector, and has to be held for a couple seconds to turn it on. As it turns on, you'll hear a fan start, this tells you it's warming up.

You may have to adjust the projector vertically and horizontally to make sure it lands on the viewing screen in the magnet bore. The entire projector slides left to right, and a knob on the plastic case will adjust it vertically.

Additionally, you will probably have to adjust the focus at some point(s) during the scan. This is done using another knob on the front of the projector.

TROUBLESHOOTING: Some things that can happen with the projector:

  • You see a blue-tinted or yellow-tinted image: check first the switch pointing to "Laptop" and ensure it's firmly in the right position; then check monitor cables, starting with the VGA adaptor plugged into the Mac;
  • You can't see ANY image from the projector, even though it's on, the monitor is showing something, and even if you switch the projector to different sources:

[edit] Subject Prep

  • Subjects should take off their shoes. There are small slippers if the subject doesn't have socks.
  • Subjects can always use hospital scrubs and tops, which are next to the bathroom. This is an easy way to de-metallize a subject.
  • All subjects must wear ear plugs. Ear plugs are in the right of scan room as you enter, on the top shelf. There are many options for ear plugs; we've found that different sets work for different subjects. The yellow cylinders seem to be a good general-purpose fallback (make sure you don't use the ones with holes down the middle -- those are for auditory experiments). There are also blue and orange, thinner ones, which are supposed to provide greater protection. For some subjects, these stay in place and work well; for others, they don't stay in as well.
  • Check carefully that subjects do not have anything metallic items on them such as jewelry, coins, piercing, knives, credit cards, etc. before they enter the scanner room. It's a good thing to quiz them, many subjects will forget an item here or there.
  • Subjects should go to the restroom before the scan.

[edit] Logging in to Scan Terminal

  1. First, make sure that you're in scanner mode. If you're not, click the scanner icon in the upper-left corner of the display.
  2. End the previous exam is necessary (click End Exam in the Rx Manager at the left part of the screen and click Confirm.
  3. Click New Patient.
  4. In the patient position area, enter the following statistics:
    • Patient ID: K. GrillSpector xxx (xxx are your initials).
    • Patient Name: subject's full name .
    • Weight: subject's weight.
    • Exam description: brain dob mm/dd/yyyy (date of subject's date of birth)
      • NOTE: you also fill in the date of birth in a separate field, but need to repeat this information in the text box for "exam description", otherwise it will make the Lucas folks unhappy
  5. Protocol Selection (schematic representation of human body)
    • Protocol set to Site (not GE).
    • Click the head of the body schematic (protocols will appear).
    • Select appropriate protocol (make sure it has the right coil selected)
    • Click the head of the body schematic (protocols will appear).
    • Accept.

[edit] Landmarking and Sending the Subject In

Make sure the subject is completely de-metalized and that they are wearing earplugs.

Have the subject climb onto the bed and position them appropriately in the scan cradle/coil setup. Once they are comfortable, use foam pads (available in the scan room) around their head to minimize head movement. Figure out with the subject how much pressure and what location of the pads is optimal.

Subjects should probably adjust the mirror to ensure that they can see from the current position, but do not tighten the mirror immediately.

Press the 'Align on' button on the scanner itself, which will illuminate the alignment lights. Use the positioning buttons on the side of the scanner to move the subject until the alignment lights land in the middle of the subjects brow (this may be different for specific scans, but unless you know it's supposed to be different, this is a good bet). Press the 'Landmark' button on the scanner.

   Note: Make sure to press 'Advance to scan' not just 'in', since eventually, this can send the bed    
   so far back that the mirror will crack on the bore as it narrows. 

Have the subject re-adjust the viewing mirror, and hand them the button box and squeeze bulb. Send them into the bore by pressing 'Advance to Scan'. Hand them foam pads for placement under their elbows. At this point, it might be useful to check the focus of the projector.

Turn off the lights in the scan room.

[edit] Anatomicals

In the jargon of the GE software, a scanning session is called an "exam". The exam starts when you typed in the subject info above, and ends when you select the "End Exam" button. The exam contains a number of "series", which are sets of anatomical and functional scans. When you loaded a protocol file (by clicking on the head icon, and selecting from the list), you loaded a set of pre-saved series, which you can run and/or edit. The series are listed in the listbox to the lower left of the screen.

Usually the first series you run is a localizer, or scout, anatomy, to check the general position of the subject's brain. The default localizer for most protocols is the "3-plane" localizer, which gives 9 slices of axial, sagittal, and coronal images, and takes a minute or two. Edit the 3-plane by double-clicking on its entry in the listbox, or clicking once and pressing the 'View Edit' button. Then pres the 'Download' button to the left(you usually don't need to change any of the settings); this will send the series to the scanner. Inform the subject that the localizer is coming. Press the Scan button. This automatically does a prep scan beforehand, which is the set of sounds right before the main scan: the scanner is sending test pulses to determine things like which gain to set its receivers and transmitter. (When it pops up a message like:

R1: 110 R2: 125 TG: 14

That's reporting the relative gain levels on receivers 1 and 2, and the transmit gain. Normally you don't need to worry about all this, but for technical troubleshooting this can be useful).

After the localizer, different anatomicals are run depending on the project. Some projects will have a high-resolution volume anatomy collected (if you're analyzing your data with BrainVoyager, this can be useful in aligning to a reference volume, because it can align the high-res images between sessions, then use header info to get the inplane-to-volume alignment). Other projects will directly go to prescribing inplanes. In all cases, you View Edit the relevant series, ensure the parameters are set OK, then Download and run.

[edit] Testing Inplanes

You can copy and past series in the listbox by selecting them and right clicking, then selecting 'Copy' and 'Paste' or 'Cut' and 'Paste'. A good time to use this is to run a test inplanes. When you have a prescription you think might be good:

  1. make a note of what the NEX parameter is set to.
  2. Set NEX to 1.
  3. Download and run this Inplane. This usually takes 20-30 sec.
  4. You'll get a grainy image that will give you a goodidea of if you covered the right part of cortex.
  • If it's good:
    1. Copy and Paste the series
    2. Edit the new series (it'll say 'INRX')
    3. Set the NEX back to the original number
    4. Ask the subject if the focus/position of the image is good. After you start the main inplanes, it'd be a good idea for them to avoid unnecessary talking, as that can cause head movements.
    5. Run the full inplanes.
  • If you need to move it: View Edit the second copied version and nudge it appropriately. Goto 10.

[edit] Functionals

When you're ready to run the functionals, select and View Edit the relevant series just like an anatomical. Then select the Graphic Rx Button, then find the Copy Rx button. This will provide you with a list of previously-scanned series, whose prescriptions can be copied. Note that the default format is 2D series: if it so happens that your inplanes aren't this format, select the 2D popup and select the relevant type (or All if you're not sure). Select the inplane series and click OK. Make sure you have copied the functional prescription to match your inplanes.

Close the Graphic Rx screen by clicking on the small x at top. Click on the UserCVs button. Ensure the following CVs (control variables) are set:

  • 1 nframes: should be the correct # of scan frames.
  • 2 manual trig: we generally use type 1, where the subject presses a button on the response box to start the stimulus, this sends a signal to the scanner (via the Keyspan device) to start scanning at the same time. We sometimes use 0, manual trigger, where pressing the 'Scan' button actually starts scanning. Some other labs will use 2, where the scanner tells the stimulus when to start; we haven't figured this out (though folks in the Boroditsky lab may be helpful at this).
  • 3 xfer data: this should be set to 31 for most purposes; it will use Gary Glover's recon code to make the P*.mag files at the same time as the P*.7 files.
  • number of extra shots: this is the number of frames in each functional scan that are thrown out before you get your raw data files. This is necessary because in each scan the scanner takes a few seconds to get up and running and producing a smooth gradient. We've used 8-16 seconds of this. You should factor this in to your stimulus beforehand.

Download.

Click on Prep Scan. There will be a 10-30 sec pre-scan.

Ensure that the following things have been done before starting the first scan:

  • The stimulus is up and ready and focused.
  • Any needless files in /usr/g/mrraw have been cleaned out, using clean_mrraw.

Start the first scan. If the subject is triggering, have him/her press the squeeze bulb when he/she is ready to start. Then press the Scan button. Wait until the Start Scan button stops shining blue, and the stop scan button is shining white. Then tell the subject to trigger the scan. You have a 30-sec window for them to trigger, or you'll need to press Scan again.

If you're manually triggering the scanner, you'll need to time the stimulus start with the functional start. Having someone to help can, and counting of to three, can be useful. Note there can be up to a 1-2 sec delay with the scanner sometimes, though (annoyingly).

[edit] Running a Screen Save

While your're running the functional scans, you should have time to make an image showing your prescription for the day. Click on the Browser button to the left: of the six large buttons in the upper left panel, it's the third across with the monitor and tiny brains. If you're shown a random MR image or images, select the "Browser" button in the left panel. This will give you a dialog box with a list of exams run at the scanner. Select the top one, which should be the current exam with the relevant subject name. Then select the series you prescribed off of: the localizer or volume anatomy or what have you. Then press the "Viewer" button to the right.

You will be shown a full screen image from the series you prescribed off of. If you see multiple images at once, click on the Format button in the left panel, and select the single-image format. Then, in the text box at the lower left-hand side, type the command:

<type> xr s # </type>

Where # is the number of the inplane series you're using. E.g., if you did a localizer, volume anatomy, then inplane, then type "xr s 3". The prescription should appear as a set of dashed blue lines. Press the 'Screen Save' button. Go back to the Browser, and wait a few seconds. The screen save image should appear in series 99. You can take a number of screen saves; they are all saved to series 99. They can be useful if you do things like manual alignments.

[edit] Printing the screen

While viewing a screen save (or in general), you can print at the scanner console by pressing the Print Screen button. A dialog will pop up; press Print. You can also export to a .tiff file by pressing the TIFF button. At the Lucas 3T suite, the printout comes out the printer just outside the control room, across from the transfer machine.

[edit] Check that functionals are ok

After the P.mag file has been created please check that the slices look ok.
click on the tools button (the one with the hammer on the top left) and then on the bottom of the window that opens press cshell. this will give you an oldies style terminal
In cshell cd to /usr/g/mrraw type: ls -lt | more
to see a list of the Pfile and get the number of your Pfile.
expandonefile -f 1 Pxxxx.7.mag filename nslc nframes npix
mdisp filename.*

arguments:
xxxx Pfile number
filename output filename
nslc number of slices
nframes number of frames
npix matrix size ( usually 64; if you are using the hires scan will be 128 or the next power of 2 that is bigger or equal to the Freq.)

You can also type dodisp [run#] to see the first functional image. [run#] is the 5-digit run number (e.g. 51200).


[edit] Data Transfer

Data transfer is now handled through the PC in the magnet suite, on the desk outside of the control room. Instructions can be found on the side of the computer, but transferring files includes:

[edit] Transferring Anatomical Files

First, transfer the anatomical files to the desktop machine. This is accomplised using the Get11 program, which is located on the desktop. Start the program, and then click 'Get Exams'. Select the exam you just scanned from the list of exams, and then click 'Get Series'. Select the Series you want to download (such as the 3pln, Sagittals, Inplanes, and Screen Save), and then download them to the computer. They'll download to a folder called Scratch, which can be found through the desktop or in My Documents.

From here, you have to transfer the files to Moach. To do this, open up SecureFX, and create a connection to Moach. There should already be a saved session for Moach, but it might have the wrong username. If it does, create a Quick Connection, and use the following settings: SFTP, moach.stanford.edu, and enter whatever your moach username will be. It will prompt for a password, enter this, and then connect.

Currently, we are storing data in RAID3/mri. You either cd to RAID3, and then to mri, if you have the links setup, or type 'cd /biac3/kgs5/mri/'. Create the session directory, using the name 'MMDDYYsi', where si is subject initials. Change to this directory, and then create the following directories:

/Raw/
/Raw/Anatomy/

Put the anatomy files in /Raw/Anatomy/.

[edit] Transferring Functional Files

There are instructions about this printed near the Dell computer where the transfers happen. This is the computer outside the console room and to the left, as you are facing the magnet suite.


1. Open SecureFx, and open a connection to lcmr3 (/usr/gvx/mrraw/)
2. Open another connection to the desired off-site computer (e.g., moach)

  • You can try to select a connection that has already been created, but if this doesn't work because it is expecting a different user, you can always start a new connection.

3. Simply drag the desired files from lcmr3 to the other computer

  • Each functional scan usually creates four associated files (E, P.7, P.mag, P.hdr)
  • You can transfer these as soon as the scan is finished, without needing to finish the entire session. In fact, this is a good idea, because the next person scanning after you can do clean_mrraw when they start the scan which will delete all of your files from the scan

[edit] Transferring Functional Files using rsync

There are command line alternatives to transferring with SecureFx that may be smarter or more efficient. Kendrick likes using "rsync" since it ensures that all files are synced between the source (your scan directory on the Dell in Lucas Center) and destination (your scan directory on Biac). Here are Kendrick's notes for using rsync:

rsync -av XYZ user@server:"/path/to/dir/"

this copies XYZ to the remote server and puts it inside /path/to/dir/. note that XYZ can be a file or directory or even a wildcard expression.

for example:

% on Lucas center machine, open terminal and type:
cd /data/Scratch/5270_10102010
rsync -av * knk@white.stanford.edu:"~/multiclass/HH20101010/Raw/Anatomy/"

-a means archive mode (so it preserves many things like dates, owner, etc.)
-v means verbose

rsync is smart in that it will synchronize files and directories (and thus will copy only the files that need to be copied.) so, you can issue the same rsync command multiple times and it will do the smart thing.

rsync -av user@server:"/path/to/XYZ" .

this copies XYZ to the current directory.

if you use the "--delete" flag, like "rsync --delete ...", this will delete files from the remote destination if necessary to achieve synchronization. this is dangerous. if you don't specify the flag, then extra files on the remote destination that may exist are not touched.

if you use the "-n" flag, like "rsync -n ...", this will not actually transfer any files. this is useful to make sure that the command you are about to run will not totally screw everything up.

note that you don't have to use rsync over an ssh connection. you can rsync local files and local directories!

[edit] Post Scanning

[edit] Paperwork

Ask the subject to fill out an exit form, and leave this form in the wall-mounted bin in the console room. Don't forget to bring the pre-screening and consent forms back with you, since we keep these for our records. They can both be filed together in the 3T consent form file folder in the filing cabinet in Rm 457.

[edit] Reconstructing P*.7 into P*.7.mag files offline

Gary changes the recon scripts intermittently, so saved recon scripts don't always work. But recent versions of the key files -- grecons, which changes P*.7 into P*.7.mag files, or writeihdr, which creates E*.7 header files -- are available in /biac1/kgs/dataTools. The function 'reconOffline' in the mrVista toolbox calls these with proper flags, so you may want to consult that. Or check the next section for shorthand...

[edit] General Reconstruction

After acquiring the most recent grecons and writeihdr code you can recon using the following steps:

[edit] 2D data

Step 1: grecons.lnx -O Pxxxxx.7 (that's a capital -O as in "October" - this step generates a .mag file)

Step 2: writeihdr Pxxxxx.7 (generates .hdr and E-files)

[edit] 3D-spiral data

For this step you'll need the most recent 3dcode script from Yanle / Gary...or see /biac1/kgs/dataTools.


Step 1: 3dcode Pxxxxx.7 temp_file_name (generates a file similar to 2D raw data)

Step 2: grecons.lnx -O temp_file_name (generates a .mag file with name of temp_file_name.mag)

Step 3: mv temp_file_name.mag Pxxxxx.7.mag (renames the .mag file to the standard convention)

Step 4: writeihdr Pxxxxx.7 (generates .hdr and E-files)

[edit] Lucas Center fMRI Utilities

Gary also keeps some downloadable fMRI utilities for dealing with Lucas Center files such as P*.7 or P*.7.mag files. makevols converts mag files into analyze format; makebriks converts them into AFNI briks.

[edit] Useful Info

Report a problem at the scanner

  • if "log is full" or "cache is full" at the 3T#1, please report on website above and open a Cshell and enter "df" and print a copy for Anne

Statistics for the lab members
Create a Subslice prescription
Make a bite bar
Magnet_Safe_Glasses
Run a phantom

[edit] Troubleshooting

If the computer interface crashes and you would like to reset the computer:

  • Open the cabinet to your right to get to the computer tower and power it down.
  • Turn the computer back on and login. Login name: sdc, Password: $*30Tesla. The startup screen will instruct you to wait at least 15 minutes while it boots up. If you have a subject inside the scanner, tell them it will take about 10 minutes to set-up the computer. You will have to re-landmark once the computer is back up.
  • Once the computer is back up, on the left panel in the middle of the screen, click Scan Modes. Make sure it is set to Research and not Clinical. Hit Accept.
Personal tools