Skip to content

Commit

Permalink
Fix up documentation for dip::DFT and some related functions. [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
crisluengo committed May 19, 2022
1 parent eeaa0ee commit bb8481d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions include/diplib/dft.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace dip {
/// dft.Apply( in, out, buf.data() ); // computes a different DFT, repeat as necessary
/// ```
///
/// Note that this code uses `int` for sizes, rather than \ref dip::uint. `maximumDFTSize` is the largest length
/// Note that this code uses `int` for sizes, rather than \ref dip::uint. \ref maximumDFTSize is the largest length
/// of the transform.
///
/// The template can be instantiated for `T = float` or `T = double`. Linker errors will result for other types.
Expand All @@ -76,14 +76,14 @@ class DFT {

/// \brief Apply the transform that the `DFT` object is configured for.
///
/// `source` and `destination` are pointers to contiguous buffers with `TransformSize` elements.
/// This is the value of the `size` parameter of the constructor or `Initialize`. `buffer` is a pointer
/// to a contiguous buffer used for intermediate data. It should have `BufferSize` elements.
/// `source` and `destination` are pointers to contiguous buffers with \ref TransformSize elements.
/// This is the value of the `size` parameter of the constructor or \ref Initialize. `buffer` is a pointer
/// to a contiguous buffer used for intermediate data. It should have \ref BufferSize elements.
///
/// `scale` is a real scalar that the output values are multiplied by. It is typically set to `1/size` for
/// the inverse transform, and 1 for the forward transform.
///
/// `source` and `destination` can only point to the same buffer if all factors of `TransformSize()` are
/// `source` and `destination` can only point to the same buffer if all factors of \ref TransformSize are
/// the same. One should avoid this in general situations.
DIP_EXPORT void Apply(
const std::complex< T >* source,
Expand Down Expand Up @@ -120,7 +120,8 @@ class DFT {
/// the transform size is too large.
DIP_EXPORT std::size_t GetOptimalDFTSize( std::size_t size0, bool larger = true );

/// \brief The largest size supported by the DFT (both the internal code and FFTW use `int` for sizes).
/// \brief The largest size supported by \ref DFT and \ref FourierTransform, equal to 2^31^-1.
/// Both the built-in DFT and the FFTW library use `int` for array sizes.
constexpr std::size_t maximumDFTSize = static_cast< std::size_t >( std::numeric_limits< int >::max() );


Expand Down
2 changes: 1 addition & 1 deletion include/diplib/transform.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace dip {
/// of "fast", "corner" and "inverse" is not allowed, since padding in that case is non-trivial.
///
/// !!! warning
/// The largest size that can be transformed is 2^31^-1. In *DIPlib*, image sizes are
/// The largest size that can be transformed is 2^31^-1 (\ref maximumDFTSize). In *DIPlib*, image sizes are
/// represented by a \ref dip::uint, which on a 64-bit system can hold values up to 2^64^-1. But this function
/// uses `int` internally to represent sizes, and therefore has a more strict limit to image sizes. Note
/// that this limit refers to the size of one image dimension, not to the total number of pixels in the image.
Expand Down

0 comments on commit bb8481d

Please sign in to comment.