InsightSoftwareConsortium / ITKIsotropicWavelets

External Module for ITK, implementing Isotropic Wavelets and Riesz Filter for multiscale phase analysis.
Apache License 2.0
13 stars 11 forks source link

WIP: ENH: Use itk::VectorContainer instead of std::vector #94

Closed phcerdan closed 3 years ago

phcerdan commented 5 years ago

This allows wrapping of inputs/outputs of the pyramid in python.

Added a itkVectorContainer.wrap (already existing in core) with the new wraper for VectorContainer.

This work triggered the question in discourse of using a base class: itkImageToImageList for the case of a std::vector<itk::SmartPointer>

https://discourse.itk.org/t/about-introducing-imagelists/1365/4

phcerdan commented 5 years ago

For this to compile, the VectorContainer.wrap included in this PR : https://github.com/InsightSoftwareConsortium/ITKIsotropicWavelets/pull/94/files#diff-862b9a74c90010ce277de52fa05eb8db

Should be included in the existing VectorContainer.wrap in ITK.

The changes here just wrap a VectorContainer< Image< std::complex<float/double>, 3>::Pointer >.

hjmjohnson commented 5 years ago

@phcerdan has the wrapping issue been addressed? I'm wondering if these WIPs can be completed now?

phcerdan commented 5 years ago

Not yet, further testing is required. Also, we have to think if we want to wrap VectorContainer< ImageType::Pointer> (for a few image types). And we also have to think if it is not better to just wrap std::vector<ImageType::Pointer>. In the later case, the change to VectorContainer wouldn't be needed.

phcerdan commented 3 years ago

Closing, won't fix. The ideal solution would be to have a itkImageToImageListFilter, itkImageListtoImageFilter base classes, (just a std::vector<vtkSmartPointer>>) supported in ITK. See in discourse: https://discourse.itk.org/t/about-introducing-imagelists/1365

But for now, a std::vector works good. For wrapping purposes, @fbudin69500 contributed this patch, that wraps std::vector of itk types. https://github.com/InsightSoftwareConsortium/ITK/commit/bd8169b433679930c8acfe0e24c8b5a5c663a833

Follow on #67