Skip to content, Skip to search

Changes

ImageJ2 Python Scripts

336 bytes added, 07:22, 16 November 2016
no edit summary
</source>
=== Crop an image ===
 
Crop a 3D stack given a top left point and the size of the crop for each dimensions.
 
<source lang='python'>
# @ImageJ ij
# @Dataset data
 
left_top_point = [17, 3, 1]
view_size = [9, 9, 1]
 
output = ij.op().transform().offset(data.getImgPlus(), left_top_point, view_size)
ij.ui().show("output", output)
</source>
== Resources ==
123
edits