Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
phcerdan committed Mar 28, 2018
1 parent 230618d commit 948fa41
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(TotalVariation)

set(TotalVariation_LIBRARIES TotalVariation)

add_subdirectory(ThirdParty/proxTV)

if(NOT ITK_SOURCE_DIR)
find_package(ITK REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR})
Expand Down
29 changes: 29 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,35 @@ ITKTotalVariation
|CircleCI| |TravisCI| |AppVeyor|
=========== =========== ===========


TotalVariation algorithms, providing a wrap for the external project: https://github.com/albarji/proxTV

ITK is an open-source, cross-platform library that provides developers with an extensive suite of software tools for image analysis. Developed through extreme programming methodologies, ITK employs leading-edge algorithms for registering and segmenting multidimensional scientific images.

**Idea / Work in progress**

Not ready. The motivation is that Total Variation methods from proxTV are pretty effective denoisers.
If interested, there are python and matlab wraps available from https://github.com/albarji/proxTV .
If using the proxTV python package and python ITK, you can interconnect them:

.. code-block:: python
import itk
import prox_tv as ptv
reader = itk.ImageFileReader.New(FileName=input_filename)
reader.Update()
image = reader.GetOutput()
image_array = itk.GetArrayViewFromImage(image)
norm = 1
dimensions_to_penalyze = [1,2,3]
tv_array = ptv.tvgen(image_array, np.array([lam,lam,lam]), dimensions_to_penalyze, np.array([norm,norm,norm]))
tv_array = np.ascontiguousarray(tv_array, dtype=image_array.dtype)
modifiedImage = itk.GetImageViewFromArray(tv_array)
itk.ImageFileWriter.New(Input=modifiedImage, FileName=output_filename).Update()
- [x] Add support for CMake to proxTV. Open PR: <https://github.com/albarji/proxTV/pull/38>
And the branch in my fork: <https://github.com/phcerdan/proxTV/tree/cmake_support>
- [ ] Handle the external project. Choose between add_subdirectory, or ExternalProject_Add. Ask ITK.
- [ ] Do the actual wrapping with ITK classes.
- [ ] Profit and use TV methods in C++ with ITK.

0 comments on commit 948fa41

Please sign in to comment.