Skip to content

ENH: Python, wrap structure tensor#102

Merged
phcerdan merged 1 commit into
InsightSoftwareConsortium:masterfrom
phcerdan:wrap_structure_tensor
Jan 14, 2019
Merged

ENH: Python, wrap structure tensor#102
phcerdan merged 1 commit into
InsightSoftwareConsortium:masterfrom
phcerdan:wrap_structure_tensor

Conversation

@phcerdan
Copy link
Copy Markdown
Collaborator

It wraps the needed ImageToImageFilter and ImageSource

@phcerdan
Copy link
Copy Markdown
Collaborator Author

phcerdan commented Jan 7, 2019

It is working, but getting the following error when using python with non-related classes:

WaveletType = itk.SimoncelliIsotropicWavelet.F3PD3
ForwardWaveletType = itk.WaveletFrequencyForward.ICF3ICF3SimoncelliF3PD3
levels = 4
highPassSubBands = 1
forwardWavelet = ForwardWaveletType.New(Input=freqImage)
forwardWavelet.SetLevels(levels)
forwardWavelet.SetHighPassSubBands(highPassSubBands)
forwardWavelet.Update()
numberOfOutputs = forwardWavelet.GetNumberOfOutputs()
print("numberOfOutputs: ", numberOfOutputs)
Warning: Unknown parameter 'itk::Image<itk::VariableSizeMatrix< float >, 2 >' in template 'itk::ImageSource'
Warning: Unknown parameter 'itk::Image<itk::VariableSizeMatrix< float >, 3 >' in template 'itk::ImageSource'
Warning: Unknown parameter 'itk::Image<itk::VariableSizeMatrix< float >, 2 >' in template 'itk::ImageToImageFilter'
Warning: Unknown parameter 'itk::Image<itk::VariableSizeMatrix< float >, 3 >' in template 'itk::ImageToImageFilter'
Warning: Unknown parameter 'itk::Image<itk::VariableSizeMatrix< float >, 2 >' in template 'itk::StructureTensor'
Warning: Unknown parameter 'itk::Image<itk::VariableSizeMatrix< float >, 3 >' in template 'itk::StructureTensor'

Is it related with when this class is wrapped? Should be add it to the wrap in itkImageToImageFilter and ImageSource? @thewtex
The wrapping works though.

@thewtex
Copy link
Copy Markdown
Member

thewtex commented Jan 9, 2019

Is it related with when this class is wrapped?

Yes, those dependent types to be wrapped.

Should be add it to the wrap in itkImageToImageFilter and ImageSource?

We can add the wrapping for those to this module with VariableSizeMatrix until they are used elsewhere.

The type of the output is defaulted to VariableSizeMatrix<double>
that is already wrapped in ITK.

It wraps the needed ImageToImageFilter and ImageSource

Also an utility function GetRotationMatrixFromOutputMatrix is added and tested.
@phcerdan phcerdan force-pushed the wrap_structure_tensor branch from b66f9aa to 4b481f0 Compare January 14, 2019 20:07
@phcerdan phcerdan merged commit 85136d5 into InsightSoftwareConsortium:master Jan 14, 2019
@phcerdan phcerdan mentioned this pull request Jan 16, 2019
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants