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

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

?? fastmarching.h.svn-base

?? fast marching method
?? SVN-BASE
?? 第 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一区二区三区免费野_久草精品视频
久久精品国产第一区二区三区 | 亚洲欧美日韩国产综合在线| 国产精品久久久久婷婷二区次| 成人激情校园春色| 一区二区国产视频| xfplay精品久久| 日韩一区二区视频| 在线观看日韩电影| 粉嫩高潮美女一区二区三区| 精品在线播放午夜| 舔着乳尖日韩一区| 国产精品入口麻豆九色| 国产成人精品影视| 成人午夜电影久久影院| 蜜乳av一区二区| 香蕉久久夜色精品国产使用方法| 亚洲人精品午夜| 精品国内片67194| 欧美日本在线播放| 国产盗摄一区二区| 日本不卡免费在线视频| 一个色在线综合| 日韩欧美视频一区| 久久综合久久99| 666欧美在线视频| 日本aⅴ亚洲精品中文乱码| 日韩精品电影在线| 亚洲成人免费看| 一区二区三区高清在线| 欧美少妇性性性| 欧美日韩国产成人在线免费| 色视频一区二区| 在线观看欧美精品| 久久先锋影音av鲁色资源网| 日韩欧美亚洲另类制服综合在线| 在线成人午夜影院| 捆绑变态av一区二区三区| 日本不卡视频在线| 国产一区二区影院| 亚洲欧美福利一区二区| 欧美午夜精品理论片a级按摩| 成人免费毛片高清视频| av不卡一区二区三区| 国产精品丝袜一区| 国产精品国产自产拍高清av | 欧洲精品中文字幕| 91福利社在线观看| 韩国av一区二区三区四区| 狠狠色丁香九九婷婷综合五月| 久久蜜桃av一区精品变态类天堂 | 成人影视亚洲图片在线| 国产成a人亚洲精品| www.日韩在线| 欧洲一区在线电影| 一本大道综合伊人精品热热| 东方aⅴ免费观看久久av| 国产suv精品一区二区6| www.欧美日韩国产在线| 麻豆成人免费电影| 成人a免费在线看| 久久久久亚洲蜜桃| 《视频一区视频二区| 91视频你懂的| 6080午夜不卡| 国产精品久久久久久久久久久免费看 | 亚洲欧美自拍偷拍| 日韩精品乱码av一区二区| 国产精品三级视频| 国产高清不卡二三区| 97久久超碰精品国产| 亚洲精品一卡二卡| 奇米在线7777在线精品| 国产精品亚洲一区二区三区在线| 成人av高清在线| 日本伊人色综合网| 欧美经典一区二区三区| 26uuu精品一区二区三区四区在线| 欧美激情综合在线| 日韩高清不卡一区二区| 91久久久免费一区二区| 东方aⅴ免费观看久久av| 欧美理论电影在线| 欧美精品一区男女天堂| 亚洲国产精品一区二区久久| 国产精品自拍av| 欧美日韩一区久久| 中文字幕av一区二区三区| 日韩在线播放一区二区| 日韩一区二区在线观看视频播放| 亚洲欧美福利一区二区| 成人在线一区二区三区| 一区二区高清视频在线观看| 91精品国产综合久久精品图片 | 亚洲乱码中文字幕| 日韩和欧美一区二区| 免费视频最近日韩| 欧美性做爰猛烈叫床潮| 欧美激情综合五月色丁香 | 另类小说欧美激情| 日韩午夜av一区| 同产精品九九九| 9l国产精品久久久久麻豆| 久久精品国产精品亚洲红杏| 日韩一级在线观看| 免费观看在线综合色| 在线精品视频一区二区三四| 亚洲视频一区二区免费在线观看| 国产成人综合亚洲91猫咪| 亚洲欧洲综合另类| 欧美日韩激情在线| 香蕉影视欧美成人| 欧美精品第一页| 亚洲欧洲精品一区二区三区不卡| 国产毛片一区二区| 国产视频一区二区在线| 中文av一区二区| 成人激情图片网| 亚洲天堂精品在线观看| 韩国毛片一区二区三区| 在线播放欧美女士性生活| 美女视频黄 久久| 久久只精品国产| 久久电影网电视剧免费观看| 国产精品麻豆视频| 国产精品综合在线视频| 国产精品久久久久一区| 国产99久久久国产精品潘金| 97精品视频在线观看自产线路二| 久久精品一级爱片| 一本一本大道香蕉久在线精品| 日本一区二区高清| 色诱视频网站一区| 国产乱国产乱300精品| 国产精品电影院| 精品国产3级a| 成人黄色软件下载| 日韩欧美高清dvd碟片| 视频一区欧美精品| 国产成人综合网| 日韩欧美国产一区二区三区| 欧美一区二区三区免费| 国产一区999| 久久久国产一区二区三区四区小说| 欧美日韩二区三区| 日韩高清中文字幕一区| 成人午夜电影久久影院| 一区二区三区国产豹纹内裤在线| 综合中文字幕亚洲| 成人免费高清视频| 一区二区三区在线免费| 91在线视频播放地址| 久久久久久久免费视频了| 日韩福利电影在线观看| 久久精品一区二区三区不卡牛牛| 9久草视频在线视频精品| 另类小说一区二区三区| 自拍偷在线精品自拍偷无码专区| 在线一区二区三区做爰视频网站| 韩国成人在线视频| 亚洲一区二区三区四区在线| 制服丝袜日韩国产| 色婷婷综合久久久久中文一区二区| 亚洲123区在线观看| 欧美国产综合一区二区| 99riav一区二区三区| 免费在线看一区| 一区二区高清免费观看影视大全 | 精品一区二区三区在线观看 | 亚洲欧美乱综合| 欧美日韩大陆在线| 欧美系列日韩一区| 日日摸夜夜添夜夜添国产精品| 精品国产网站在线观看| 久久久欧美精品sm网站| 91精品国模一区二区三区| 337p粉嫩大胆色噜噜噜噜亚洲| 久久久亚洲精品一区二区三区| 91麻豆精品国产91久久久久久| 一区2区3区在线看| 一区二区三区.www| 久久9热精品视频| 另类小说色综合网站| 麻豆国产精品777777在线| 天堂在线亚洲视频| 亚洲国产精品一区二区尤物区| 国产精品久久久久久久久免费樱桃 | 亚洲欧美色图小说| 欧美mv日韩mv| 91精品国产aⅴ一区二区| 日韩欧美国产综合| 欧美videofree性高清杂交| 日韩免费高清视频| 精品日产卡一卡二卡麻豆| 国产精品99久久久久久宅男| 国产99久久久国产精品| 国产精品99久久久久久有的能看| 国产精品中文字幕日韩精品| 亚洲国产欧美另类丝袜| 日本成人在线网站| 国产在线视视频有精品|