Giter Club home page Giter Club logo

astex's People

Contributors

sylvainthery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

astex's Issues

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.

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

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

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

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.