MagickCore  6.9.10
Convert, Edit, Or Compose Bitmap Images
matrix.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
3  dedicated to making software imaging solutions freely available.
4 
5  You may not use this file except in compliance with the License.
6  obtain a copy of the License at
7 
8  https://imagemagick.org/script/license.php
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  MagickCore matrix methods.
17 */
18 #ifndef MAGICKCORE_MATRIX_H
19 #define MAGICKCORE_MATRIX_H
20 
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24 
25 typedef struct _MatrixInfo
26  MatrixInfo;
27 
28 extern MagickExport double
29  **AcquireMagickMatrix(const size_t,const size_t),
30  **RelinquishMagickMatrix(double **,const size_t);
31 
32 extern MagickExport Image
34 
36  GaussJordanElimination(double **,double **,const size_t,const size_t),
37  GetMatrixElement(const MatrixInfo *,const ssize_t,const ssize_t,void *),
39  SetMatrixElement(const MatrixInfo *,const ssize_t,const ssize_t,const void *);
40 
42  *AcquireMatrixInfo(const size_t,const size_t,const size_t,ExceptionInfo *),
44 
45 MagickExport size_t
47  GetMatrixRows(const MatrixInfo *);
48 
49 extern MagickExport void
50  LeastSquaresAddTerms(double **,double **,const double *,const double *,
51  const size_t,const size_t);
52 
53 #if defined(__cplusplus) || defined(c_plusplus)
54 }
55 #endif
56 
57 #endif
_Image::colorspace
ColorspaceType colorspace
Definition: image.h:158
LockSemaphoreInfo
MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:345
_MatrixInfo::type
CacheType type
Definition: matrix.c:62
MagickExport
#define MagickExport
Definition: method-attribute.h:80
_MatrixInfo::length
MagickSizeType length
Definition: matrix.c:70
AcquireMatrixInfo
MagickExport MatrixInfo * AcquireMatrixInfo(const size_t, const size_t, const size_t, ExceptionInfo *)
GaussJordanElimination
MagickExport MagickBooleanType GaussJordanElimination(double **, double **, const size_t, const size_t)
GetMatrixColumns
MagickExport size_t GetMatrixColumns(const MatrixInfo *matrix_info)
Definition: matrix.c:606
_MatrixInfo
Definition: matrix.c:59
MapCache
@ MapCache
Definition: cache.h:31
RelinquishMagickResource
MagickExport void RelinquishMagickResource(const ResourceType type, const MagickSizeType size)
Definition: resource.c:1001
GetMagickModule
#define GetMagickModule()
Definition: log.h:29
AreaResource
@ AreaResource
Definition: resource_.h:28
DestroyCacheView
MagickExport CacheView * DestroyCacheView(CacheView *cache_view)
Definition: cache-view.c:256
MagickCoreSignature
#define MagickCoreSignature
Definition: method-attribute.h:86
_MatrixInfo::elements
void * elements
Definition: matrix.c:83
magick_restrict
#define magick_restrict
Definition: MagickCore.h:41
_MatrixInfo::file
int file
Definition: matrix.c:80
image-private.h
UnmapBlob
MagickExport MagickBooleanType UnmapBlob(void *, const size_t)
Definition: blob.c:4682
_Image::columns
size_t columns
Definition: image.h:174
_MatrixInfo::semaphore
SemaphoreInfo * semaphore
Definition: matrix.c:86
GetMatrixElement
MagickExport MagickBooleanType GetMatrixElement(const MatrixInfo *, const ssize_t, const ssize_t, void *)
MagickSizeType
size_t MagickSizeType
Definition: magick-type.h:136
RelinquishMagickMatrix
MagickExport double ** RelinquishMagickMatrix(double **, const size_t)
Definition: matrix.c:1064
resource_.h
MatrixToImage
MagickExport Image * MatrixToImage(const MatrixInfo *, ExceptionInfo *)
Definition: matrix.c:869
DestroyMatrixInfo
MagickExport MatrixInfo * DestroyMatrixInfo(MatrixInfo *matrix_info)
Definition: matrix.c:366
_PixelPacket::blue
Quantum blue
Definition: pixel.h:143
utility.h
_CacheView
Definition: cache-view.c:65
CacheError
@ CacheError
Definition: exception.h:64
CacheType
CacheType
Definition: cache.h:27
AcquireMagickMatrix
MagickExport double ** AcquireMagickMatrix(const size_t number_rows, const size_t size)
Definition: matrix.c:314
DestroyString
MagickExport char * DestroyString(char *string)
Definition: string.c:820
MatrixToImage
MagickExport Image * MatrixToImage(const MatrixInfo *matrix_info, ExceptionInfo *exception)
Definition: matrix.c:869
MagickTrue
@ MagickTrue
Definition: magick-type.h:194
QueueCacheViewAuthenticPixels
MagickExport PixelPacket * QueueCacheViewAuthenticPixels(CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
Definition: cache-view.c:883
blob.h
semaphore.h
IOMode
@ IOMode
Definition: blob.h:34
SyncCacheViewAuthenticPixels
MagickExport MagickBooleanType SyncCacheViewAuthenticPixels(CacheView *magick_restrict cache_view, ExceptionInfo *exception)
Definition: cache-view.c:1000
blob-private.h
GetMatrixColumns
MagickExport size_t GetMatrixColumns(const MatrixInfo *)
ClampToQuantum
static Quantum ClampToQuantum(const MagickRealType quantum)
Definition: quantum.h:88
RelinquishMagickMatrix
MagickExport double ** RelinquishMagickMatrix(double **matrix, const size_t number_rows)
Definition: matrix.c:1064
thread-private.h
AcquireImage
MagickExport Image * AcquireImage(const ImageInfo *image_info)
Definition: image.c:152
ReadMatrixElements
static MagickOffsetType ReadMatrixElements(const MatrixInfo *magick_restrict matrix_info, const MagickOffsetType offset, const MagickSizeType length, unsigned char *magick_restrict buffer)
Definition: matrix.c:661
matrix.h
AcquireMagickMemory
MagickExport void * AcquireMagickMemory(const size_t size)
Definition: memory.c:473
SemaphoreInfo
Definition: semaphore.c:59
LeastSquaresAddTerms
MagickExport void LeastSquaresAddTerms(double **matrix, double **vectors, const double *terms, const double *results, const size_t rank, const size_t number_vectors)
Definition: matrix.c:826
_Image
Definition: image.h:152
CacheFatalError
@ CacheFatalError
Definition: exception.h:87
_MatrixInfo::synchronize
MagickBooleanType synchronize
Definition: matrix.c:74
AcquireAuthenticCacheView
MagickExport CacheView * AcquireAuthenticCacheView(const Image *image, ExceptionInfo *exception)
Definition: cache-view.c:111
_MatrixInfo::path
char path[MaxTextExtent]
Definition: matrix.c:77
AcquireMagickResource
MagickExport MagickBooleanType AcquireMagickResource(const ResourceType type, const MagickSizeType size)
Definition: resource.c:172
MapResource
@ MapResource
Definition: resource_.h:31
AcquireMatrixInfo
MagickExport MatrixInfo * AcquireMatrixInfo(const size_t columns, const size_t rows, const size_t stride, ExceptionInfo *exception)
Definition: matrix.c:197
_ImageInfo
Definition: image.h:361
MagickFalse
@ MagickFalse
Definition: magick-type.h:193
pixel-private.h
GaussJordanSwap
#define GaussJordanSwap(x, y)
AllocateSemaphoreInfo
MagickExport SemaphoreInfo * AllocateSemaphoreInfo(void)
Definition: semaphore.c:192
LeastSquaresAddTerms
MagickExport void LeastSquaresAddTerms(double **, double **, const double *, const double *, const size_t, const size_t)
Definition: matrix.c:826
_MatrixInfo::mapped
MagickBooleanType mapped
Definition: matrix.c:73
_PixelPacket::red
Quantum red
Definition: pixel.h:145
PerceptibleReciprocal
static double PerceptibleReciprocal(const double x)
Definition: pixel-accessor.h:124
QuantumRange
#define QuantumRange
Definition: magick-type.h:86
DiskResource
@ DiskResource
Definition: resource_.h:29
SetMatrixElement
MagickExport MagickBooleanType SetMatrixElement(const MatrixInfo *matrix_info, const ssize_t x, const ssize_t y, const void *value)
Definition: matrix.c:1108
_Image::rows
size_t rows
Definition: image.h:175
_PixelPacket::green
Quantum green
Definition: pixel.h:144
DestroySemaphoreInfo
MagickExport void DestroySemaphoreInfo(SemaphoreInfo **semaphore_info)
Definition: semaphore.c:293
_ExceptionInfo::signature
size_t signature
Definition: exception.h:124
NullMatrix
MagickExport MagickBooleanType NullMatrix(MatrixInfo *)
WriteMatrixElements
static MagickOffsetType WriteMatrixElements(const MatrixInfo *magick_restrict matrix_info, const MagickOffsetType offset, const MagickSizeType length, const unsigned char *magick_restrict buffer)
Definition: matrix.c:129
MagickBooleanType
MagickBooleanType
Definition: magick-type.h:191
SetMatrixExtent
static MagickBooleanType SetMatrixExtent(MatrixInfo *magick_restrict matrix_info, MagickSizeType length)
Definition: matrix.c:170
RelinquishMagickMemory
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1077
_ExceptionInfo
Definition: exception.h:102
GetMatrixRows
MagickExport size_t GetMatrixRows(const MatrixInfo *matrix_info)
Definition: matrix.c:748
SetMatrixElement
MagickExport MagickBooleanType SetMatrixElement(const MatrixInfo *, const ssize_t, const ssize_t, const void *)
Definition: matrix.c:1108
studio.h
RelinquishUniqueFileResource
MagickExport MagickBooleanType RelinquishUniqueFileResource(const char *path)
Definition: resource.c:1190
GetMatrixElement
MagickExport MagickBooleanType GetMatrixElement(const MatrixInfo *matrix_info, const ssize_t x, const ssize_t y, void *value)
Definition: matrix.c:702
AcquireMagickMatrix
MagickExport double ** AcquireMagickMatrix(const size_t, const size_t)
GRAYColorspace
@ GRAYColorspace
Definition: colorspace.h:29
NullMatrix
MagickExport MagickBooleanType NullMatrix(MatrixInfo *matrix_info)
Definition: matrix.c:1001
DiskCache
@ DiskCache
Definition: cache.h:32
DestroyImage
MagickExport Image * DestroyImage(Image *image)
Definition: image.c:1187
_MatrixInfo::stride
size_t stride
Definition: matrix.c:67
_MatrixInfo::signature
size_t signature
Definition: matrix.c:89
memory_.h
AcquireUniqueFileResource
MagickExport int AcquireUniqueFileResource(char *path)
Definition: resource.c:558
GetEnvironmentValue
MagickExport char * GetEnvironmentValue(const char *name)
Definition: string.c:1242
exception-private.h
ThrowMagickException
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1068
ThrowFatalException
#define ThrowFatalException(severity, tag)
Definition: exception-private.h:42
IsStringTrue
MagickExport MagickBooleanType IsStringTrue(const char *value)
Definition: string.c:1485
UnlockSemaphoreInfo
MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:450
exception.h
GetMatrixRows
MagickExport size_t GetMatrixRows(const MatrixInfo *)
Definition: matrix.c:748
MaxTextExtent
#define MaxTextExtent
Definition: method-attribute.h:89
MagickMin
#define MagickMin(x, y)
Definition: image-private.h:27
MemoryResource
@ MemoryResource
Definition: resource_.h:32
GaussJordanElimination
MagickExport MagickBooleanType GaussJordanElimination(double **matrix, double **vectors, const size_t rank, const size_t number_vectors)
Definition: matrix.c:477
DestroyMatrixInfo
MagickExport MatrixInfo * DestroyMatrixInfo(MatrixInfo *)
Definition: matrix.c:366
EdgeX
static ssize_t EdgeX(const ssize_t x, const size_t columns)
Definition: matrix.c:643
EdgeY
static ssize_t EdgeY(const ssize_t y, const size_t rows)
Definition: matrix.c:652
_PixelPacket
Definition: pixel.h:131
MapBlob
MagickExport unsigned char * MapBlob(int, const MapMode, const MagickOffsetType, const size_t)
Definition: blob.c:2346
_MatrixInfo::columns
size_t columns
Definition: matrix.c:65
AcquireQuantumMemory
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
Definition: memory.c:544
_MatrixInfo::rows
size_t rows
Definition: matrix.c:66
MagickOffsetType
ssize_t MagickOffsetType
Definition: magick-type.h:135
MemoryCache
@ MemoryCache
Definition: cache.h:30