You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chirp Z Transformations: Allows Fourier-transformation and at the same time zooming into the result,
3
+
which is why it is also called the Zoomed-FFT algorithm.
4
+
The algorithm is loosely based on a publication [Rabiner, Schafer, Rader, The Cirp z-Transform Algorithm, IEEE Trans AU 17(1969) p. 86] and a 2D Matlab Version written by N.G. Worku & H. Gross, with their consent (28. Oct. 2020) to make it openly available. It currently needs three FFTs to perform its work.
5
+
As one of these FFTs only depends on the datasize and zoom parameters, it can be moved to a plan in future implementations.
error("Every of the $(ndims(xin)) dimension needs exactly one corresponding scale (zoom) factor, which should be equal to 1.0 for dimensions not contained in the dims argument.")
147
+
end
148
+
for d =1:ndims(xin)
149
+
if!(d in dims) && scale[d] !=1.0&&!isnothing(scale[d])
150
+
error("The scale factor $(scale[d]) needs to be nothing or 1.0, if this dimension is not in the list of dimensions to transform.")
emulates a barrel (`rel>0`) or a pincushion (`rel<0`) distortion. The distortions are calculated using `resample_czt()` with separable quadratic zooms.
294
+
emulates a barrel (`rel>0`) or a pincushion (`rel<0`) distortion. The distortions are calculated
295
+
using `resample_czt()` with separable quadratic zooms.
resamples an ND-array to a set of new positions `new_pos` measured in either in pixels (`pixel_coords=true`) or relative (Fourier-) image coordinates (`pixel_coords=false`).
321
+
resamples an ND-array to a set of new positions `new_pos` measured in either in pixels (`pixel_coords=true`)
322
+
or relative (Fourier-) image coordinates (`pixel_coords=false`).
301
323
`new_pos` can be
302
324
+ an array of `Tuples` specifying the zoom along each direction
303
-
+ an `N+1` dimensional array (for `N`-dimensional imput data `img`) of destination postions, the last dimension enumerating the respective destination corrdinate dimension.
325
+
+ an `N+1` dimensional array (for `N`-dimensional imput data `img`) of destination postions, the last dimension
326
+
enumerating the respective destination corrdinate dimension.
304
327
+ a function accepting a coordinate `Tuple` and yielding a destination position `Tuple`.
305
328
306
-
`resample_nfft` can perform a large range of possible resamplings. Note that the default setting is `is_src_coords=true` which means that the source coordinates of each destination
307
-
position have to be specified. This has the advantage that the result has usually less artefacts, but the positions may be more less convenient to specify.
329
+
`resample_nfft` can perform a large range of possible resamplings. Note that the default setting is `is_src_coords=true`
330
+
which means that the source coordinates of each destination position have to be specified. This has the advantage that
331
+
the result has usually less artefacts, but the positions may be more less convenient to specify.
308
332
309
333
# Arguements
310
334
+ `img`: the image to apply resampling to
311
335
+ `new_pos``: specifies the resampling. See description above.
312
-
+ `dst_size`: this argument optionally defines the output size. If you require a different result size for `new_pos` being a function or with `is_src_coords=true`, state it here. By defaul (`dst_size=nothing`) the
336
+
+ `dst_size`: this argument optionally defines the output size. If you require a different result size
337
+
for `new_pos` being a function or with `is_src_coords=true`, state it here. By defaul (`dst_size=nothing`) the
313
338
destination size will be inferred form the argument `new_pos` or assumed to be `size(img)`.
314
339
+ `is_local_shift`: specifies, whether the resampling coordinates refer to a relative shift or absoluter coordinates
315
340
+ `is_in_pixels`: specifies whether the coordinates (or relative distances) are given in pixel pitch units (`is_in_pixels=true`) or in units relative to the array sizes (Fourier convention)
@@ -318,7 +343,7 @@ position have to be specified. This has the advantage that the result has usuall
318
343
319
344
See also: `resample`, `resample_czt`
320
345
# Examples
321
-
```julia-repl
346
+
```jldoctest
322
347
julia> using FourierTools, TestImages, NDTools, View5D, IndexFunArrays
323
348
324
349
julia> a = Float32.(testimage("resolution"));
@@ -363,7 +388,9 @@ julia> f = resample_nfft(a, new_pos, is_src_coords=false);
0 commit comments