/* * The Npic library * * Copyright (C) 2003 Edouard Thiel * * This library is free software under the terms of the * GNU Lesser General Public License (LGPL) version 2.1. */ /* * mlut_remy.h - 01/11/2008 * * Computation of Medial Axis, LUT and Mlut for Distance Transforms * using Remy-Thiel algorithms. */ #ifndef NPIC__MLUT_REMY_H #define NPIC__MLUT_REMY_H typedef struct { int col_nb, /* Number of allocated columns */ col_tot, /* size of vector of column addresses */ col_len; /* size of one column */ Npic_l **v; } Npic_Lut; /* PUBLIC */ double NpicMlutCompLutCol (Npic_image *nCTg, Npic_vec *vg, Npic_l Rmax, Npic_l *LutCol); int NpicMlutInitLut (Npic_Lut *Lut, Npic_l Rtarget); int NpicMlutNewCol (Npic_Lut *Lut); void NpicMlutFreeLut (Npic_Lut *Lut); int NpicMlutCompLutMask (Npic_image *nCTg, Npic_mask *nMlut, Npic_Lut *Lut, Npic_l Rknown, Npic_l Rtarget, Npic_mask *nMg); Npic_l *NpicAllocAndCompLutCol (Npic_mask *nMlut, Npic_image *nCTg, Npic_l Rmax, int n); /* PRIVATE */ int NpicMlutIsMAg_2l (Npic_image_2l *DTg, Npic_mask_2l *Mlut, Npic_Lut *Lut, int y, int x); int NpicMlutIsMAg_3l (Npic_image_3l *DTg, Npic_mask_3l *Mlut, Npic_Lut *Lut, int z, int y, int x); int NpicMlutIsMAg_4l (Npic_image_4l *DTg, Npic_mask_4l *Mlut, Npic_Lut *Lut, int t, int z, int y, int x); int NpicMlutIsMAg_5l (Npic_image_5l *DTg, Npic_mask_5l *Mlut, Npic_Lut *Lut, int s, int t, int z, int y, int x); int NpicMlutIsMAg_6l (Npic_image_6l *DTg, Npic_mask_6l *Mlut, Npic_Lut *Lut, int r, int s, int t, int z, int y, int x); int NpicMlutRecompLutCols (Npic_image *nCTg, Npic_mask *nMlut, Npic_Lut *Lut, int Rtarget); void NpicMlutPossibleValues (Npic_image *nCTg, char *Possible, int Rtarget); int NpicMlutScanAndInsert (Npic_image *nCTg, Npic_image *nDTg, Npic_mask *nMlut, Npic_Lut *Lut, Npic_l R, Npic_l Rtarget); #endif /* NPIC__MLUT_REMY_H */