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

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

?? gcm_mimg.cpp.svn-base

?? fast marching method
?? SVN-BASE
字號:
/*------------------------------------------------------------------------------------------------------    File        : gcm_MImg.cpp  Description : Example of use of the GCM library  Author      : 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.    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.    --------------    Technical Comments and Detailled description:   - Goal: example of use of the GCM library.   - Tasks:   * loading of the data (image, starting point, optional mask)   * initialization of the objects   * Computation the distance function/optimal dynamics/confidence statistics within the mask   * Saving distance function/optimal dynamics/confidence statistics    ----------------------------------------------------------------------------------------------------*/#include <iostream>#include <cfloat>#include <climits>#include <vector>#include <string>#include "MImg.h"#include "AnisotropicTensorDistance.h"#include "AnisotropicTensorDistanceConfidence.h"using namespace cimg_library;using namespace std;using namespace FastLevelSet;typedef float T;template<typename T>std::vector<MImg<T> > singlePointConnectivity(const MImg<T>& tensor, const MImg<T>& tensor_power, const MImg<T>& mask, const int& x0, const int& y0, const int& z0, const T& alpha) {    std::vector<MImg<T> > results; // Distance, dynamics, mean, std, min    // Fast marching initialization    cout << std::endl; cout.flush();    cout << "* Initializing for voxel " << x0 << ", " << y0 << ", " << z0 << "... "; cout.flush();    MImg<T> dist(tensor.width,tensor.height,tensor.depth);    dist.fill(FLT_MAX);    AnisotropicTensorDistanceConfidence<T> march(dist.data,dist.width,dist.height,dist.depth,mask.data,tensor.data,tensor_power.data,alpha);    cout << "OK" << endl;    dist(x0,y0,z0) = 0;    march.AddTrialPoint(x0,y0,z0);    // Compute the distance function, the optimal dynamics and confidence statistics, within the mask    cout << "* Working... "; cout.flush();    march.Run();    cout << "OK" << endl;    // Store it    results.push_back(dist);    // Extract optimal dynamics    // It is already computed; the computational result of the optimal dynamics is stacked in some variables of the "march" object)    MImg<T> optDynamics(tensor.width,tensor.height,tensor.depth,3);    cimg_mapXYZ(optDynamics,x,y,z) {        optDynamics(x,y,z,0) = march.getOptDynamics(x,y,z,0);        optDynamics(x,y,z,1) = march.getOptDynamics(x,y,z,1);        optDynamics(x,y,z,2) = march.getOptDynamics(x,y,z,2);    }    // Store it    results.push_back(optDynamics);    // Get confidence    // As the optimal dynamics, the confidence is already computed)    MImg<T> confidenceMean(tensor.width,tensor.height,tensor.depth);    MImg<T> confidenceStd(tensor.width,tensor.height,tensor.depth);    MImg<T> confidenceMin(tensor.width,tensor.height,tensor.depth);    cimg_mapXYZ(confidenceMean,x,y,z) {        if (x==x0 && y==y0 && z==z0) {            confidenceMean(x,y,z) = 0.0;            confidenceStd(x,y,z) = 0.0;            confidenceMin(x,y,z) = 0.0;        } else {            confidenceMean(x,y,z) = march.getConfidenceMean(x,y,z) / dist(x,y,z);            confidenceStd(x,y,z) = std::sqrt(std::max(march.getConfidenceStd(x,y,z) / dist(x,y,z) - confidenceMean(x,y,z)*confidenceMean(x,y,z),(T)0.0));            confidenceMin(x,y,z) = march.getConfidenceMin(x,y,z);        }    }    // Now post process the confidence minimum    cimg_mapXYZ(confidenceMin,x,y,z)            confidenceMin(x,y,z) = (confidenceMin(x,y,z) == FLT_MAX) ? 0 : confidenceMin(x,y,z);    // Store everything    results.push_back(confidenceMean);    results.push_back(confidenceStd);    results.push_back(confidenceMin);    return results;}int main(int argc, char **argv) {    // Parameters    cimg_usage("Geodesic Connectivity Mapping (Index of connectivity)\n");    const string tensors_name = cimg_option("-i","","Diffusion Tensor image : filein DTI");    const string origin = cimg_option("-p","-1,-1,-1","Point of interest : string");    const string roi = cimg_option("-r","","Region of interest : filein mask | OPTIONAL");    const string mask_name = cimg_option("-m","","Mask : filein mask | OPTIONAL");    const T alpha = cimg_option("-a",0.0,"Metric power : float");    const string distance_name = cimg_option("-dist","distance.hdr","Distance output : fileout SCL");    const string odyn_name = cimg_option("-odyn","dynamics.hdr","Optimal dynamics output : fileout SCL");    const string cmean_name = cimg_option("-mean","connectivity_mean.hdr","Confidence mean output : fileout SCL");    const string cstd_name = cimg_option("-std","connectivity_std.hdr","Confidence std output : fileout SCL");    const string cmin_name = cimg_option("-min","connectivity_min.hdr","Confidence min output : fileout SCL");    if (cimg_option("-h",(const char *)0,0)) return 0;    if (argc<4) {        cerr << "Not enough arguments" << endl;        return 1;    }    // Load the tensor field    cout << "* Loading tensor field from '" << tensors_name << "'... "; cout.flush();    if (tensors_name == "") throw CImgException("GCM: Please provide a Diffusion Tensor Image");    MImg<T> tensor(tensors_name.c_str());    cout << tensor.width << " x " << tensor.height << " x " << tensor.depth << " x " << tensor.dim << " "; cout.flush();    cout << "OK" << endl;    // Load the mask    cout << "* Loading mask from '" << mask_name << "'... "; cout.flush();    if (mask_name == "") throw CImgException("GCM: Please provide a mask of the region (full brain, hemisphere, segmentation ...) to work on");    MImg<T> mask(mask_name.c_str());    cout << mask.width << " x " << mask.height << " x " << mask.depth << " "; cout.flush();    cout << "OK" << endl;    // Tensors power    MImg<T> tensor_power = tensor;    // tensor_power already contains tensor and if alpha==0 the code in    // AnisotropicTensorDistanceConfidence.h (l. 62) will explicitely compute the Euclidean norm of the dynamics    if (alpha != 0.0 && alpha != 1.0) {        cout << "* Computing tensors power for confidence estimation ... "; cout.flush();        MImg<T> val(3,1,1,1), valM(3,3,1,1), vec(3,3,1,1);        valM.fill(0.0);		vec.fill(0.0);        cimg_mapXYZ(tensor_power,x,y,z) {            const MImg<T> D = tensor_power.get_tensor(x,y,z);			if (D(0,0)>std::numeric_limits<T>::epsilon()) {				D.symeigen(val,vec);				valM(0,0) = std::pow(val(0),alpha);				valM(1,1) = std::pow(val(1),alpha);				valM(2,2) = std::pow(val(2),alpha);				tensor_power.set_tensor(vec.get_transpose()*valM*vec,x,y,z);			}		}        cout << "OK" << endl;    }    // Compute everything    MImg<T> dummyinit(tensor.width, tensor.height, tensor.depth);    dummyinit.fill(0);    std::vector<MImg<T> > results;    int x0,y0,z0;    if (origin != "-1,-1,-1") {        sscanf(origin.c_str(),"%d,%d,%d",&x0,&y0,&z0);        results = singlePointConnectivity(tensor, tensor_power, mask, x0, y0, z0, alpha);    } else if (roi != "") {        MImg<T> seeds(roi.c_str());        for (unsigned i=0; i<5; ++i) results.push_back(dummyinit);        cimg_mapXYZ(seeds,x,y,z) {            if (seeds(x,y,z)>0) {                std::vector<MImg<T> > voxelresults = singlePointConnectivity(tensor, tensor_power, mask, x, y, z, alpha);                for (unsigned i=0; i<5; ++i) results[i] += voxelresults[i];            }        }    } else throw CImgException("GCM: Please provide a point or a region of interest");    cout << std::endl; cout.flush();    // Save the result    if (distance_name != "") {        cout << "* Saving distance to '" << distance_name << "'... "; cout.flush();        results[0].SetTransform(tensor.GetTransform());        results[0].Save(distance_name.c_str());        cout << "OK" << endl;    }    if (odyn_name != "") {        cout << "* Saving optimal dynamics to '" << odyn_name << "'... "; cout.flush();        results[1].SetTransform(tensor.GetTransform());        results[1].Save(odyn_name.c_str());        cout << "OK" << endl;    }    if (cmean_name != "") {        cout << "* Saving connectivity mean to '" << cmean_name << "'... "; cout.flush();        results[2].SetTransform(tensor.GetTransform());        results[2].Save(cmean_name.c_str());        cout << "OK" << endl;    }    if (cstd_name != "") {        cout << "* Saving connectivity standard deviation to '" << cstd_name << "'... "; cout.flush();        results[3].SetTransform(tensor.GetTransform());        results[3].Save(cstd_name.c_str());        cout << "OK" << endl;    }    if (cmin_name != "") {        cout << "* Saving confidence minimum to '" << cmin_name << "'... "; cout.flush();        results[4].SetTransform(tensor.GetTransform());        results[4].Save(cmin_name.c_str());        cout << "OK" << endl;    }    return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产色产综合产在线视频| 欧美亚州韩日在线看免费版国语版| 久久精品99国产精品日本| 久久精品国产亚洲a| 成人免费视频国产在线观看| 日本乱码高清不卡字幕| 91蝌蚪porny九色| 91麻豆精品国产综合久久久久久| 久久免费电影网| 午夜视频一区二区| 本田岬高潮一区二区三区| 欧美日本在线播放| 国产精品护士白丝一区av| 亚洲成人激情av| 免费欧美在线视频| 国产成人av影院| 欧美精品日韩一本| 国产精品国产精品国产专区不蜜 | 色综合天天综合| 欧美一个色资源| 亚洲精品日日夜夜| 成人精品一区二区三区四区| 91麻豆国产福利精品| 精品动漫一区二区三区在线观看| 亚洲一区二区三区自拍| 日韩av电影免费观看高清完整版在线观看 | 国产a级毛片一区| 在线电影院国产精品| 国产精品视频一区二区三区不卡| 亚洲成年人影院| 亚洲成人综合在线| 久久亚洲免费视频| 成人久久18免费网站麻豆 | 亚洲一区二区三区四区不卡| 韩国精品主播一区二区在线观看 | 美国三级日本三级久久99| 91视频国产观看| 欧美国产日韩精品免费观看| 午夜久久久久久| 99re8在线精品视频免费播放| 欧美xfplay| 捆绑紧缚一区二区三区视频 | 美腿丝袜在线亚洲一区| 欧美午夜免费电影| 亚洲欧美日韩国产手机在线 | 91亚洲精华国产精华精华液| 欧美激情中文字幕| 国产在线播放一区| 欧美激情一区在线| 成人av综合在线| 国产精品―色哟哟| 99久久婷婷国产综合精品| 久久伊99综合婷婷久久伊| 久久99国产精品久久99 | 高清久久久久久| 亚洲天堂精品视频| 欧美视频日韩视频在线观看| 人人爽香蕉精品| 久久久噜噜噜久噜久久综合| 成人av集中营| 日韩一区精品字幕| 精品国一区二区三区| 99在线精品视频| 亚洲成av人片在线| 国产精品久久免费看| 99久久精品国产麻豆演员表| 亚洲乱码国产乱码精品精可以看| 欧美人体做爰大胆视频| 久久超碰97人人做人人爱| 国产精品午夜春色av| 欧美日韩国产一级二级| 国产久卡久卡久卡久卡视频精品| 1024精品合集| 亚洲精品一区二区三区影院| 91色在线porny| 国内精品久久久久影院一蜜桃| 最新成人av在线| 日韩欧美不卡在线观看视频| 丰满白嫩尤物一区二区| 三级在线观看一区二区| 最新国产の精品合集bt伙计| 欧美成人乱码一区二区三区| 一本一道波多野结衣一区二区| 久久国产精品99精品国产| 亚洲激情一二三区| 久久久精品国产免大香伊 | 久久精品一区二区三区四区| 91国偷自产一区二区三区成为亚洲经典| 日韩激情av在线| 亚洲视频在线观看三级| 精品国产乱码久久久久久图片| 色婷婷久久久亚洲一区二区三区| 久久国产免费看| 日本女人一区二区三区| 亚洲欧美日韩久久精品| 中文字幕高清一区| 欧美xxxxxxxx| 欧美一级二级三级蜜桃| 欧美剧情片在线观看| 色一情一乱一乱一91av| 国产91精品精华液一区二区三区| 免费欧美高清视频| 婷婷六月综合网| 亚洲第一二三四区| 亚洲综合色视频| 亚洲黄色免费网站| 亚洲人成亚洲人成在线观看图片 | 欧美一级欧美一级在线播放| 色综合色综合色综合色综合色综合| 国产乱人伦偷精品视频不卡| 久久国产剧场电影| 奇米影视一区二区三区小说| 亚洲成av人影院| 亚洲国产va精品久久久不卡综合| 亚洲欧美视频在线观看| 亚洲视频在线观看三级| 亚洲美女视频在线观看| 亚洲免费成人av| 一区二区三区在线视频观看| 亚洲女女做受ⅹxx高潮| 一区二区三区在线免费观看| 亚洲精品一二三四区| 亚洲主播在线观看| 亚洲成人动漫在线免费观看| 丝袜美腿亚洲一区二区图片| 日韩不卡在线观看日韩不卡视频| 奇米综合一区二区三区精品视频 | 成人国产精品免费观看视频| 成人白浆超碰人人人人| av电影在线观看完整版一区二区| 97久久人人超碰| 欧美专区在线观看一区| 欧美亚洲另类激情小说| 日韩欧美一区二区久久婷婷| 久久在线观看免费| 亚洲婷婷综合色高清在线| 一个色综合网站| 免费国产亚洲视频| 国产在线一区观看| a美女胸又www黄视频久久| 日韩欧美中文一区二区| 日韩一区二区三| 久久久激情视频| 自拍偷拍国产精品| 日韩精品一二三| 国产成人av自拍| 欧洲av在线精品| 久久综合久久综合亚洲| 中文字幕在线观看不卡| 午夜视频一区二区| 福利一区福利二区| 欧美日韩高清不卡| 欧美高清在线一区| 五月婷婷欧美视频| 国产精品资源在线看| 欧美日韩中文字幕一区| 精品国产麻豆免费人成网站| 亚洲少妇中出一区| 韩国成人精品a∨在线观看| 99久久精品免费看国产免费软件| 欧美主播一区二区三区| 久久青草欧美一区二区三区| 亚洲精品高清在线观看| 久久66热re国产| 欧美午夜免费电影| 欧美国产亚洲另类动漫| 日本中文字幕不卡| 国产不卡视频一区| 欧美另类久久久品| 最新高清无码专区| 国产一区二区精品久久| 欧美日本韩国一区二区三区视频| 中文字幕永久在线不卡| 精品一区二区三区影院在线午夜 | 亚洲不卡一区二区三区| 国产99精品国产| 精品国产sm最大网站免费看| 亚洲国产精品天堂| 不卡电影一区二区三区| 精品国产乱码久久久久久1区2区| 亚洲愉拍自拍另类高清精品| 成人国产一区二区三区精品| 精品国产一二三| 日韩av二区在线播放| 欧美日韩一区二区三区在线| 最新国产精品久久精品| 国内精品第一页| 日韩一区二区精品葵司在线| 夜夜嗨av一区二区三区中文字幕| fc2成人免费人成在线观看播放 | 欧美一区二区三区四区久久| 一区二区三区加勒比av| 91美女片黄在线| 亚洲欧洲精品一区二区三区不卡| 粉嫩在线一区二区三区视频| 国产亚洲一区二区在线观看| 国产一区啦啦啦在线观看| 精品卡一卡二卡三卡四在线| 蜜桃av一区二区| 欧美成人一区二区三区在线观看|