Cropper
Cropper in a nutshell.
Plugin to crop region of a stack;
This plugin is multichannel;
Python API reference:
bmiptools.transformation.geometric.cropper.Cropper
.
This plugin can be used to crop a specific region of a stack. When used inside a pipeline, it is better to apply this plugin as soon as possible, in order to reduce the computation resource needed for the application of the other plugins to a stack.
The Python API reference of the plugin is bmiptools.transformation.geometric.cropper.Cropper
.
Transformation dictionary
The transformation dictionary for this plugin look like this.
{'z_range': [None,None],
'y_range': [None,None],
'x_range': [None,None]
}
The plugin-specific parameters contained in this dictionary are:
z_range
: list specifying the two extrema for the cropping along the Z-direction,y_range
: list specifying the two extrema for the cropping along the Y-direction,x_range
: list specifying the two extrema for the cropping along the X-direction,
The ranges above have to be expressed according to the convention explained here (also for the
Z-axis). Further details useful the the usage of this plugin with the Python API can be found in the __init__
method of the class Cropper
.
Use case
The typical use of this plugin are:
Crop part of the input stack.
Application example
As example consider the slice of a stack of a biological sample obtained via cryo-FIB-SEM.
After cropping a square \(500 \times 500\) pixels in bottom-left part of the slice, the result obtained is given below.
.
Note
The script used to produce the images displayed can be found here. To reproduce the images showed above one may consult the examples/documentation_scritps folder, where is explained how to run the example scripts and where one can find all the necessary input data.
Implementation details
In case of stack with multiple channels, the Cropper is applied independently to each channel.