{"id":18257134,"url":"https://github.com/yzhong52/thinvesselsegmentation","last_synced_at":"2025-06-13T01:04:17.416Z","repository":{"id":11394588,"uuid":"13838976","full_name":"yzhong52/ThinVesselSegmentation","owner":"yzhong52","description":"C++ implementation of vesselness measure (or vesselness filter). Both CPU and GPU version are available. ","archived":false,"fork":false,"pushed_at":"2017-11-25T15:52:20.000Z","size":165900,"stargazers_count":43,"open_issues_count":0,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-04T18:38:41.829Z","etag":null,"topics":["image-processing"],"latest_commit_sha":null,"homepage":"https://yzhong52.github.io/2014/01/31/vessel.html","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ToasterKTN/SphereWorld","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yzhong52.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-24T17:23:37.000Z","updated_at":"2024-12-25T02:25:04.000Z","dependencies_parsed_at":"2022-08-31T06:50:58.012Z","dependency_job_id":null,"html_url":"https://github.com/yzhong52/ThinVesselSegmentation","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/yzhong52/ThinVesselSegmentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yzhong52%2FThinVesselSegmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yzhong52%2FThinVesselSegmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yzhong52%2FThinVesselSegmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yzhong52%2FThinVesselSegmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yzhong52","download_url":"https://codeload.github.com/yzhong52/ThinVesselSegmentation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yzhong52%2FThinVesselSegmentation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259559625,"owners_count":22876494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-processing"],"created_at":"2024-11-05T10:24:57.554Z","updated_at":"2025-06-13T01:04:17.383Z","avatar_url":"https://github.com/yzhong52.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Thin Vessels Segmentation\n========================\n\nModules\n---------------\n\n-   **Core**\n\n    Including general data stuctures for 3D volume, data I/O, data visualization, simple 3D image processing and etc. \n\n-   **Vesselness**\n\n    This is a C++ implementation of Vesselness Measure for 3D volume based on the following paper [Frangi](http://link.springer.com/chapter/10.1007/BFb0056195#page-1). \n\n    - Frangi, Alejandro F., et al. \"Multiscale vessel enhancement filtering.\" Medical Image Computing and Computer-Assisted Interventation—MICCAI’98. Springer Berlin Heidelberg, 1998. 130-137.\n\n    Two sample code is provided in `main.cpp`:\n    \n    - Computing vesselness measure\n    - Extracting the vessel centrelines with non-maximum suppression\n\n    Sample Usage: \n\n    - Setting parameters: \n    \n      \n      [`sigma_from`, `sigma_to`]: the potential size rang of the vessels\n      \n      `sigma_step`: precision of computation\n      \n      For other parameters `alpha`, `beta`, `gamma`, please refer to Frangi's papaer or this [blog](http://yzhong.co/?p=351) or Frangi's paper. \n\n        ```\n        float sigma_from = 1.0f;  \n        float sigma_to = 8.10f;   \n        float sigma_step = 0.5f;  \n        float alpha = 1.0e-1f;\t\n    \tfloat beta  = 5.0e0f;     \n        float gamma = 3.5e5f; \n        ```\n\n    - Laoding data\n\n        ```\n        Data3D\u003cshort\u003e im_short;       \n        bool flag = im_short.load( \"dataname.data\" );         \n        if(!flag) return 0;       \n        ```\n\t\t\n    - Compute Vesselness\n\n        ```\n        Data3D\u003cVesselness_Sig\u003e vn_sig;        \n        VesselDetector::compute_vesselness( im_short, vn_sig,         \n                sigma_from, sigma_to, sigma_step,        \n                alpha, beta, gamma );\n        ```\n\t\n    - Saving Data\n\n        ```\n        vn_sig.save( \"dataname.vn_sig\" );\n        ```\n\n    - If you want to visulize the data using maximum-intensity projection\n\n        ```\n        viewer.addObject( vn_sig,  GLViewer::Volumn::MIP );\n        viewer.addDiretionObject( vn_sig );\n        viewer.go(600, 400, 2);\n        ```\n\n-   **ModelFitting (Levenberg Marquardt algorithm)**\n\n    Fitting geometric models (lines) to the 3D vessel data using Levenberg-Marquardt algorithm. \n\n    Using Levenberg Marquardt algorithm for energy minimization. \n\n    Energy contains two parts:\n\n    - Data cost\n      Distance to the center of a line model\n    - Pair-wise smooth cost\n      Complicated. Please refer to this [paper](http://www.csd.uwo.ca/~yuri/Abstracts/cvpr12-abs.shtml) for more details\n\n    Levenberg Marquardt algorithm requires to compute the Jacobin matrix for both the data cost and the smooth cost. This computation is very time-consuming and the computation has been highly paralleled in this version. \n\n-   **SparseMatrix**\n\n    Sparse matrix representation, contains all necessary matrix manipulations such as: \n    \n      - addtion\n      - subtraction\n      - multiplication\n      - transpose\n   \n-   **SparseMatrixCV**\n\n    OpenCV warper for SparseMatrix. For matrix multiplication between sparse matrix and dense matrix. For example, \n\n    ```\n    template \u003cclass _Tp, int m, int n\u003e    \n    SparseMatrixCV operator*( const cv::Matx\u003c_Tp,m,n\u003e\u0026 vec, const SparseMatrixCV\u0026 sm );     \n    ```\n    ```\n    Mat_\u003cdouble\u003e operator*( const SparseMatrixCV\u0026 sm, const Mat_\u003cdouble\u003e\u0026 sm );    \n    ```\n\n-   **Vesselness-cuda** \n\n    CUDA version of the vesselness measure (under development)\n    \n-   **RingsReduction**\n\n    Rings reduction of CT images (under development)\n    \n-   **EigenDecomp**\n\n    Eigenvalue decomposition of a 3 by 3 symmetric matrix\n\n\n\nRequirements\n---------------\n\n-  **Linux**\n\n\t1. **X Window System** (X11, X, and sometimes informally X-Windows), which is a windowing system for bitmap displays\n\t\n\t    ```\n\t    sudo apt-get install libxmu-dev\n\t    sudo apt-get install libxi-dev\n\t    ```\n\t\n\t2. **OpenGL**\n\t\n\t    `sudo apt-get install mesa-common-dev`\n\n\t3. **glew**\n\t\n\t    `sudo apt-get install libglew-dev`\n\t\n\t4. **freeglut**\n\t\n\t    `sudo apt-get install freeglut3-dev`\n\t\n\t5. **OpenCV 2.4.9**\n\t\n\t    Download [OpenCV](http://opencv.org/). Generate makefile with cmake, build and install the liabrary. \n\t\n\t    ```\n\t    cmake ./\n\t    make\n\t    make install\n\t    ```\n\t    One more thing. Make sure you have added the OpenCV lib direcory to PATH by the following.\n\n\t    `export LD_LIBRARY_PATH=/usr/local/lib/`\n\n\t    `/usr/local/lib` is where the OpenCV libs are located. You could double check by\n\t    \n\t    ```\n\t    pkg-config --libs opencv\n\t    ```\n\n\t6. **Code::Blocks**\n\n\n-  **Windows**\n\n    All the code was written in C++. So it shouldn't be hard to modify and adapt to Windows. As a matter of fact, earlier version of the development was under Windows. \n\n----\n\nSome of the results were eventually published in this paper [Thin Structure Estimation with Curvature Regularization](http://www.csd.uwo.ca/~yuri/Papers/iccv15_thin.pdf). Please check it out :) \n\n\u003cp align=\"center\"\u003e \n\t\u003cimg src=\"vessels.png\"/\u003e\n\u003c/p\u003e\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyzhong52%2Fthinvesselsegmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyzhong52%2Fthinvesselsegmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyzhong52%2Fthinvesselsegmentation/lists"}