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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 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);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产人成综合网站| 久久国产夜色精品鲁鲁99| 国产亚洲一区二区三区在线观看| 欧美一区中文字幕| 欧美一区二区三区人| 91精品国产综合久久蜜臀| 欧美日韩国产一级片| 欧美日韩色综合| 欧美日韩久久一区二区| 91精品国产福利| xfplay精品久久| 日本一区二区高清| 国产精品卡一卡二| 成人免费一区二区三区在线观看| 国产精品女同一区二区三区| 亚洲视频一区二区在线观看| 一区二区三区色| 图片区小说区区亚洲影院| 久久99久久精品欧美| 国产黄色精品网站| 91麻豆国产福利在线观看| 亚洲卡通欧美制服中文| 国产日韩欧美精品综合| 欧美精品一区二区久久婷婷 | 91麻豆精品久久久久蜜臀| 欧美成人综合网站| 亚洲国产成人在线| 一区二区三区中文字幕在线观看| 亚洲国产wwwccc36天堂| 看电影不卡的网站| 成人av影院在线| 欧美三级电影在线看| 日韩欧美亚洲一区二区| 欧美激情在线一区二区| 亚洲综合精品久久| 激情综合色综合久久综合| 99这里只有精品| 欧美区在线观看| 国产片一区二区三区| 亚洲综合在线五月| 国内欧美视频一区二区| 一本久久综合亚洲鲁鲁五月天 | 亚洲天堂精品在线观看| 97se亚洲国产综合在线| 欧美日韩一区二区三区在线 | 欧美日韩亚洲综合在线| 精品国偷自产国产一区| 亚洲欧洲99久久| 美女视频一区二区| 色综合激情五月| 亚洲精品一区二区三区影院 | 石原莉奈一区二区三区在线观看| 国产剧情av麻豆香蕉精品| 欧美日韩综合在线免费观看| 久久久久久**毛片大全| 午夜影院久久久| 99久久精品国产导航| 欧美www视频| 亚洲在线中文字幕| 成人小视频免费在线观看| 日韩一级片在线观看| 亚洲精品亚洲人成人网| 国产毛片精品视频| 欧美一级日韩一级| 高清国产一区二区| 17c精品麻豆一区二区免费| 午夜精品久久久久久久99水蜜桃| 狠狠v欧美v日韩v亚洲ⅴ| 欧美日韩在线三级| 中文字幕一区二区5566日韩| 韩国女主播一区| 91麻豆精品国产91久久久久| 亚洲欧洲制服丝袜| 国产91精品露脸国语对白| 日韩欧美久久久| 亚洲不卡在线观看| 91传媒视频在线播放| 亚洲欧洲无码一区二区三区| 国产精品一区免费视频| 精品日韩一区二区| 日本伊人色综合网| 91麻豆精品国产91久久久久久 | 亚洲免费观看高清完整版在线观看 | 久久99国产精品免费网站| 日本伦理一区二区| 国产清纯白嫩初高生在线观看91| 91久久精品一区二区三| 国产精品色在线| 国产成人在线影院| 久久久久青草大香线综合精品| 日韩专区一卡二卡| 欧美精品一级二级三级| 亚洲电影第三页| 欧美日韩高清一区| 天天色 色综合| 欧美高清视频不卡网| 亚洲成人精品一区| 91精品国产品国语在线不卡| 日韩av高清在线观看| 日韩一区二区免费在线观看| 亚洲1区2区3区4区| 91精品国产综合久久福利 | 99国产精品久久久久| 欧美韩国日本综合| 成人av免费在线播放| 亚洲欧美一区二区三区久本道91| 99久久久国产精品| 国产精品素人一区二区| aaa欧美色吧激情视频| 中文字幕在线一区| 91首页免费视频| 一区二区三区在线免费观看| 欧洲视频一区二区| 午夜影院在线观看欧美| 日韩免费看的电影| 国产精品夜夜嗨| 中文字幕一区二区三区在线观看| 97久久超碰国产精品电影| 亚洲免费在线看| 欧美男人的天堂一二区| 蜜桃av一区二区三区电影| 久久综合网色—综合色88| 岛国一区二区在线观看| 亚洲免费毛片网站| 欧美精品乱人伦久久久久久| 另类的小说在线视频另类成人小视频在线| 久久夜色精品国产欧美乱极品| 成人中文字幕电影| 亚洲一区成人在线| 精品嫩草影院久久| 99视频在线精品| 日韩精品一级二级 | 亚洲欧美激情视频在线观看一区二区三区 | 一色屋精品亚洲香蕉网站| 99久久国产综合精品色伊| 亚洲一区二区视频在线| 欧美一区二区三区免费观看视频 | 欧美一级黄色大片| 国产真实乱对白精彩久久| 亚洲日本成人在线观看| 欧美一区二区三区在线观看视频| 国产又粗又猛又爽又黄91精品| 中文字幕亚洲视频| 制服丝袜亚洲色图| 99麻豆久久久国产精品免费| 爽好多水快深点欧美视频| 国产欧美一区二区在线观看| 欧美色图天堂网| 国产一区二区在线观看视频| 亚洲免费观看在线视频| 精品三级在线观看| 色婷婷综合激情| 国产suv精品一区二区883| 香蕉乱码成人久久天堂爱免费| 久久久不卡影院| 91.麻豆视频| 91视频一区二区三区| 狠狠色2019综合网| 午夜精品aaa| 中文字幕一区视频| 日韩欧美卡一卡二| 欧美三级三级三级| 99久久久久久| 成人免费视频播放| 久久免费看少妇高潮| 欧美色网站导航| 99久久99久久精品国产片果冻| 免费人成网站在线观看欧美高清| 日本欧洲一区二区| 亚洲一区二区三区四区在线| 国产日韩欧美电影| 欧美va日韩va| 欧美最猛黑人xxxxx猛交| 粉嫩在线一区二区三区视频| 免费日韩伦理电影| 日韩中文字幕91| 一区二区高清免费观看影视大全| 中文字幕二三区不卡| 久久综合给合久久狠狠狠97色69| 欧美日韩日日摸| 在线免费亚洲电影| 色综合久久久久网| av在线综合网| 成人黄色片在线观看| 国产成人综合网站| 国内精品第一页| 看片的网站亚洲| 蜜臀av性久久久久蜜臀aⅴ| 日本中文字幕一区二区有限公司| 亚洲一区二区中文在线| 亚洲乱码国产乱码精品精的特点 | 欧美电视剧免费全集观看| 欧美日韩一区二区欧美激情| www.亚洲免费av| 一区二区三区丝袜| 国产精品久久毛片av大全日韩| 国产偷国产偷精品高清尤物| 欧美岛国在线观看| 欧美一区二区大片| 欧美精品久久久久久久多人混战|