xmipp_transform_filter (v3.0)


Apply different type of filters to images or volumes.


-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
-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".


--fourier, -f <filter_type>
Filter in Fourier space
where <filter_type> can be:
  • low_pass <w1> <raisedw=0.02> Cutoff freq (<1/2 or A)
  • high_pass <w1> <raisedw=0.02> Cutoff freq (<1/2 or A)
  • band_pass <w1> <w2> <raisedw=0.02> Cutoff freq (<1/2 or A)
  • stop_band <w1> <w2> <raisedw=0.02> Cutoff freq (<1/2 or A)
  • wedge <th0> <thF> <rot=0> <tilt=0> <psi=0> Missing wedge (along y) for data between th0-thF y is rotated by euler angles degrees
  • cone <th0> Missing cone for tilt angles up to th0 do not use mask type for wedge or cone filters
  • gaussian <w1> Gaussian with sigma = w1
  • ctf <ctfile> Provide a .ctfparam file
  • ctfpos <ctfile> Provide a .ctfparam file The CTF phase will be corrected before applying
  • bfactor <B> ( requires --sampling ) Exponential filter (positive values for decay)
--sampling, -s <sampling_rate> ( requires --fourier )
If provided pass frequencies are taken in Ang
--save <filename=> ( requires --fourier )
Do not apply just save the mask


--wavelet, -w <DWT_type=DAUB12> <mode=remove_scale>
Different types of filters using wavelets
where <DWT_type> can be:
  • DAUB4
  • DAUB12
  • DAUB20 Discrete Wavelet Transform
    where <mode> can be:
  • remove_scale
  • bayesian <SNR0=0.1> <SNRF=0.2> Smallest(SNR0) and largest(SNRF) SNR.
  • soft_thresholding
  • adaptive_soft
  • central
--scale <s=0>
--output_scale <s=0>
--th <th=50>
threshold of values (%) to remove
-R <r=-1>
Radius to keep, by default half the size
Select if the noise is white. Used by Bayesian filter.

Bad pixels

--bad_pixels, -b <type>
Applied filters on bad pixels of the image.
where <type> can be:
  • negative Applied at those negative values. Positive values are untouched.
  • mask <mask_file> Applied at those pixels given by mask.
  • outliers <factor> Applied at those pixels out of the range [mean - factor*std, mean + factor*std].

Anisotropic diffusion

Use anisotropic diffusion filter.
--shah_iter <outer=10> <inner=1> <refinement=1> ( requires --diffusion )
Diffusion outer, inner and refinement iterations
--shah_weight <w0=0> <w1=50> <w2=50> <w3=0.02> ( requires --diffusion )
Diffusion weights w0 = data matching w1 = 1st derivative smooth w2 = edge strength w3 = edge smoothness
--shah_only_edge ( requires --diffusion )
Produce the edge image of the diffusion

Mean shift

--mean_shift, -t <hr> <hs> <iter=1>
Filter based on the mean-shift algorithm hs: Sigma for the range domain hr: Sigma for the spatial domain iter: Number of iterations to be used
--thr <n=1>
Number of processing threads
Use faster processing (avoid gaussian calculations)
Save result image/volume for each iteration

Background removal

--background, -g <type=plane>
Filters to remove the background.
where <type> can be:
  • plane Remove the plane that best fits the pixels.
  • rollingball <radius> The background is computed as a rolling ball operation.


--median, -m
Use median filter.

Examples and notes

Filter a volume using a mask volumeMask.vol to remove bad pixels:
   xmipp_transform_filter -i volume.vol -o volumeFiltered1.vol --bad_pixels mask volumeMask.vol
Remove extreme pixels:
   xmipp_transform_filter -i volume.vol  -o volumeFiltered2.vol --bad_pixels outliers 0.5
Apply a Fourier filter on a volume:
   xmipp_transform_filter -i volume.vol -o volumeFiltered.vol --fourier low_pass 0.05
   xmipp_transform_filter  -i volume.vol -o volumeFiltered.vol -f band_pass 0.1 0.3
   xmipp_transform_filter  -i image.ser  -o imageFiltered.xmp --background plane
   xmipp_transform_filter  -i smallStack.stk -o smallFiltered.stk -w DAUB12 difussion
Filter a volume using a wedge mask rotated 10 degress
   xmipp_transform_filter  --fourier wedge  -60 60 0 0 10 -i ico.spi -o kk0.spi --verbose
Save filtering mask (do not filter)
   xmipp_transform_filter  --fourier wedge  -60 60 0 0 10 -i ico.spi -o kk0.spi --verbose --save mask.spi

User's comments