Mojette Transforms Header/Object for the FRTW C Library. More...
#include <math.h>
#include "vector.h"
Go to the source code of this file.
Data Structures | |
struct | mojetteProjection |
Functions | |
NTTW_DLL_SYM mojetteProjection * | mojetteArray_1D (vector *angles, const size_t mu, const size_t rows, const size_t cols) |
Allocates a Mojette Projection set (array) for the angle set provided. | |
NTTW_DLL_SYM void | free_mojetteArray (mojetteProjection *set, const size_t mu) |
Deallocates a Mojette Projection set (array). | |
NTTW_DLL_SYM int | writeMojetteSet (mojetteProjection *set, const size_t mu, const char *filename) |
Writes a Mojette Projection set (array) to file. | |
NTTW_DLL_SYM int | outputMojetteSet (mojetteProjection *set, const size_t mu) |
Writes a Mojette Projection set (array) to stdout. | |
NTTW_DLL_SYM int | readMojetteSet (mojetteProjection **set, size_t *mu, const char *filename) |
Reads a Mojette Projection set (array) from file. | |
NTTW_DLL_SYM int | isKatzCriterion (const vector *projectionSet, const int projectionsNumber, const int rows, const int cols) |
Uses the set of projections to determine if the Katz Criterion is met. | |
NTTW_DLL_SYM int | totalFareyAngles (const int n) |
Returns the upper bound for the number of Farey angles less than n. Limit is approximately 3n^2/pi^2 = 0.3034 n^2. Its to be used with the compact routines. | |
NTTW_DLL_SYM void | nextFareyAngle (const int n, const vector angle1, const vector angle2, vector *result) |
Computes the next Farey fraction/angle from the two fractions provided. | |
NTTW_DLL_SYM void | nextFareyAngle_Compact (const int n, const vector angle1, const vector angle2, vector *result) |
Computes the next Farey fraction/angle from the two fractions provided that has minimal l1 norm. | |
NTTW_DLL_SYM void | allFareyAngles (const int n) |
Computes all the Farey fractions of order n and outputs to stdout. | |
NTTW_DLL_SYM void | allFareyAngles_Compact (const int n) |
Computes all the Farey fractions of order n that has minimal l1 norm and outputs to stdout. | |
NTTW_DLL_SYM nttw_big_integer | finiteAngle (const vector fareyAngle, const nttw_big_integer modulus, nttw_integer *perp) |
Computes the corresponding finite angle (m or s) for the Farey fraction for the given modulus. | |
NTTW_DLL_SYM void | markFiniteAngle (const nttw_big_integer value, const nttw_integer perp, nttw_integer *mLookUpTable, nttw_integer *sLookUpTable, nttw_integer *rejected) |
Marks the lookup table if the finite angle is unique in the given finite set. | |
NTTW_DLL_SYM void | computeAngle (const size_t N, long p, long q, nttw_integer *mLookUp, nttw_integer *sLookUp, vector *farey, nttw_big_integer *finite, nttw_integer *perps, nttw_big_integer *angleCount) |
Determines the finite angle for a given Farey fraction and rejects it if it is not unique. Marks the lookup if unique. | |
NTTW_DLL_SYM nttw_big_integer | fmt_angleSet (const size_t N, const size_t P, const size_t Q, vector *farey, nttw_big_integer *finite, nttw_integer *perps) |
Determines the finite angle set for the FMT using the first encountered Farey fractions during generation of the l1 norm Farey set of order n. | |
NTTW_DLL_SYM nttw_big_integer | fmt_angleSet_Simple (const size_t N, vector *farey, nttw_big_integer *finite, nttw_integer *perps) |
Determines the finite angle set for the FMT using the simple [1,w] set. | |
NTTW_DLL_SYM nttw_big_integer | fmt_angleSet_L1 (const size_t N, const size_t P, const size_t Q, vector *farey, nttw_big_integer *finite, nttw_integer *perps) |
Determines the l1 norm finite angle set for the FMT by generating the Farey set for order n and sorting in ascending l1 norm. The shortest fractions are chosen to form the set. | |
NTTW_DLL_SYM void | mt (const vector *angles, const nttw_integer *data, mojetteProjection *set, const size_t mu, const size_t rows, const size_t cols) |
The Mojette Transform (MT) of the data taken at the angles provided. The set contains the projection data. | |
NTTW_DLL_SYM nttw_integer * | fmt (const size_t P, const size_t Q, const nttw_integer *image, const vector *farey, const nttw_big_integer *finite, nttw_integer *perps, const size_t N) |
The Fast Mojette Transform (FMT) of the data taken at the angles provided. The FMT is simulated by taking the MT and then mapping it to FRT space. | |
NTTW_DLL_SYM nttw_integer * | fmt_noise (const size_t P, const size_t Q, const nttw_integer *image, const vector *farey, const nttw_big_integer *finite, nttw_integer *perps, const size_t N, const float SNR) |
The Fast Mojette Transform (FMT) of the data taken at the angles provided with noise at SNR. The FMT is simulated by taking the MT and then mapping it to FRT space. | |
NTTW_DLL_SYM void | mt2frt (const vector *farey, const nttw_big_integer *finite, const nttw_integer *perps, const mojetteProjection *set, const size_t mu, const size_t rows, nttw_integer *frtSpace, const size_t N) |
Mojette projections are mapped to the FRT space using the finite mapping developed by Chandra et al. | |
NTTW_DLL_SYM void | mt2frt_noise (const vector *farey, const nttw_big_integer *finite, const nttw_integer *perps, const mojetteProjection *set, const size_t mu, const size_t rows, nttw_integer *frtSpace, const size_t N, const float SNR) |
Mojette projections are mapped to the FRT space with noise using the finite mapping developed by Chandra et al. |
Mojette Transforms Header/Object for the FRTW C Library.
FRTW Mojette Library
This header provides all the operations related to the Mojette Transform. It includes Farey angle related routines as well as other discretized versions of the Mojette Transform.
This file is part of FRTW Library.
FRTW is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
FRTW is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with FRTW. If not, see <http://www.gnu.org/licenses/>.
Definition in file mojette.h.