xmipp_transform_window (v3.0)


This program takes a region from the input images

But... what is windowing? Let's suppose we have an image 32x32, and we window it to 16x16, then the central part which contains this 16x16 square is returned, but if we window to 64x64 then the image is kept in the center of the final image and it is padded with 0's until the new size is reached (the padding value may be modified using --pad_value, --corner_pad_value or --average_pad_value).

With this idea in mind of padding or cutting, if you define two logical corners in the input image (the most negative -the top left in an image- and the most positive -bottom right in an image-) you can store the new image or volume generated by windowing with a square box.


-i, --input <input_file>
Input file: metadata, stack, volume or image.
--mode <mode=overwrite>
Metadata writing mode.
where <mode> can be:
  • overwrite Replace the content of the file with the Metadata
  • append Write the Metadata as a new block, removing the old one
--label <image_label=image>
Label to be used to read/write images.
-o, --output <output_file=>
Output file: metadata, stack, volume or image.
--oroot <root=>
Rootname of output individual images. Output image format can be set adding extension after rootname as ":ext".
for 2D-images: do not apply transformation stored in the header
--corners <...>
Windows corners (by default indexes are logical) 2D: 3D:
or --size <sizeX> <sizeY=0> <sizeZ=0>
Output dimension. The volume is windowed (expanded or cutted) in all directions such that the origin of the volume remains the same. If the Y and Z dimensions are not specified they are assumed to be the same as the X dimension.
or --crop <sizeX> <sizeY=0> <sizeZ=0>
Crop this amount of pixels in each direction. Half of the pixels will be cropped from the left and the other half from the right if only one is given, the other two are supposed to be the same
--physical ( requires --corners )
use physical instead of logical coordinates
--pad <padtype=value>
value used for padding
where <padtype> can be:
  • value <v=0> use this value for padding
  • corner use the top-left corner for padding
  • avg use the image average for padding

Examples and notes

Window a single image to 16x16, overwriting input image
xmipp_transform_window -i g0ta0001.xmp --size 16
Window a single volume to 32x64x64
xmipp_transform_window -i g0ta.vol --size 64 64 32
The same using logical indexes
xmipp_transform_window -i g0ta.vol --corners -32 -32 -16 31 31 15
Note that r0 and rF are not symmetric because the volume is of an even size, if we wanted to get a 33x65x65 volume, the right indexes would be
xmipp_transform_window -i g0ta.vol --corners -32 -32 -16 32 32 16
Reduce the volume by 10 pixels on each direction
xmipp_transform_window -i g0ta.vol --crop 10
Enlarge the volume by 10 pixels on each direction (negative crop)
xmipp_transform_window -i g0ta.vol --crop -10

User's comments