Mojette Transforms Source for the FRTW C Library. More...
#include <stdio.h>
#include <nttw/prime.h>
#include <nttw/image.h>
#include "mojette.h"
#include "noise.h"
Go to the source code of this file.
Functions | |
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. | |
void | free_mojetteArray (mojetteProjection *set, const size_t mu) |
Deallocates a Mojette Projection set (array). | |
int | writeMojetteSet (mojetteProjection *set, const size_t mu, const char *filename) |
Writes a Mojette Projection set (array) to file. | |
int | outputMojetteSet (mojetteProjection *set, const size_t mu) |
Writes a Mojette Projection set (array) to stdout. | |
int | readMojetteSet (mojetteProjection **set, size_t *mu, const char *filename) |
Reads a Mojette Projection set (array) from file. | |
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. | |
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. | |
void | nextFareyAngle (const int n, const vector angle1, const vector angle2, vector *result) |
Computes the next Farey fraction/angle from the two fractions provided. | |
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. | |
void | allFareyAngles (const int n) |
Computes all the Farey fractions of order n and outputs to stdout. | |
void | allFareyAngles_Compact (const int n) |
Computes all the Farey fractions of order n that has minimal l1 norm and outputs to stdout. | |
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. | |
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. | |
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_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_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_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. | |
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_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_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. | |
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. | |
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 Source 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.c.