Giter Club home page Giter Club logo

astex's Introduction

ASTex

ASTex is an open-source library for texture analysis and synthesis. The term “texture” must be understood as in computer graphics. The purpose of this library is to support collaborative coding and to allow for comparison with recently published algorithms.

Installation

Dependencies:

To compile and use ASTex, you need some libraries:

  • ITK 5. min
  • zlib
  • openexr for saving/loading images in floating point format.

You need some classic development tools (minimal supported version)

  • git
  • cmake 3.0 min
  • a recent C++ compiler
    • g++ 6
    • clang 3.3
    • Visual Studio C++ 2017 /2019

Linux

Just install packages:

  • libpng-dev
  • libopenexr-dev And get github version of InsightToolkit, compile & install

Mac OS/X

The most simple way to install dependencies is to use homebrew package system. Then you can install the dependencies:

  • brew install insighttoolkit
  • brew install openexr
  • brew install libpng

Windows

Softwares:

  • VisualStudio C++ (2017 min)
  • Git
  • CMake (3.0 min)

install VCPKG For ASTex

  • open a power-shell

  • git clone https://github.com/Microsoft/vcpkg.git

  • var env VCPKG_DEFAULT_TRIPLET=x64-windows

  • cd vcpkg

  • .\vcpkg\bootstrap-vcpkg.bat

  • .\vcpkg.exe install itk openexr

  • Remarque: ATTENTION LA COMPILATION NECESSITE X.X Go D'ESPACE DISQUE ! Vous pouvez enlever les répertoires buildtrees, downloads et packages

Compile ASTex

  • launch CMake, chose src dir and binary dir
  • Specify tool chain file: XXXX/vcpkg_ast/scripts/buildsystems/vcpkg.cmake
  • Configure again
  • Generate
  • Launch Solution
  • Enjoy

Data

Some tests, tutorials and algorithms use read example images and write some results. In order to keep original Data directory of ASTex clean we use a copy which pass can be choosen at cmake configuration stage.

You have to copy yourself the contain of the Data directory in to the right place (see ASTEX_TEMPO_PATH clake variable).

Compilation

on Linux & Mac

Use CMake as usual:

  • create a build directory as same level than ASTex (ASTex-build or ASTex-buildDebug for example)
  • go inside build directory and do cmake ../ASTex (or use gui)
  • or let (a recent) Qtcreator do the job !

CMake Options

There are some original options/values that can be set at the cmake stage:

  • ASTEX_ALGO_xxx choose to build the different implemented algorithms.
  • ASTEX_BUILD_xxx choose to build bench/tuto/test
  • ASTEX_PERSO_xxx for each directory added in ASTex that contain a CMakeLists.txt set this to ON to build. When you add a directory just relaunch cmake.
  • ASTEX_TEMPO_PATH path of directory use to store images for test and tuto (copy ASTex/Data into it)

Contributing to ASTex

All contributions to ASTex are welcome and will be examined.

To contribute:

  • you need a github account.
  • fork ASTex repository on your account
  • create a branch from the develop one
  • develop your contribution
  • do pull-request on ASTex/develop branch

astex's People

Contributors

chgrenier avatar drlutzi avatar jmdischler avatar sylvainthery avatar terrainenhancement avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

astex's Issues

Image type with variable number of channels

We should create an ImageType that allows the user to have a variable number of channels, for example one comprised of red, green, blue, alpha, normal, and height. This would be useful to extend the scope of ASTex to various textures. One would be able to apply classic operators such as * or +.

  • Create a custom ImageType with a variable number of channels

Mathematical operations on images

It would be great to have some of the classical operations on image processing such as adding two images of the same size, point-wise multiplication and matrix multiplication.
They are relatively easy and can also be implemented in place of Itk filter (such as itk::NaryAddImageFilter) if necessary.

The "save" function of real Image types produces empty files when called with the default syntax

Real-valued image types, such as ImageGrayd and ImageRGBd, produce empty files when called with the default syntax (save(filename)). This enforces the use of IO::save01_in_u8(image, filename), but this is inconvenient with template types that can be different Image types.

I suggest to change save(filename) so that it saves real-valued images by assuming their value is between 0 and 1, and clamp values that are not in this range.

  • Change the behavior of the save function to make it usable by templates

ConstImageTypeX cannot be deduced from ImageTypeX

The following is only a minor inconvenience, and I have provided a workaround on the bottom of the issue.

Probably because of how itk works, the types for images are not the same between their non-const and const version, so instead of using const ImageX, we use ConstImageX. The current problem with this syntax is that the const version of an image cannot be deduced, which can enforce the use of several redundant template members.

Example: in the following code, I want to make a itk filter that inputs an image using an ASTex Image type as a template. The following is perfectly fine:

template<typename TInput> class FilterGetisGI : public itk::ImageToImageFilter<typename TInput::ItkImg, typename TInput::ItkImg>

But it enforces that TInput is a non ConstImageType, because the output of the filter is necessarily non ConstImageType as well. I would like to use something like:

template<typename TNonConstImage> class FilterGetisGI : public itk::ImageToImageFilter<typename TConstImage::ItkImg (?), typename TNonConstImage::ItkImg>

but it is not currently possible to deduce the Const version of an image from its NonConst version. A current workaround is to use something like:

template<typename TNonConstImage, TConstImage> class FilterGetisGI : public itk::ImageToImageFilter<typename TConstImage::ItkImg, typename TNonConstImage::ItkImg>

which forces the user to provide the Const version of the image type with the NonConst.

  • Add a way to deduce const image types from non const image types
  • Add a way to deduce non const image types from const image types

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.