Skip to content

ijtools/ijRotatedCrop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rotated Crop Plugin

Crop 2D/3D images with various bosx orientations.

The RotCrop Plugins for ImageJ allow to perform rotated crop of 2D/3D images. In fully manual versions, the crop can be defined based on crop dimensions, crop center, and rotation angle(s) of the crop frame (in 3D, three angles are necessary).

Additional plugins provides an estimate of the rotation based on the gradient vector computed around the crop frame center. The gradient direction is used as vertical direction in the result, making it easier to generate 2D/3D images that are tangent to a surface such as the epidermis of an organ or organism.

Application example of the “Rotated Crop (3D)” Plugin.

Installation

The plugin requires two additional libraries to work properly:

  • ijGeometry for computing the geometric transforms (at least version 0.3)
  • ijRegister used for interpolating within the 2D/3D images (at least version 0.2)

To install the library, simply copy the jar file corresponding to the latest release into the “plugins” directory of your ImageJ/Fiji installation. Put the jar files of the required libraries within the "jars" directory. Then restart ImageJ. The new plugins will be available within a new “Rot Crop” folder in the “Plugins->IJ Tools” menu.

Application example of the “Rotated Crop (3D)” Plugin.

Plugins usage

Rotated Crop Plugin

This plugins generates a new image by interpolating a 2D image along a rotated grid. The user can specify the following options:

  • the size of the box
  • the coordinates of the box center
  • the orientation of the box

Note that clicking on the image will update the coordinates of box center.

Rotated Crop Plugin (3D)

This plugins generates a new image by interpolating a 3D image along a rotated grid. The user can specify the following options:

  • the size of the box (along the three directions of the box)
  • the coordinates of the box center
  • the orientation of the box, as three Euler angle.

Note that clicking on the image will update the coordinates of box center. A preview can be obtained as three orthogonal slices corresponding to the median slices within the box. As the manual setting of the three angle may not be obvious, it is also possible to use the “Tangent Crop 3D” plugin.

Tangent Crop Plugin

This plugins attempts to automatically identify the “best” orientation of the box, by evaluating the image gradient around the box center, and aligning the first direction of the box with the local tangent.

The user can specify the following options:

  • the size of the box
  • the coordinates of the box center
  • the size of the neigborhood used for computing the gradient.

Tangent Crop Plugin (3D)

This plugins attempts to automatically identify the “best” orientation of the box, by evaluating the image gradient around the box center, and aligning the third direction of the box with the local normal. The two other directions are computed by trying to keep second direction of the box nearly aligned with the vertical.

Application example of the “Tangent Crop (3D)” Plugin.

The user can specify the following options:

  • the size of the box
  • the coordinates of the box center
  • the size of the neigborhood used for computing the gradient. Must be larger than the distance (in pixels) between the box center and the nearest boundary with large contrast.

A preview can be obtained as three orthogonal slices corresponding to the median slices within the box. Clicking the “Create Result Image” button generates a new 3D image.

About

Generate rotated crop images from 2D/3D images

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors