← Back to team overview

dolfin team mailing list archive

Re: Image to Function data structure conversion

 

> I'd recommend looking at ImageMagick for reading image data. It has a
> standard C++ library for reading/manipulating image data. ITK seems a
> bit overkill for this.
>
> It's available in Ubuntu in the package libmagick++9-dev. One could
> even consider adding a helper class to DOLFIN that allows simple
> creation of Functions from image files:
>
>  f = Function("image.png")

ImageMagick is not really aimed for scientific applications, eg, it
doesn't seem if it supports any dimensions other than 2. It would be
fine if all we wanted was image data I/O, in that case even python
image library (PIL) would work.

In a real-world application, we will need more than image data I/O and
it is desirable to perform some pre/post-processing of image data
before/after data flow to dolfin. Since many of these processing
algorithms are already implemented in itk, perhaps we shouldn't
re-invent the wheel in less advanced libraries. Moreover, there would
be an interest from the itk community to use dolfin as the
finite-element engine since the current implementation of FEM in itk
is known to be slow. As Luca mentioned earlier in this thread, this
connection can be a starting point for many other developments.

I am in the process of setting up a build system in opensuse build
service (https://build.opensuse.org) for a python interface to itk
(and itk-dolfin connector). The build bot will produce packages for
many linux platforms, including debian/ubuntu, and architectures at
once (any plans for fenics to work on this build service, or are you
happy with your buildbot?).


-Ali


Follow ups

References