亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fastmarching.h

?? fast marching method
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*------------------------------------------------------------------------------------------------------    File        : FastMarching.h   (GCM Library)  Description : This class contains all the basic tools for working the fast marching algorithm.  Authors      : Emmanuel Prados (UCLA/INRIA), Christophe Lenglet (INRIA), Jean-Philippe Pons (INRIA)    --------------  License     : This software is governed by the CeCILL-C license under French law and abiding by the   rules of distribution of free software.   Users can use, modify and/ or redistribute the software under the terms of the CeCILL-C. In particular,   the exercising of this right is conditional upon the obligation to make available to the community the   modifications made to the source code of the software so as to contribute to its evolution (e.g. by the   mean of the web; i.e. by publishing a web page!).    In this respect, the risks associated with loading, using, modifying and/or developing or reproducing   the software by the user are brought to the user's attention, given its Free Software status, which may   make it complicated to use, with the result that its use is reserved for developers and experienced   professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the   suitability of the software as regards their requirements in conditions enabling the security of their  systems and/or data to be ensured and, more generally, to use and operate it in the same conditions of   security. This Agreement may be freely reproduced and published, provided it is not altered, and that   no provisions are either added or removed herefrom.     CeCILL-C FREE SOFTWARE LICENSE AGREEMENT is available in the file                           Licence_CeCILL-C_V1-en.txt   or at                            http://www.cecill.info/index.en.html.  This Agreement may apply to any or all software for which the holder of the economic rights decides to   submit the use thereof to its provisions.    --------------  Associated publications  : This C++ code corresponds to the implementation of the algorithm presented   in the following articles:    - E. Prados, C. Lenglet, J.P. Pons, N. Wotawa, R. Deriche, O. Faugeras, S. Soatto;     "Control Theory and Fast Marching Methods for Brain Connectivity Mapping";     INRIA Research Report 5845 -- UCLA Computer Science Department Technical Report 060004, February 2006.  - E. Prados, C. Lenglet, J.P. Pons, N. Wotawa, R. Deriche, O. Faugeras, S. Soatto;     "Control Theory and Fast Marching Methods for Brain Connectivity Mapping";    Proc. IEEE Computer Society Conference on Computer Vision and Pattern Recognition, New York, NY, I: 1076-1083, June 17-22, 2006.    - For more references, we refer to the official web page of the GCM Library and to authors' web pages.  Please, if you use the GCM library in you work, make sure you will include the reference to the work of   the authors in your publications.  ----------------------------------------------------------------------------------------------------*/#ifndef FASTLEVELSETFASTMARCHING_H#define FASTLEVELSETFASTMARCHING_H#include <algorithm>#include <limits>#include "Globals.h"#include "PriorityQueue.h"namespace FastLevelSet {    typedef enum { eAlive=0, eTrial=1, eFar=2, eForbidden=3 } eState;    ////////////////////////////////////////////////////////////////////////////////////////////////////////////    // English: Class containing the coordinates of a point and the value of the distance function at this point.     // French: Classe contenant les coordonnees d'un point et la valeur de la fonction distance en ce point    template <typename T>    struct stCoordVal : public stCoord {        T val;        stCoordVal(int _x, int _y, int _z, int _n, T _val) : stCoord(_x,_y,_z,_n), val(_val) {}        stCoordVal(const stCoord &coord, T _val) : stCoord(coord), val(_val) {}        bool operator < (const stCoordVal &a) const {            return (val < a.val);        }    };    ////////////////////////////////////////////////////////////////////////////////////////////////////////////    // En: Class for the fast marching        // Fr: Classe pour le fast marching        template <typename T = float, int sign = +1>    class FastMarching {      protected:        ////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En: Types        // Fr: Types        typedef PriorityQueue< stCoordVal<T> > CoordQueue;        typedef PriorityQueueNode< stCoordVal<T> > QueueNode;                  ////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En: Members        // Fr: Membres        unsigned char *state;   // En: state of the points // Fr: Etat des points        QueueNode **tabnode;    // En: Tab of nodes of the queue : needed for modifying the priority of a ponit of the queue // Fr. :Tableau des noeuds de la queue : necessaire pour modifier la priorite d'un point de la queue        CoordQueue trial_queue;  // En: Queue of the trial points // fr: Queue des points trial		CoordList alive_list;   // En: list of the alive points // Fr: Liste des points alive        T limit;                // En: stopping test // Fr: Condition d'arret du fast marching          T _current_min;         // En: current minimum // Fr: minimum actuel      protected:        T *data;                // En: Tab containing the data // Fr: Tableau des donnees        int width,height,depth,size; // En: Dimension of the data // Fr: Dimension des donnees        T big;                 // En: Maximal value authorized for the type T // Fr: Valeur maximale permise par le type T        double *voro;   // En: Tab containing the Voronoi diagram (labels tab) // Fr: Tableau du diagramme de Voronoi (labels)      public:        ////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En: Constructor / destructor        // Fr: Constructeur / destructeur		FastMarching(T *_data, int _width, int _height, int _depth = 1, double *_voro = NULL) : _current_min(0), data(_data), width(_width), height(_height), depth(_depth), size(width*height*depth), big(std::numeric_limits<T>::max()), voro(_voro) {            state = new unsigned char[size];            tabnode = new QueueNode *[size];            Init();        }        virtual ~FastMarching() {            delete state;            delete tabnode;        }		////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En: Iterators on the list of alive points        // Fr: Iterateurs sur la liste de points alive		const_CoordListIterator begin() const { return alive_list.begin(); }        const_CoordListIterator end() const { return alive_list.end(); }        ////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En: Access to the state of a point         // Fr: Acces a l'etat d'un point        eState GetState(const int x, const int y, const int z = 0) const { return GetState(_offset(x,y,z)); }        eState GetState(const int n) const { return eState(state[n]); }	////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En: Initialization        // Fr: Initialisation		void Init() {			trial_queue.clear();			alive_list.clear();            memset(state,eFar,size*sizeof(unsigned char));            memset(tabnode,0,size*sizeof(QueueNode*));        }        ////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En: Addition of a trial point in the queue        // Fr: Ajout d'un point trial a la queue	void AddTrialPoint(const int x, const int y, const int z = 0) { AddTrialPoint(x,y,z,_offset(x,y,z)); }	void AddTrialPoint(const int x, const int y, const int z, const int n) {		    if (state[n] == eFar) {		       	state[n] = eTrial;		       	tabnode[n] = trial_queue.push(stCoordVal<T>(x,y,z,n,sign*data[n]));		    }        }	////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En : Addition of an alive point to the list         // Fr : Ajout d'un point alive a la liste	void AddAlivePoint(const int x, const int y, const int z = 0) { AddAlivePoint(x,y,z,_offset(x,y,z)); }	void AddAlivePoint(const int x, const int y, const int z, const int n) {	       	if (state[n] == eFar) {		       	state[n] = eAlive;		       	alive_list.push_back(stCoord(x,y,z,n));	       	}        }                ////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En: Addition of a forbidden point to the list         // Fr: Ajout d'un point interdit	void AddForbiddenPoint(const int x, const int y, const int z = 0) { AddForbiddenPoint(_offset(x,y,z)); }        void AddForbiddenPoint(int n) {            if (state[n] == eFar) {                state[n] = eForbidden;            }        }	////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En: Generation of the trial points from the alive points         // Fr: Generation des points trial a partir des points alive       	void InitTrialFromAlive() {	       	// En: We read the list of alive points and we add their neibourghood points to the queue of the trial points	       	// Fr: On lit la liste de points alive et on ajoute les voisins a la queue des points trial	       	for (const_CoordListIterator vox=begin();vox!=end();vox++) {	       		const int x = vox->x;			const int y = vox->y;			const int z = vox->z;			if (x>0) AddTrialPoint(x-1,y,z);			if (x<width-1) AddTrialPoint(x+1,y,z);			if (y>0) AddTrialPoint(x,y-1,z);			if (y<height-1) AddTrialPoint(x,y+1,z);			if (z>0) AddTrialPoint(x,y,z-1);			if (z<depth-1) AddTrialPoint(x,y,z+1);	       	}       	}        ////////////////////////////////////////////////////////////////////////////////////////////////////////////        // En: Launching of the fast marching        // Fr: Lancement du fast marching       	void Run() {	       	Run( (sign>0) ? big : -big );       	}       	void Run(T _limit) {            // En: We memorize the spread of the fast marching            // Fr: On memorise l'etendue du fast marching            limit = _limit;            // En: As much as there are trial points in the queue...            // Fr: Tant qu'il y a des points trial dans la queue            while(!trial_queue.empty()) {                                    // En: We are looking for the trial point which has the smallest value                // Fr: On cherche le point trial de valeur la plus faible                stCoordVal<T> pt = trial_queue.top();                                           // En: If we reach the limit                // Fr: Si on a atteint la limite                if (pt.val>=sign*limit) {                    // En: we empty the queue and we put all points as far                     // Fr: On vide la queue et on marque tous ses points comme far                    while (!trial_queue.empty()) {                        pt = trial_queue.top();                        trial_queue.pop();                        state[pt.n] = eFar;                        tabnode[pt.n] = 0;                        data[pt.n] = limit;                    }                     return;                }                // En: Test the monotony of the FM                // Fr: Teste la monotonie du FM                //if (pt.val < _current_min) std::cerr << "Monotony error: _current_min=" << _current_min << " min_heap=" << pt.val << std::endl;                //else _current_min = pt.val;                                // En: We remove the point of the queue and we add it to the list of alive points                // Fr: On enleve le point de la queue et on l'ajoute a la liste des points alive                trial_queue.pop();                const int n = pt.n;				state[n] = eAlive;                tabnode[n] = 0;                alive_list.push_back(pt);                                // En: we determine the neibourghood points and we update them                 // fr: On determine les voisins du point et on les met a jour				const int x = pt.x;                const int y = pt.y;                const int z = pt.z;                                if (voro == NULL)                {                    if (x>0) __UpdatePoint(x-1,y,z);                    if (x<width-1) __UpdatePoint(x+1,y,z);                    if (y>0) __UpdatePoint(x,y-1,z);                    if (y<height-1) __UpdatePoint(x,y+1,z);                    if (z>0) __UpdatePoint(x,y,z-1);                    if (z<depth-1) __UpdatePoint(x,y,z+1);                }                else                {                    if (x>0) __UpdatePointVoro(x-1,y,z);                    if (x<width-1) __UpdatePointVoro(x+1,y,z);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产香蕉久久精品综合网| 亚洲综合色视频| 91网址在线看| 香蕉乱码成人久久天堂爱免费| 色视频一区二区| 亚洲成人久久影院| 国产午夜亚洲精品理论片色戒| 国产福利一区二区三区视频在线 | 国产欧美一二三区| 在线一区二区三区四区五区 | 久久成人久久鬼色| 欧美高清在线精品一区| 欧美日韩一区在线| 国内精品在线播放| 免费观看日韩电影| 亚洲一区二区在线播放相泽| 久久久久久久久久电影| 91精品国产乱| 精品1区2区3区| 99re66热这里只有精品3直播| 国产做a爰片久久毛片| 婷婷综合久久一区二区三区| 一区二区三区在线观看网站| 国产精品婷婷午夜在线观看| 久久久精品免费免费| 久久久久久久久久久久久久久99| 欧美日本一区二区| 在线电影一区二区三区| 欧美一卡2卡三卡4卡5免费| 在线观看亚洲a| 777午夜精品免费视频| 欧美精品xxxxbbbb| 精品久久国产字幕高潮| 亚洲视频免费看| 久久精品亚洲精品国产欧美kt∨| 欧美一区二区网站| 日本一区二区三区四区在线视频| 中文字幕一区在线观看视频| 国产精品女上位| 亚洲一区二区精品久久av| 麻豆精品视频在线观看免费| 国产一区二区三区免费观看| 91首页免费视频| 欧美一级艳片视频免费观看| 久久久久久久久久久黄色| 亚洲蜜桃精久久久久久久| 天天爽夜夜爽夜夜爽精品视频| 久久成人av少妇免费| 懂色av一区二区夜夜嗨| 欧美高清性hdvideosex| 国产三级精品视频| 日本成人超碰在线观看| 色婷婷综合久久久| 国产精品久久毛片a| 免费成人深夜小野草| 99久久免费视频.com| 精品国产a毛片| 青青草国产精品97视觉盛宴| 色综合一区二区| 国产精品久久一卡二卡| 国产电影一区二区三区| 日韩欧美aaaaaa| 亚洲高清一区二区三区| 99精品1区2区| 亚洲天堂成人在线观看| 国产成人精品影视| 久久女同互慰一区二区三区| 国产一区二区调教| 欧美一区二区免费| 美腿丝袜在线亚洲一区| 日韩午夜激情免费电影| 精品一区二区在线观看| 欧美xxxxxxxx| 国产一区二区美女诱惑| 欧美国产日韩在线观看| 成人一区二区三区视频在线观看 | 久久午夜色播影院免费高清| 免费成人在线影院| 国产网红主播福利一区二区| 成人黄页毛片网站| 日韩激情一二三区| 久久久www免费人成精品| 99天天综合性| 调教+趴+乳夹+国产+精品| 欧美成人国产一区二区| 9i在线看片成人免费| 午夜精品123| 中文字幕av一区二区三区免费看 | 成人免费视频国产在线观看| 亚洲欧美一区二区在线观看| 欧美日韩在线播放三区| 黄一区二区三区| 亚洲国产sm捆绑调教视频| 国产欧美日韩久久| 91精品国产日韩91久久久久久| 国产成人精品一区二区三区四区| 亚洲一区二区三区影院| 日本一区二区三区在线不卡| 日韩一级大片在线观看| 色综合天天综合| 成人黄色在线网站| 国产成人精品免费看| 国产尤物一区二区| 久久电影国产免费久久电影 | 亚洲激情在线激情| 中文字幕一区二区三区色视频| 精品动漫一区二区三区在线观看| 色综合久久久久综合| 99re成人在线| 在线观看日韩高清av| gogo大胆日本视频一区| 成人网页在线观看| 97精品国产97久久久久久久久久久久| 激情五月婷婷综合网| 国产伦精品一区二区三区视频青涩| 亚洲国产va精品久久久不卡综合| 亚洲精品久久久蜜桃| 亚洲第一主播视频| 丝袜美腿成人在线| 国产精品白丝jk白祙喷水网站| 成人性生交大片免费 | 色偷偷久久人人79超碰人人澡 | 91日韩在线专区| 制服丝袜在线91| 国产日韩欧美精品一区| 欧美国产乱子伦 | 国产精品乱人伦中文| 亚洲高清免费视频| 久久99国产精品免费网站| 国产露脸91国语对白| 91麻豆产精品久久久久久| 欧美日韩情趣电影| 国产欧美一区二区三区在线老狼| 亚洲日本成人在线观看| 美女一区二区三区| 色噜噜狠狠一区二区三区果冻| 91.麻豆视频| 一区二区三区中文字幕电影| 久久精品国产精品亚洲精品| 91香蕉国产在线观看软件| 91精品国产一区二区三区| 国产精品国产三级国产普通话蜜臀 | 日韩一级完整毛片| 亚洲国产中文字幕在线视频综合| 老司机午夜精品| 欧美高清性hdvideosex| 亚洲天堂精品视频| 91小视频在线| 国产精品嫩草影院com| 国产1区2区3区精品美女| 久久久久久一级片| 国产精品 日产精品 欧美精品| 日韩美女视频一区二区在线观看| 亚洲一区在线免费观看| 欧美日韩久久不卡| 日韩在线a电影| 日韩免费一区二区三区在线播放| 日韩电影在线观看网站| 日韩亚洲国产中文字幕欧美| 日韩av中文字幕一区二区三区| 日韩一区二区三区电影在线观看 | 中文字幕五月欧美| 色综合久久久久综合体| 亚洲国产综合色| 久久婷婷国产综合国色天香 | 麻豆久久久久久| 国产精品国产三级国产aⅴ中文 | 亚洲网友自拍偷拍| 国产亚洲成年网址在线观看| 国产成人免费视频一区| 亚洲桃色在线一区| 日韩欧美激情四射| 欧美亚洲丝袜传媒另类| 美日韩一区二区| 亚洲乱码国产乱码精品精小说| 欧美麻豆精品久久久久久| 久久99精品久久久久久国产越南 | 日韩亚洲欧美成人一区| 成人夜色视频网站在线观看| 亚洲成a人片在线不卡一二三区| 中文字幕第一区二区| 欧美成人猛片aaaaaaa| 91麻豆swag| 不卡的av网站| 国产福利不卡视频| 国产一区二区视频在线| 亚洲va国产va欧美va观看| 亚洲伦理在线免费看| 亚洲美女视频在线观看| 国产精品久久久久久久岛一牛影视| 欧美日韩一卡二卡| 欧美日韩午夜在线视频| 91麻豆国产在线观看| 成人网在线播放| 懂色av中文字幕一区二区三区| 麻豆国产精品官网| 麻豆国产精品官网| 久久99国产精品久久99| 久久精品免费看| 激情文学综合网|