{"id":23288712,"url":"https://github.com/grfrederic/deconvolution","last_synced_at":"2025-08-21T20:31:12.123Z","repository":{"id":62567319,"uuid":"92617704","full_name":"grfrederic/deconvolution","owner":"grfrederic","description":"Python module for performing (automatic) colour deconvolution.","archived":false,"fork":false,"pushed_at":"2022-11-20T19:29:40.000Z","size":434,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-13T13:58:49.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grfrederic.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-27T18:50:18.000Z","updated_at":"2024-01-17T12:36:08.000Z","dependencies_parsed_at":"2023-01-23T15:46:14.603Z","dependency_job_id":null,"html_url":"https://github.com/grfrederic/deconvolution","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grfrederic%2Fdeconvolution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grfrederic%2Fdeconvolution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grfrederic%2Fdeconvolution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grfrederic%2Fdeconvolution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grfrederic","download_url":"https://codeload.github.com/grfrederic/deconvolution/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230531088,"owners_count":18240567,"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-12-20T03:34:22.749Z","updated_at":"2024-12-20T03:34:23.270Z","avatar_url":"https://github.com/grfrederic.png","language":"Python","readme":"*************\ndeconvolution\n*************\nA Python module providing Deconvolution class that implements and generalises Ruifrok-Johnston color deconvolution algorithm [RJ]_, [IJ]_. It allows one to split an image into distinct color layers in just\na few lines of code:\n\n.. code:: python\n\n  from deconvolution import Deconvolution\n  from PIL import Image\n\n  img = Image.open(\"image.jpg\")\n  \n  # Declare an instance of Deconvolution, with image loaded and with color basis defining what layers are interesting\n  decimg = Deconvolution(image=img, basis=[[1, 0.1, 0.2], [0, 0.1, 0.8]])\n  \n  # Constructs new PIL Images, with different color layers\n  layer1, layer2 = decimg.out_images(mode=[1, 2])\n\n\nInstallation\n------------\nYou can install the package using pip:\n\n.. code:: bash\n\n  pip install deconvolution\n\nAlternatively, you can clone the repository and run:\n\n.. code:: bash\n\n  make install\n\nSince then you can import use the module in your scripts:\n\n.. code:: python\n\n  from deconvolution import Deconvolution\n  d = Deconvolution()\n\n\nTesting\n-------\n.. code:: bash\n  \n  # For Python 3 users\n  make test\n  \n  # For Python 2 users\n  make comp\n\n  # Check the code coverage\n  make coverage\n\n  # Check the coverage interactively, using a web browser\n  make html\n\n\nDeconvolve\n----------\nFor better usage experience we created a script allowing one to deconvolve images from the shell. Copy `deconvolve.py` file into `/usr/local/bin` or, if you want to use it locally:\n\n.. code:: bash\n\n  mkdir ~/bin\n  cp deconvolve.py ~/bin\n  export PATH=~/bin:$PATH\n\nSince then you can deconvolve images using:\n\n.. code:: bash\n\n  deconvolve.py image1.png image2.png ...\n  # For help\n  deconvolve.py -h\n\nDocumentation\n-------------\nCheck out our documentation at `Read The Docs\n\u003chttps://deconvolution.readthedocs.io\u003e`_.\n\nContributors\n------------\nMethod developed by Frederic Grabowski generalising Ruifrok-Johnston algorithm [RJ]_. and implemented by Frederic Grabowski [FG]_ and Paweł Czyż [PC]_.\nWe are very grateful to prof. Daniel Wójcik and dr Piotr Majka [N1]_, [N2]_ who supervised the project. We also would like to thank prof. Gabriel Landini [GL]_, who\nimplemented the colour deconvolution in ImageJ [IJ]_ and allowed us to test the algorithm on his data.\n\nReferences\n----------\n.. [RJ] `Research paper by Ruifrok and Johnston \n  \u003chttps://www.researchgate.net/publication/11815294_Ruifrok_AC_Johnston_DA_Quantification_of_histochemical_staining_by_color_deconvolution_Anal_Quant_Cytol_Histol_23_291-299\u003e`_\n.. [IJ] `ImageJ webpage\n  \u003chttp://imagej.net/Colour_Deconvolution\u003e`_\n.. [N1] `Laboratory of Neuroinformatics webpage\n  \u003chttp://en.nencki.gov.pl/laboratory-of-neuroinformatics\u003e`_\n.. [GL] `Prof. Gabriel Landini's webpage\n  \u003chttps://www.birmingham.ac.uk/staff/profiles/clinical-sciences/landini-gabriel.aspx\u003e`_\n.. [N2] https://github.com/Neuroinflab/\n.. [FG] https://github.com/grfrederic\n.. [PC] https://github.com/pawel-czyz\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrfrederic%2Fdeconvolution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrfrederic%2Fdeconvolution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrfrederic%2Fdeconvolution/lists"}