Skip to content, Skip to search

Changes

BigWarp

3,278 bytes added, 11:17, 7 November 2019
remove outdated command
Open two images in ImageJ, one ''moving'' and the other ''target'' and navigate to ''Plugins {{arrow}} BigDataViewer {{arrow}} Big Warp.'' A dialog will appear prompting selection of the moving and target images.
Once the two image windows and one table window open, press {{key press|Spacebar}} to enter "landmark mode". Next, click on a point in the moving image, then click on the corresponding point in the target image. After you have a few moving-target point pairs, press {{key press|T}} to transform the moving image (you may need to re-navigate if the two image are very far apart: see the {{key press|Q}} and {{key press|W}} hotkeys below).
=== Getting Help ===
| style="padding: 5px;" | <''Landmark mode''>+{{key press|Ctrl}}+{{key press|left-click}}
| style="padding: 5px;" | "Pin" a point. Add a landmark at the same location for both moving and target images.
|-
 
| style="padding: 5px;" | <''Landmark mode''>+{{key press|Ctrl}}+{{key press|Shift}}+{{key press|left-click}}
| style="padding: 5px;" | Place a point in the "other" space. Place a moving landmark from the fixed window, and vice versa.
|-
| style="padding: 5px;" | {{key press|Ctrl}} + {{key press|Z}}
| style="padding: 5px;" | {{key press|Esc}}
| style="padding: 5px;" | Deselect all rows.
|-
| style="padding: 5px;" | <''Landmark mode''>+{{key press|left-click}}
| style="padding: 5px;" | Removes one landmark.
|-
| style="padding: 5px;" | {{key press|right-click}} {{arrow}} Delete
* If the selected row is not missing a landmark, the next click will add a new landmark pair.
* If multiple rows are selected when a viewer is clicked, the result will be as though only the first row was selected.
 
=== Selecting transformation types ===
 
Press {{key press|F8}} to bring up a transformation type selection window
(version 4.0.0 of BigWarp supports multiple options for transformations)
 
{|
| [[Image:Bigwarp_selectTps.png|400px]]
| [[Image:Bigwarp_selectAffine.png|400px]]
|-
| Example of a thin plate spline transformation
| Example of an affine transformation
|}
 
==== Table of transformation types ====
{| border="1" style="border-collapse:collapse;"
| style="padding: 5px;" | Thin Plate Spline
| style="padding: 5px;" | The smoothest deformable transformation that maps moving landmarks exactly to the corresponding target landmarks.
|-
| style="padding: 5px;" | Affine
| style="padding: 5px;" | Linear transform with translation, rotation, independent scales and shear (12 degrees of freedom)
|-
| style="padding: 5px;" | Similarity
| style="padding: 5px;" | Linear transform with translation, rotation, and one scale parameter (7 degrees of freedom)
|-
| style="padding: 5px;" | Rotation
| style="padding: 5px;" | Linear transform with translation, and rotation (6 degrees of freedom)
|-
| style="padding: 5px;" | Translation
| style="padding: 5px;" | Translation only (3 degrees of freedom)
|}
=== Navigation and Visualization ===
0.1°.
=== Import Save and Export load landmarks ===
Landmarks can be exported and imported from plain text files using the drop down menu in the landmark table panel ( ''File {{arrow}} Export (Import) landmarks.'' )
 
=== Export warped images ===
 
Export the warped moving image by clicking ''File {{arrow}} > Export as ImagePlus'' or using the {{key press|Ctrl}}+{{key press|E}} keyboard shortcut.
[[Image:Bigwarp_export.png]]
The default parameters will result in the exported image having the same dimensions as the target image. ''Note: Take care when exporting very large data sets as they can cause out-of-memory exceptions.'' * Resolution** Target: ''The output will have the same resolution as the target image''** Moving: ''The output will have the same resolution as the moving image''** Specified: ''The output will have the resolution given in the fields below (in the same units as the moving and target images).'' * Field of view** Target: ''The output will have the same field of view as the target image''** Moving: ''The output field of view will be the smallest bounding box that contains the warped moving images (approximated)''** Specified (pixel): '' The output field of view will be that given by the Offset and Field of View parameter fields where both are in units of pixels''** ** Specified (physical): '' The output field of view will be that given by the Offset and Field of View parameter fields where both are in the physical units of the moving and target images''  The warped moving image can be exported as an in-memory or [http://imagej.net/docs/guide/146-8.html virtual] ImagePlus. A virtual ImagePlus is generally faster to generate but slower to browse,whereas an in-memory ImagePlus will be slower to generate but faster to browse.  [[Image:BigwarpLandmarkCenteredExport.png|600px]]
The exported image will have the same dimensions as the target image.
''Note: Take care when exporting very large data sets as they can cause out-of-memory exceptions.''
=== Apply transforms ===
==== Warp 2d ImageJ ROIs ====
Download and install [https://githubraw.githubusercontent.com/saalfeldlab/bigwarp/blob/master/scripts/Apply_Bigwarp_Xfm_IjRoi2d.groovy this script].
Usage:
{|
| [[Image:bigwarp_warp_roi_fwd.png|600px]]
| [[Image:bigwarp_warp_roi_inv.png|600px]]
|-
| Forward example (click to expand)
| Inverse example (click to expand)
|-
| [[Image:bigwarp_warp_roi_fwd.png|600px]]
| [[Image:bigwarp_warp_roi_inv.png|600px]]
|}
Note, at this time ImageJ ROIs are 2D objects. We recommend using another approach for 3D regions of interest.
 
==== Warp points in a csv file ====
 
Download and install [https://raw.githubusercontent.com/saalfeldlab/bigwarp/master/scripts/Apply_Bigwarp_Xfm_csvPts.groovy this script].
 
Usage:
# Run the script download-able above.
# Select the csv file that stores bigwarp landmarks.
# Select the csv file storing the points you want to transform.
# Select the location for csv file you want the results to be stored in.
# Indicate whether you want to transform the points from moving to target space or vice versa.
# Click OK.
 
Note the input csv must be formatted:
 
x1,y1,z1
x2,y2,z2
...
xN,yN,zN
 
 
without quotation marks, spaces, or any other characters. Csv files storing bigwarp landmarks will not work as input to this script.
= Tutorials =
Uploaders
83
edits