• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions! Dokkio, a new product from the PBworks team, integrates and organizes your Drive, Dropbox, Box, Slack and Gmail files. Sign up for free.

View
 

ImageJ Basics_TA_Use

Page history last edited by Kim Moore 7 years, 8 months ago

ImageJ Basics—For Professor/TA Use

 

To Install ImageJ:

            Go to: http://rsbweb.nih.gov/ij/download.html and download the program appropriate for the operating system that you are using.  Regardless of your platform, you will need to know whether the Java you are using is 32-bit or 64-bit.  (You can probably find this information on a Windows machine by looking in the hard disk, under the ‘Windows’ file, for the System folder (either ‘System32’ or ‘System64’) that contains the Java code.)  Follow the installation instructions generated by your computer or provided at the website (linked above) for your operating system. 

 

To Install the Proper Plug-ins:

            Go to: http://rsbweb.nih.gov/ij/plugins/index.html to see that available plug-ins.   You will need the Manual Tracking plugin (under “Stacks”).  (Here is the direct link: http://rsbweb.nih.gov/ij/plugins/track/track.html.)  To install this on your computer, you will need to click on Manual_Tracking.class and save it to the ImageJ Plugins folder—specifically, the Stacks folder.  (On a Windows machine, the following steps should work: Click on the Manual_Tracking.class link.  Save it.  Open the ‘Downloads’ folder and find the file.  Also open the ‘ImageJ’ folder (Computer/Program Files/ImageJ), the ‘plugins’ folder inside it, and the ‘Stacks’ folder inside that.  Drag the file from the ‘Downloads’ folder into the ‘Stacks’ folder.  Restart ImageJ.)

 

To Open an AVI file:

            Double click on the ImageJ icon or find ImageJ in your Program Files.  Once ImageJ is open, go to the ‘File’ menu and select ‘Import’, ‘AVI…’.  A new window will open.  In this new window, select the AVI file that you wish to open (e.g. ‘5umBeads_ 40X_Tilted.AVI’), and click ‘Open.’  A new window will appear.  In the new window, tick the ‘Convert to Grayscale’ and ‘Flip Vertical’ boxes, and then click ‘OK’.  The video should appear in a new window.  By clicking play, you should be able to watch the video on a loop.  You can also advance through the “Stack” of images in the video, frame by frame, by clicking on the right and left arrows surrounding the scroll bar across the bottom of the image.  Information about which frame of the stack you are viewing is located at the top of the image.

 

To Operate Manual Tracking:

            Once the Manual Tracking plugin has been installed and ImageJ has been restarted, you can use Manual Tracking to analyze the video you have opened.  To access the Manual Tracking, go to the ‘Plugins’ menu and select ‘Stacks’, ‘Manual Tracking’.  A new window will open.  For the output data to be usable, the appropriate Parameters need to be entered into the bottom portion of this new window.  These parameters will depend on the video that you are using.  The most important of these are ‘Time Interval’ and ‘x/y calibration’.  ‘Time Interval’ is the amount of time between adjacent frames.  ‘x/y calibration’ is the number of your unit distance per pixel (the inverse of the number of pixels per unit distance).  (For the 5umBeads_40X_Tilted.AVI video, the proper parameters are: ‘Time Interval’ = 0.5 sec, ‘x/y calibration’ = 0.2134 µm, and ‘Search square size for centring’ = 10.0 pixels.  All other parameters should be left alone.  Why is the NIH using British spelling conventions?)

 

            When you are ready to start tracking, make sure that the video is displaying the frame with which you wish to begin and then click ‘Add track’ in the Tracking window.  (If you wish to use the ‘Centring Correction’, tick the box to activate this option.  A local maximum is a white spot.  The centering correction chooses the coordinates of the most extreme pixel in the search size area around the location you have clicked.  The ‘Centring Correction’ must be re-ticked for each new object tracked.)  The parameters portion of the Tracking window will disappear (tick the ‘Show parameters?’ to make them reappear).  Move your cursor over the object you wish to track, select your location, and click on the object.  New windows will appear; the data window we want is titled: “Results from (your file name) in (your units of speed)”.  The first line of this window will show a -1 for Distance and Velocity, since these quantities cannot be calculated from a single data point.  The video window will have automatically advanced one frame.  To get the next data point, simply re-center the cursor on the object and click again.  The data will be logged and the stack will advance one frame.  Repeat this process until the stack is finished or until you choose to stop (if the stack is not finished when you choose to stop, click ‘End track’ in the Tracking window).  (You must track one object at a time.)  To track a new object, reset the video window to the frame with which you wish to begin and then click ‘Add track’ in the Tracking window (if using the ‘Centring Correction,’ tick this again, too).  If you make a mistake, an errant click, etc., you can use the ‘Delete last point’ or ‘Delete track no.’ buttons to remove the data.  If necessary, you can start over by clicking the ‘Delete all tracks’ option.

 

            When you have collected all the data you wish to collect, you can review your work by clicking the ‘Overlay Dots & Lines’ in the Tracking window.  A new window will open.  Click play in this window to see your work.

 

To Export Data to Excel: (and to understand the data recorded)

            When the data collection is finished, go to our data window (the data window we want is titled: “Results from (your file name) in (your units of speed)”) and use the menus either to:

  •       Option 1: ‘Edit’ → ‘Select All’ → ‘Ctrl’ + ‘C’ to Copy → Paste into an Excel file (you must add the column titles yourself), or
  •       Option 2: ‘File’ → ‘Save As…’ → Name the file what you will and click ‘Save.’ (It will save in Excel format with column titles.)

 

Note that the X and Y coordinates are given in pixels (with the upper, left corner of the image as the origin), but the Distance and Velocity have been converted into the appropriate units using the scale you gave in ‘x/y coordinates’.  Also note that this velocity is actually an instantaneous speed.  Proper evaluation of x- and y-motion can be accomplished by taking the raw X and Y pixel data and converting to x- and y-position data before calculating displacements and velocities.  The Slice No. can be used to determine the proper time within the video: slice 1 is zero time and slice 2 is one time interval later, etc.

 

Links to video files for downloading:

 

taxiscan_ax3_070808_reduced36mum.avi

5umBeads_40X_Tilted.avi

 

 

Comments (0)

You don't have permission to comment on this page.