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

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

?? anisotropictensordistance.h.svn-base

?? fast marching method
?? SVN-BASE
?? 第 1 頁 / 共 2 頁
字號:
                return true;            }            void PseudoInverseMatrix2x2(Matrix2x2 &in) {                Matrix2x2 M,inT;                TransposeMatrix2x2(in,inT);                MultiplyMatrix2x2(inT,in,M);                InverseMatrix2x2(M);                MultiplyMatrix2x2(M,inT,in);            }        };   // end of the declaration of the class "Hamiltonian". =====================        // Hamiltonian        Hamiltonian *hamiltonian;    public:        // Constructor        AnisotropicTensorDistance(T *_data, int _width, int _height, int _depth, T* mask, T *tensor, double *_voro = NULL, T _dx = T(1), T _dy = T(1), T _dz = T(1)) :            PradosSchemesForFastMarching_3D<T>(_data,_width,_height,_depth,_voro), dx(_dx), dy(_dy), dz(_dz) {            // Allocation and initialization of the Hamiltonian from the tensor field            hamiltonian = new Hamiltonian[this->size];            for (int x=0;x<this->width;x++) for (int y=0;y<this->height;y++) for(int z=0;z<this->depth;z++) {                const int n = this->_offset(x,y,z);                if (mask[n]) {                    Matrix3x3 B = { { tensor[n], tensor[n+this->size], tensor[n+2*this->size] },                                    { tensor[n+this->size], tensor[n+3*this->size], tensor[n+4*this->size] },                                    { tensor[n+2*this->size], tensor[n+4*this->size], tensor[n+5*this->size] }};                                    if (!hamiltonian[n].InitFromB(B)) {                                        std::cerr << "Null tensor was found at ("<< x << ", " << y << ", " << z << "), discarding from mask..." << std::endl;                                        mask[n] = 0;                                        this->AddForbiddenPoint(x,y,z);                                    }                } else this->AddForbiddenPoint(x,y,z);            }        }        // Destructor        virtual ~AnisotropicTensorDistance() {            delete [] hamiltonian;        }        virtual void setOptDynamics(int x, int y, int z, T component1, T component2, T component3) const {            const int n = this->_offset(x,y,z);            const Matrix3x3 &iB = hamiltonian[n].invB;            const T &norm = std::sqrt(iB[0][0]*component1*component1 + iB[1][1]*component2*component2 + iB[2][2]*component3*component3 + 2*iB[0][1]*component1*component2 + 2*iB[0][2]*component1*component3 + 2*iB[1][2]*component2*component3);            this->OptDynamics[n][0] = component1/norm;            this->OptDynamics[n][1] = component2/norm;            this->OptDynamics[n][2] = component3/norm;        }    protected:        virtual bool eqSolverOnPart_with_s1s2s3_nonNull(            const T U1, const T U2, const T U3,             // Values of the solution at the considered neigborhood voxels,            const int s1, const int s2, const int s3,       // signs associated to the considered sector,            const int x, const int y, const int z,          // coordinates of the considered voxel,            T &Root,                                        // solution.            T &optDymamics1,    T &optDymamics2,    T &optDymamics3 // optimal dynamic associated to the solution.            ) const {            if (U1==this->big || U2==this->big || U3==this->big) return false; // of course there is no such solution :-)            // Solving of the equation            // p_t^T B p_t - 1 = 0            T t1=this->big, t2=this->big;            const Matrix3x3 &B = hamiltonian[this->_offset(x,y,z)].B;            if (basicAnisoEikonalEq_3D(                B[0][0], B[0][1], B[0][2],                         B[1][1], B[1][2],                                  B[2][2],                U1,U2,U3,                s1*dx,s2*dy,s3*dz,                t1, t2)) {                // test of p_t1:            ($[p_t]_i = [ t-u(x+sihiei)] / (-sihi)$.)                T  // description of p_t1                    p_t1_1 =  ( t1-U1 ) / (-s1*dx),                    p_t1_2 =  ( t1-U2 ) / (-s2*dy),                    p_t1_3 =  ( t1-U3 ) / (-s3*dz);                // with this equation, the optimal dymamics $f(x,a_p)$ associated to a vector $p$  is $B*p$.                // So the optimal dynamics associated to $t1$ is $B*p_t1$:                optDymamics1 =                    // Bp_t1_1 =                                B[0][0]*p_t1_1 + B[0][1]*p_t1_2 + B[0][2]*p_t1_3;                optDymamics2 =                    // Bp_t1_2 =                                B[0][1]*p_t1_1 + B[1][1]*p_t1_2 + B[1][2]*p_t1_3;                optDymamics3 =                    // Bp_t1_3 =                                B[0][2]*p_t1_1 + B[1][2]*p_t1_2 + B[2][2]*p_t1_3;                // if for all i, [B*p_t1]_i < 0 then t1 is the solution                if ( (optDymamics1*s1 < 0) && (optDymamics2*s2 < 0) && (optDymamics3*s3 < 0) ) {                    Root = t1;                    return true;                }                // test of p_t2:                T                    p_t2_1 =  ( t2-U1 ) / (-s1*dx),                    p_t2_2 =  ( t2-U2 ) / (-s2*dy),                    p_t2_3 =  ( t2-U3 ) / (-s3*dz);                // The optimal dynamics associated to $t2$ is $B*p_t2$:                optDymamics1 =                    //  Bp_t2_1 =                                B[0][0]*p_t2_1 + B[0][1]*p_t2_2 + B[0][2]*p_t2_3;                optDymamics2 =                    //  Bp_t2_2 =                                B[0][1]*p_t2_1 + B[1][1]*p_t2_2 + B[1][2]*p_t2_3;                optDymamics3 =                    //  Bp_t2_3 =                                B[0][2]*p_t2_1 + B[1][2]*p_t2_2 + B[2][2]*p_t2_3;                // if for all i, [B*p_t2]_i < 0 then t2 is the solution                if ( (optDymamics1*s1 < 0) && (optDymamics2*s2 < 0) && (optDymamics3*s3 < 0) ) {                    Root = t2;                    return true;                }            }            // There is no solution            return  false;        }        virtual bool eqSolverOnPart_withOne_si_Null(            const T U1, const T U2, const T U3,            const int s1, const int s2, const int s3,            const int x, const int y, const int z,            const int indice_si_EqualZero,            T &Root,            T &optDymamics1,    T &optDymamics2,    T &optDymamics3            ) const {            const int n = this->_offset(x,y,z);            if (indice_si_EqualZero==1) {                if (U2==this->big || U3==this->big) return false; // of course there is no such solution :-)                const Matrix2x2 &invinvB = hamiltonian[n].invinvB1;                return solveInDim2(invinvB[0][0], invinvB[0][1], invinvB[1][1], U2, U3, s2, s3, dy, dz, Root,optDymamics2,optDymamics3);            }            if (indice_si_EqualZero==2) {                if (U1==this->big || U3==this->big) return false; // of course there is no such solution :-)                const Matrix2x2 &invinvB = hamiltonian[n].invinvB2;                return solveInDim2(invinvB[0][0], invinvB[0][1], invinvB[1][1], U1, U3, s1, s3, dx, dz, Root,optDymamics1,optDymamics3);            }            if (indice_si_EqualZero==3) {                if (U1==this->big || U2==this->big) return false; // of course there is no such solution :-)                const Matrix2x2 &invinvB = hamiltonian[n].invinvB3;                return solveInDim2( invinvB[0][0], invinvB[0][1], invinvB[1][1], U1, U2, s1, s2, dx, dy, Root,optDymamics1,optDymamics2);            }            // In any case, indice_si_EqualZero must be equal to 1, 2 or 3 !!!!!            assert(false);            return  false;        }        virtual bool eqSolverOnPart_withTwo_si_Null(            const T U1, const T U2, const T U3,            const int s1, const int s2, const int s3,            const int x, const int y, const int z,            const int indice_si_DiffZero,            T &Root,            T &optDymamics1,    T &optDymamics2,    T &optDymamics3            ) const {            const int n = this->_offset(x,y,z);            if (indice_si_DiffZero==1) {                if (U1==this->big) return false; // of course there is no such solution :-)                return solveInDim1(hamiltonian[n].invsqinvA1,U1,s1,dx,Root,optDymamics1);            }            if (indice_si_DiffZero==2) {                if (U2==this->big) return false; // of course there is no such solution :-)                return solveInDim1(hamiltonian[n].invsqinvA2,U2,s2,dy,Root,optDymamics2);            }            if (indice_si_DiffZero==3) {                if (U3==this->big) return false; // of course there is no such solution :-)                return solveInDim1(hamiltonian[n].invsqinvA3,U3,s3,dz,Root,optDymamics3);            }            // In any case, indice_si_DiffZero must be equal to 1, 2 or 3 !!!!!            assert(false);            return  false;        }        bool solveInDim2(            const T C00, const T C01,                         const T C11,            const T U1, const T U2,            const int s1, const int s2,            const T dx1, const T dx2,            T &root,            T &optDymamics1,    T &optDymamics2) const {            // Solving of the equation            // p_t^T C p_t - 1 = 0            T t1=this->big, t2=this->big;            if (basicAnisoEikonalEq_2D(C00, C01, C11, U1, U2, s1*dx1, s2*dx2, t1, t2)) {                // test of p_t1:            ($[p_t]_i = [ t-u(x+sihiei)] / (-sihi)$.)                T  // description of p_t1                    p_t1_1 =  ( t1-U1 ) / (-s1*dx1),                    p_t1_2 =  ( t1-U2 ) / (-s2*dx2);                // The optimal dynamics associated to $t1$ is $C*p_t1$:                optDymamics1 = // Cp_t1_1 =                                            C00*p_t1_1 + C01*p_t1_2;                optDymamics2 = // Cp_t1_2 =                                            C01*p_t1_1 + C11*p_t1_2;                // if for all i, [C*p_t1]_i < 0 then t1 is the solution                if ( (optDymamics1*s1 < 0) && (optDymamics2*s2 < 0) ) {                    root = t1;                    return true;                }                // test of p_t2:                T   p_t2_1 =  ( t2-U1 ) / (-s1*dx1),                    p_t2_2 =  ( t2-U2 ) / (-s2*dx2);                // The optimal dynamics associated to $t2$ is $C*p_t2$:                optDymamics1 = // Cp_t2_1 =                                            C00*p_t2_1 + C01*p_t2_2;                optDymamics2 = // Cp_t2_2 =                                            C01*p_t2_1 + C11*p_t2_2;                // if for all i, [B*p_t2]_i < 0 then t2 is the solution                if ( (optDymamics1*s1 < 0) && (optDymamics2*s2 < 0) ) {                    root = t2;                    return true;                }            }            // There is no solution            return  false;        }        bool solveInDim1(            const T C00,            const T U1,            const int s1,            const T dx1,            T &root,            T &optDymamics1) const {            // The 1D case is particularly simple            if (C00>0) {                T sqrtC00 = (T)std::sqrt(C00);                root = U1 + dx1 / sqrtC00;                optDymamics1 = -s1 * sqrtC00;                return true;            }            return false;        }        //////////////////////////////////////////////////////////////////////////        // Inversion of the eikonal equation in a given simplex        bool basicAnisoEikonalEq_2D(            T c11, T c12,               // Matrix C                T c22,            T u1, T u2,                 // Some values of U            T dx1, T dx2,               // Signed mesh size            T &sol_max,  T &sol_min) const {            const T dx1_2 = dx1*dx1;            const T dx2_2 = dx2*dx2;            const T d1 = dx2_2*c11;            const T d2 = dx1_2*c22;            const T d12 = 2*dx1*dx2*c12;            const T a = d1 + d2 + d12;            const T b = - T(2)*d1*u1 - T(2)*d2*u2 - d12*(u1+u2);            const T c = d1*u1*u1 + d2*u2*u2 + d12*u1*u2 - dx1_2*dx2_2;            return this->_SolveTrinome(a,b,c,sol_max,sol_min);        }        bool basicAnisoEikonalEq_3D(            T c11, T c12, T c13,        // Matrix C                T c22, T c23,                        T c33,            T u1, T u2, T u3,           // Some values of U            T dx1, T dx2, T dx3,        // Signed mesh size            T &sol_max,  T &sol_min) const {            const T dx1_2 = dx1*dx1;            const T dx2_2 = dx2*dx2;            const T dx3_2 = dx3*dx3;            const T d1 = dx2_2*dx3_2*c11;            const T d2 = dx1_2*dx3_2*c22;            const T d3 = dx1_2*dx2_2*c33;            const T d12 = 2*dx1*dx2*dx3_2*c12;            const T d13 = 2*dx1*dx2_2*dx3*c13;            const T d23 = 2*dx1_2*dx2*dx3*c23;            const T a = d1 + d2 + d3 + d12 + d13 + d23;            const T b = - 2*d1*u1 - 2*d2*u2 - 2*d3*u3 - d12*(u1+u2) - d13*(u1+u3) - d23*(u2+u3);            const T c = d1*u1*u1 + d2*u2*u2 + d3*u3*u3 + d12*u1*u2 + d13*u1*u3 + d23*u2*u3 - dx1_2*dx2_2*dx3_2;            return this->_SolveTrinome(a,b,c,sol_max,sol_min);        }    }; // End of the class AnisotropicTensorDistance.} // End of the namespace "FastLevelSet".#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频一区 二区 三区| 一区二区在线免费观看| 国产精品女人毛片| 亚洲高清一区二区三区| 国产真实乱对白精彩久久| 色婷婷久久久亚洲一区二区三区| 日韩欧美亚洲另类制服综合在线| 国产精品久久毛片| 黄色精品一二区| 欧美日韩国产小视频在线观看| 久久久www免费人成精品| 日韩福利电影在线| 色悠久久久久综合欧美99| 久久久九九九九| 人人精品人人爱| 欧美日韩在线一区二区| 国产精品久久久久婷婷| 精品一区二区三区欧美| 欧美欧美欧美欧美| 一个色在线综合| 色综合久久99| 日韩伦理电影网| 成人av网在线| 国产精品久久久久影院亚瑟| 国产综合色在线视频区| 欧美一级夜夜爽| 日韩精品成人一区二区在线| 欧美系列亚洲系列| 一区二区三区高清在线| 99re8在线精品视频免费播放| 亚洲国产精品精华液2区45| 狠狠v欧美v日韩v亚洲ⅴ| 欧美一级二级在线观看| 日本欧美加勒比视频| 欧美一卡二卡在线| 蜜臀精品久久久久久蜜臀| 欧美高清视频不卡网| 亚洲va欧美va国产va天堂影院| av高清不卡在线| 国产精品成人免费精品自在线观看| 国产毛片精品视频| 国产欧美一区二区精品秋霞影院| 国产精品亚洲第一区在线暖暖韩国 | 色悠悠亚洲一区二区| 综合中文字幕亚洲| 91久久人澡人人添人人爽欧美| 亚洲人精品一区| 欧美日韩中文字幕精品| 天天影视网天天综合色在线播放| 欧美精品一二三| 激情综合色综合久久| 久久精品视频在线看| 99re在线视频这里只有精品| 一区二区三区视频在线看| 欧美日韩亚州综合| 精品影视av免费| 国产日韩三级在线| 日本高清视频一区二区| 午夜成人在线视频| 久久久不卡网国产精品二区| 99精品黄色片免费大全| 亚洲1区2区3区4区| 26uuu亚洲| 色网站国产精品| 日日摸夜夜添夜夜添亚洲女人| 欧美精品一区二区三区视频| 国产福利精品导航| 一区二区在线电影| 精品国产污污免费网站入口| 99国内精品久久| 另类小说综合欧美亚洲| 国产精品系列在线| 欧美精品第一页| kk眼镜猥琐国模调教系列一区二区 | 欧美巨大另类极品videosbest | 日韩欧美国产小视频| 成人一级黄色片| 偷窥少妇高潮呻吟av久久免费| 久久精品日产第一区二区三区高清版| 99re在线视频这里只有精品| 久久er99热精品一区二区| 亚洲日本电影在线| 亚洲精品在线观看网站| 91成人免费电影| 国产精品一区二区视频| 亚洲国产精品一区二区久久| 国产欧美日韩另类一区| 制服丝袜中文字幕一区| 成人av午夜影院| 久久99蜜桃精品| 亚洲午夜久久久久久久久久久 | 极品少妇一区二区| 亚洲一区在线视频| 1000部国产精品成人观看| 欧美xxxx老人做受| 精品视频一区二区不卡| 一本色道久久综合精品竹菊 | 欧美a一区二区| 一区二区三区不卡在线观看 | 亚洲国产精品一区二区www | aaa欧美色吧激情视频| 蜜臀va亚洲va欧美va天堂| 一区二区三区欧美视频| 国产精品不卡视频| 国产精品欧美精品| 国产女人aaa级久久久级 | 欧美午夜片在线看| 色老汉一区二区三区| 99在线精品视频| 99riav一区二区三区| 菠萝蜜视频在线观看一区| 国产精品1区2区| 国产99久久久久| 成人一区在线看| 国产99一区视频免费 | 国产亲近乱来精品视频| 精品福利av导航| 欧美精品一区二区三区视频 | 678五月天丁香亚洲综合网| 欧美日韩在线播放一区| 欧美日韩国产在线播放网站| 欧美自拍偷拍一区| 欧美高清www午色夜在线视频| 在线播放中文字幕一区| 欧美精品少妇一区二区三区| 欧美精品一卡两卡| 欧美不卡视频一区| 久久久久久99久久久精品网站| 国产日韩精品一区二区浪潮av| 国产精品视频在线看| 中文字幕一区二区在线观看| 亚洲免费观看高清完整版在线观看| 亚洲男人天堂一区| 午夜精品免费在线| 卡一卡二国产精品| 国产精品 欧美精品| 色综合咪咪久久| 欧美日韩在线播放三区四区| 日韩精品中文字幕在线一区| 久久先锋影音av| 亚洲欧美激情插| 午夜欧美大尺度福利影院在线看| 天堂精品中文字幕在线| 精品一区二区精品| av在线一区二区三区| 欧美日韩一二区| 欧美成人高清电影在线| 国产精品乱码人人做人人爱| 亚洲午夜一二三区视频| 狠狠色综合播放一区二区| 99久久国产免费看| 欧美一区二区在线不卡| 中文字幕免费一区| 午夜久久福利影院| 成人av高清在线| 欧美精品一卡二卡| 中文字幕在线不卡一区二区三区| 午夜精彩视频在线观看不卡| 国产剧情一区在线| 欧美日韩一级二级| 国产精品每日更新| 免费成人小视频| 91网址在线看| 久久青草欧美一区二区三区| 亚洲www啪成人一区二区麻豆| 国产精品888| 91精品国产综合久久久久久漫画 | 91精品综合久久久久久| 中文字幕第一区第二区| 蜜臀精品一区二区三区在线观看| 99精品国产视频| 国产欧美综合在线观看第十页| 视频在线观看一区| 91免费小视频| 国产午夜精品一区二区 | 欧美一区二区三区四区在线观看 | 日本在线不卡一区| 一本大道久久a久久综合| 久久精品无码一区二区三区| 日本亚洲电影天堂| 欧美色综合久久| 亚洲人成网站精品片在线观看| 韩国成人在线视频| 91精选在线观看| 天天综合天天综合色| 色妞www精品视频| 欧美—级在线免费片| 国内精品在线播放| 欧美一级片在线看| 丝袜美腿亚洲色图| 欧美三级在线播放| 亚洲精品国产第一综合99久久| 成人国产精品免费观看动漫| 久久伊人中文字幕| 精品亚洲国内自在自线福利| 欧美精三区欧美精三区| 无吗不卡中文字幕| 欧美日韩一区精品| 午夜成人免费视频| 欧美精品久久99久久在免费线|