{"id":20215348,"url":"https://github.com/kitwaremedical/pylar","last_synced_at":"2025-04-10T14:12:38.895Z","repository":{"id":15181114,"uuid":"17908989","full_name":"KitwareMedical/pyLAR","owner":"KitwareMedical","description":"This repository contains python implementations on Low-rank-plus-sparse, Atlas-to-image Registration (pyLAR) framework and its applications in medical image analysis and computer vision.","archived":false,"fork":false,"pushed_at":"2017-02-19T17:39:19.000Z","size":62975,"stargazers_count":22,"open_issues_count":3,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-10T10:41:01.056Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KitwareMedical.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-19T15:17:02.000Z","updated_at":"2023-10-04T22:28:44.000Z","dependencies_parsed_at":"2022-08-29T01:31:13.634Z","dependency_job_id":null,"html_url":"https://github.com/KitwareMedical/pyLAR","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2FpyLAR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2FpyLAR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2FpyLAR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2FpyLAR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KitwareMedical","download_url":"https://codeload.github.com/KitwareMedical/pyLAR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248232677,"owners_count":21069489,"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":[],"created_at":"2024-11-14T06:21:32.718Z","updated_at":"2025-04-10T14:12:38.866Z","avatar_url":"https://github.com/KitwareMedical.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pyLAR\n=================\n\npyLAR features Python implementations of a low-rank atlas-to-image\nregistration(LAR) framework and its applications in medical image analysis\nand computer vision. The core machine learning technique is Robust PCA.\n\nSubdirectory content:\n* core --- two implementations of RPCA\n* examples -- a couple of ipython notebook examples of running RPCA\n* tests -- testing scripts of the core functionalities\n* low_rank_atlas -- the study of using  RPCA in a low-rank atlas buildling framework\n* eval_utils -- the utilitiy scripts to evaluate the results on the low rank atlas building framework\n\npyLAR contains implementation of the following paper:\n```bibtex\n@article{Liu14,\n    author = {X.~Liu and M.~Niethammer and R.~Kwitt and M.~McCormick and S.~Aylward},\n    title = {Low-Rank to the Rescue – Atlas-based Analyses in the Presence of Pathologies},\n    year = 2014,\n    journal = {MICCAI},\n```\n\nThe implementations of two recent proposals for *robust PCA* can be found in the \"core\" subdirectory:\n```bibtex\n@article{Candes11a,\n    author = {E.J.~Cand\\'es and X.~Li and Y.~Ma and J.~Wright},\n    title = {Robust Principal Component Analysis?},\n    year = 2011,\n    volume = 58,\n    number = 3,\n    journal = {J. ACM},\n    pages = {1-37}}\n```\nand\n```bibtex\n@article{Xu12a,\n    author = {H.~Xu and C.~Caramanis and S.~Sanghavi},\n    title = {Robust {PCA} via Outlier Pursuit},\n    journal = {IEEE Trans. Inf. Theory},\n    volume = 59,\n    number = 5,\n    pages = {3047-3064},\n    year = 2012}\n```\nPlease cite these articles in case you use the code in \"core\". Note that the original\nauthors of those articles also provide MATLAB code. Further, the objectives\nof the two works are different: Candes et al.'s approach assumes randomly\ndistributed corruptions throughout the dataset, while Xu et al.'s approach\nassumes that full observations (i.e., column vectors of the data matrix) and\nnot just single entries are corrupted.\n\nRequirements\n------------\n\n* [**numpy**](http://www.numpy.org/)\n* [**SimpleITK**](http://www.simpleitk.org) [Optional]\n\nProblem Statement(s)\n--------------------\n\nSee references (above) for the exact problem formulations of Candes\net al. and Xu et al.\n\nExample\n-------\n\nAn illustrative example for Candes et al.'s RPCA approach is to use a\ncheckerboard image (provided under the `examples` directory) which is,\nby definition, low-rank and corrupt that image with randomly distributed\noutliers. The task is then to recover the low-rank part and thus obtain\na *clean* version of the checkerboard image (as well as the sparsity\npattern).\n\nThe `examples` directory contains an example (`ex1.py`) that demonstrates\nexactly this scenario.  (**Note:** The example requires\n[SimpleITK](http://www.simpleitk.org)'s python wrapping for image loading and\nimage writing; it should be easy to replace these parts with your favorite\nimage handling library, though).\n\nRun the code with\n```bash\npython ex1.py checkerboard.png 0.3 /tmp/outlierImage.png /tmp/lowRank.png\n```\nTwo images will be written: `/tmp/outlierImage.png` (i.e., the image *with*\noutliers) and `/tmp/lowRank.png` (i.e., the *low-rank* recovered part).\n\nUsing the IPython Notebook\n--------------------------\n\nWe provide an IPython notebook, ```pyrpca-Tutorial.ipynb``` which can be found\nin the top-level directory of ```pyrpca```. It basically walks a new user through\nthe example implemented in ```ex1.py```.\n\nThe following instructions were tested on a Linux machine running\nUbuntu 12.04. We assume that you have ```virtualenv``` installed,\ne.g., using ```apt-get install python-virtualenv```. Basically, we\ncreate a virtual environment, install all the required packages\nand eventually run the IPython notebook.\n\nTo vizualize the matplolib plots without using IPython Notebook, you \nneed to make sure that matplotlib is built with a backend that allows \nplotting. By default, it is usually set to use 'Agg' as a backend, \nwhich only allows to save the plot, not to visualize it.\n\nOn Ubuntu 15.10, To build matplotlib with 'tkAgg', which allows \ninteractive plotting, you need to install the following packages:\n\n```bash\nsudo apt-get install tcl-dev tk-dev python-tk python3-tk\n```\n\nInstall matplotlib with pip only after installing these packages.\n\n```bash\ncd ~\nmkdir tutorial-env\nvirtualenv ~/tutorial-env --no-site-packages\n~/tutorial-env/bin/pip install ipython\n~/tutorial-env/bin/pip install ipython[zmq]\n~/tutorial-env/bin/pip install tornado\n~/tutorial-env/bin/pip install numpy\n~/tutorial-env/bin/pip install matplotlib\n~/tutorial-env/bin/easy_install SimpleITK\n```\nNext, launch the IPython notebook:\n```bash\n~/tutorial-env/bin/ipython notebook --pylab=inline\n```\n\nIf you get the following error message, just follow the instructions and \nwrite `%pylab inline` at the top of your notebook.\n\n```bash\n[E 15:41:01.741 NotebookApp] Support for specifying --pylab on the command line has been removed.\n[E 15:41:01.741 NotebookApp] Please use `%pylab inline` or `%matplotlib inline` in the notebook itself.\n```\n\nLicense\n=======\n\npyLAR is distributed under the Apache License Version 2.0 (see LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitwaremedical%2Fpylar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitwaremedical%2Fpylar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitwaremedical%2Fpylar/lists"}