# Is MultiScaleHessianBasedMeasureImageFilter in python bindings?

**URL:** <https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794>\
**Category:** Beginner Questions\
**Tags:** python\
**Created:** [March 23, 2018, 3:46pm UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794 "2018-03-23T15:46:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicoco](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nicoco](https://discourse.itk.org/u/nicoco)\
**Post date:** [March 23, 2018, 3:46pm UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/1 "2018-03-23T15:46:32Z")

</div>

Hello,

I need to use the `MultiScaleHessianBasedMeasureImageFilter` in python.

In the past I was using a _compiled-by-me_ version of ITK with python bindings and my scripts were doing fine. I recently switched to the python package index version, which is much more convenient to update, especially since I’m not C++ or even CMake fluent.

However, it seems that my beloved filter is now missing:

```
AttributeError: module 'itk' has no attribute 'MultiScaleHessianBasedMeasureImageFilter'

```

Is this expected? Can I do something besides compiling ITK with all the mysterious flags again? Maybe use an older version from PyPI?

---

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [March 23, 2018, 7:36pm UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/2 "2018-03-23T19:36:50Z")

</div>

Hello @nicoco, 👋

This is not present because `MultiScaleHessianBasedMeasureImageFilter` is in the `ITKReview` module. This patch moves it out of `ITKReview`:

[http://review.source.kitware.com/#/c/23288/](http://review.source.kitware.com/#/c/23288/)

After integrated, you can [install the nightly build of the Python packages](https://itkpythonpackage.readthedocs.io/en/latest/), and it will be available on PyPI and conda-forge after the ITK 5 release.

---

<div class="post-metadata">

**Author:** ![nicoco](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nicoco](https://discourse.itk.org/u/nicoco)\
**Post date:** [March 26, 2018, 9:08am UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/3 "2018-03-26T09:08:43Z")

</div>

Hey @matt.mccormick,

Thanks for your answer.

If I understand correctly the information in [the link you provided](http://review.source.kitware.com/#/c/23288/) and what you meant by _after integrated_, I should be fine using the nightly builds:

> Change 23288 - Merged

I’m asking because I’m now experiencing the world of pain of compiling and want to make sure I’m not doing this for nothing. 🙂

FWIW, here’s where I’m stuck now:

```
$ python -m pip install itk --no-index -f \
    https://github.com/InsightSoftwareConsortium/ITKPythonPackage/releases/tag/latest
(...)
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
(...)

```

…even though I installed doxygen through Fedora’s package manager (dnf) and also via conda-forge:

```
$ which doxygen
/opt/miniconda/envs/myenv/bin/doxygen
$ source deactivate
$ which doxygen
/usr/bin/doxygen

```

I know it’s useless to have it installed twice but meh, I’m just randomly trying things…

---

<div class="post-metadata">

**Author:** ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)\
**Post date:** [March 26, 2018, 1:46pm UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/4 "2018-03-26T13:46:53Z")

</div>

I think your post hightlights two problems. For some reason there are problems with the `latest` tag. 1) It should download a precompiled version of ITK for your system, and if not, 2) it should compile the package.

1. is a problem because even on my system, it doesn’t seem to find the matching precompiled package. This is a problem that needs to be investigated. When using tag `v4.13.0` it works.
2. I’ll see if on my computer this fails. I haven’t tried yet, but potentially there is a problem in the build script when trying to set `doxygen`'s path.

---

<div class="post-metadata">

**Author:** ![nicoco](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nicoco](https://discourse.itk.org/u/nicoco)\
**Post date:** [March 26, 2018, 1:55pm UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/5 "2018-03-26T13:55:39Z")

</div>

@fbudin Thank you for your answer.

Right now I’ve `git clone`d `ITKPythonPackage`, modified `cmake/ITKPythonPackage.cmake` to add `set(DOXYGEN_EXECUTABLE "/usr/bin/doxygen")`, launched `python setup.py build` and it seems to be compiling (33% right now). Even if I don’t end up with the filter I need this way, I’ll have understood some things about CMake. 😉

---

<div class="post-metadata">

**Author:** ![nicoco](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nicoco](https://discourse.itk.org/u/nicoco)\
**Post date:** [March 27, 2018, 8:21am UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/6 "2018-03-27T08:21:22Z")

</div>

I did manage to install `itk-4.13.0.dev20180325-py3.6-linux-x86_64` using the procedure I describe but unfortunately `MultiScaleHessianBasedMeasureImageFilter` still wasn’t there.

@matt.mccormick In which nightly build will it be present? Can I change build options somewhere in `ITKPythonPackage` to include `ITKReview` modules?

Thanks for your help, I’m really not familiar with how all of this (proper development, compiling, packaging…) works. ☹

---

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [March 27, 2018, 9:43pm UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/7 "2018-03-27T21:43:05Z")

</div>

> [@nicoco](#):
>
> I did manage to install itk-4.13.0.dev20180325-py3.6-linux-x86\_64 using the procedure I describe but unfortunately MultiScaleHessianBasedMeasureImageFilter still wasn’t there.

☹ The build was just a few hours before the repository was updated. If you `git pull` in `ITKPythonPackage` now, it will use an ITK revision that contains the patch.

> [@nicoco](#):
>
> @matt.mccormick In which nightly build will it be present? Can I change build options somewhere in ITKPythonPackage to include ITKReview modules?

Eventually, you will be able to run

```auto
python setup.py bdist_wheel -- -DModule_ITKReview=ON

```

but we have to enable that feature ;-).

We are working towards ITK 5.0 Alpha 1, where we should have Python packages to try.

> [@nicoco](#):
>
> Thanks for your help, I’m really not familiar with how all of this (proper development, compiling, packaging…) works. ☹

What you have accomplished already is very impressive! It is a continual learning process for everyone.

---

<div class="post-metadata">

**Author:** ![nicoco](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nicoco](https://discourse.itk.org/u/nicoco)\
**Post date:** [March 28, 2018, 9:20am UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/8 "2018-03-28T09:20:51Z")

</div>

> [@matt.mccormick](#):
>
> If you git pull in ITKPythonPackage

Unfortunately it doesn’t build anymore ☹

```
[...]
 itkMirrorPadImageFilter: warning(4): ITK type not wrapped, or currently not known: itk::itkExponentialDecayHelper< false >
[...]
/home/ncedilni/src/ext/ITKPythonPackage/_skbuild/cmake-build/ITK-build/Wrapping/Typedefs/itkMirrorPadImageFilter.i:90: Warning 401: Nothing known about base class 'itk::itkExponentialDecayHelper< false >'. Ignored.
/home/ncedilni/src/ext/ITKPythonPackage/_skbuild/cmake-build/ITK-build/Wrapping/Typedefs/itkMirrorPadImageFilter.i:90: Warning 401: Maybe you forgot to instantiate 'itk::itkExponentialDecayHelper< false >' using %template.
/home/ncedilni/src/ext/ITKPythonPackage/_skbuild/cmake-build/ITK-build/Wrapping/Typedefs/itkMirrorPadImageFilter.i:139: Warning 401: Nothing known about base class 'itk::itkExponentialDecayHelper< false >'. Ignored.
(a lot of these)
[...]
gmake[5]: *** [Wrapping/Modules/ITKImageGrid/CMakeFiles/ITKImageGridPython.dir/build.make:373: Wrapping/Modules/ITKImageGrid/itkMirrorPadImageFilterPython.cpp] Error 52
gmake[5]: *** Deleting file 'Wrapping/Modules/ITKImageGrid/itkMirrorPadImageFilterPython.cpp'
gmake[4]: *** [CMakeFiles/Makefile2:16862: Wrapping/Modules/ITKImageGrid/CMakeFiles/ITKImageGridPython.dir/all] Error 2
gmake[3]: *** [Makefile:152: all] Error 2
gmake[2]: *** [CMakeFiles/ITK.dir/build.make:111: ITK-prefix/src/ITK-stamp/ITK-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/ITK.dir/all] Error 2
gmake: *** [Makefile:118: all] Error 2
Traceback (most recent call last):
  File "/opt/ncedilni/miniconda3.6/envs/vtscan/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 409, in setup
    cmkr.make(make_args, env=env)
  File "/opt/ncedilni/miniconda3.6/envs/vtscan/lib/python3.6/site-packages/skbuild/cmaker.py", line 417, in make
    os.path.abspath(CMAKE_BUILD_DIR)))

An error occurred while building with CMake.
  Command:
    "cmake" "--build" "." "--target" "install" "--config" "Release" "--"
  Source directory:
    /home/ncedilni/src/ext/ITKPythonPackage
  Working directory:
    /home/ncedilni/src/ext/ITKPythonPackage/_skbuild/cmake-build
Please see CMake's output for more information.

```

I guess this is why it is better to stick to releases… but I also tried to build ITK 4.13.0 with the ITKReview module and python wrapping enabled and:

```
[...]
[57%] Building CXX object Wrapping/Modules/ITKCommon/CMakeFiles/ITKCommonExplicit.dir/ __/__ /itkOffsetExplicit.cxx.o
In file included from /home/ncedilni/src/ext/build20180327/Wrapping/Typedefs/ITKCommonExplicit.h:12:0,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:2:
/home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkOffset.h: In instantiation of ‘static itk::Offset<VOffsetDimension> itk::Offset<VOffsetDimension>::GetBasisOffset(unsigned int) [with unsigned int VOffsetDimension = 2]’:
/home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:4:47: required from here
/home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkOffset.h:260:9: error: ‘memset’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   memset(ind.m_Offset, 0, sizeof( OffsetValueType ) * VOffsetDimension);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/cstring:42:0,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix_fixed.h:29,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix_fixed.hxx:9,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkMatrix.h:28,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkSymmetricSecondRankTensor.h:28,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/Typedefs/ITKCommonExplicit.h:21,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:2:
/usr/include/string.h:60:14: note: ‘void* memset(void*, int, size_t)’ declared here, later in the translation unit
 extern void *memset (void * __s, int__ c, size_t __n)__THROW __nonnull ((1));
              ^ ~~~~~
In file included from /home/ncedilni/src/ext/build20180327/Wrapping/Typedefs/ITKCommonExplicit.h:12:0,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:2:
/home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkOffset.h: In instantiation of ‘static itk::Offset<VOffsetDimension> itk::Offset<VOffsetDimension>::GetBasisOffset(unsigned int) [with unsigned int VOffsetDimension = 3]’:
/home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:5:47: required from here
/home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkOffset.h:260:9: error: ‘memset’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   memset(ind.m_Offset, 0, sizeof( OffsetValueType ) * VOffsetDimension);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/cstring:42:0,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix_fixed.h:29,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix_fixed.hxx:9,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkMatrix.h:28,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkSymmetricSecondRankTensor.h:28,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/Typedefs/ITKCommonExplicit.h:21,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:2:
/usr/include/string.h:60:14: note: ‘void* memset(void*, int, size_t)’ declared here, later in the translation unit
 extern void *memset (void * __s, int__ c, size_t __n)__THROW __nonnull ((1));
              ^ ~~~~~
In file included from /home/ncedilni/src/ext/build20180327/Wrapping/Typedefs/ITKCommonExplicit.h:12:0,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:2:
/home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkOffset.h: In instantiation of ‘static itk::Offset<VOffsetDimension> itk::Offset<VOffsetDimension>::GetBasisOffset(unsigned int) [with unsigned int VOffsetDimension = 4]’:
/home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:6:47: required from here
/home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkOffset.h:260:9: error: ‘memset’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   memset(ind.m_Offset, 0, sizeof( OffsetValueType ) * VOffsetDimension);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/cstring:42:0,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix_fixed.h:29,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix_fixed.hxx:9,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkMatrix.h:28,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkSymmetricSecondRankTensor.h:28,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/Typedefs/ITKCommonExplicit.h:21,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:2:
/usr/include/string.h:60:14: note: ‘void* memset(void*, int, size_t)’ declared here, later in the translation unit
 extern void *memset (void * __s, int__ c, size_t __n)__THROW __nonnull ((1));
              ^ ~~~~~
In file included from /home/ncedilni/src/ext/build20180327/Wrapping/Typedefs/ITKCommonExplicit.h:12:0,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:2:
/home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkOffset.h: In instantiation of ‘static itk::Offset<VOffsetDimension> itk::Offset<VOffsetDimension>::GetBasisOffset(unsigned int) [with unsigned int VOffsetDimension = 1]’:
/home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:7:47: required from here
/home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkOffset.h:260:9: error: ‘memset’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   memset(ind.m_Offset, 0, sizeof( OffsetValueType ) * VOffsetDimension);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/cstring:42:0,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix_fixed.h:29,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix_fixed.hxx:9,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkMatrix.h:28,
                 from /home/ncedilni/src/ext/ITK-4.13.0/Modules/Core/Common/include/itkSymmetricSecondRankTensor.h:28,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/Typedefs/ITKCommonExplicit.h:21,
                 from /home/ncedilni/src/ext/build20180327/Wrapping/itkOffsetExplicit.cxx:2:
/usr/include/string.h:60:14: note: ‘void* memset(void*, int, size_t)’ declared here, later in the translation unit
 extern void *memset (void * __s, int__ c, size_t __n)__THROW __nonnull ((1));
              ^ ~~~~~
make[2]: *** [Wrapping/Modules/ITKCommon/CMakeFiles/ITKCommonExplicit.dir/build.make:639: Wrapping/Modules/ITKCommon/CMakeFiles/ITKCommonExplicit.dir/ __/__ /itkOffsetExplicit.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:39148: Wrapping/Modules/ITKCommon/CMakeFiles/ITKCommonExplicit.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

```

As usual, any tip is appreciated.

---

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [March 28, 2018, 1:26pm UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/9 "2018-03-28T13:26:03Z")

</div>

> [@nicoco](#):
>
> If you git pull in ITKPythonPackage
> 
> Unfortunately it doesn’t build anymore ☹

Oops – it looks like a recent change broke the build. You could try `git checkout 0aed418b04c999bb9`, which is [the update from the previous day](https://github.com/InsightSoftwareConsortium/ITKPythonPackage/commits/master) that [was building on the software quality dashboard](https://open.cdash.org/index.php?project=Insight&date=2018-03-27).

And we will fix `master`… 😊

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [March 28, 2018, 2:07pm UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/10 "2018-03-28T14:07:28Z")

</div>

> [@nicoco](#):
>
> itkMirrorPadImageFilter: warning(4): ITK type not wrapped, or currently not known: itk::itkExponentialDecayHelper\< false \>

When [improving](http://review.source.kitware.com/#/c/23295/) the mirror pad filter I totally forgot about wrapping.

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [March 28, 2018, 4:16pm UTC](https://discourse.itk.org/t/is-multiscalehessianbasedmeasureimagefilter-in-python-bindings/794/11 "2018-03-28T16:16:19Z")

</div>

A [patch](http://review.source.kitware.com/#/c/23303/) has been submitted, but its fate might not be decided until Friday.
