Skip to content

Conversation

@thewtex
Copy link
Contributor

@thewtex thewtex commented Apr 30, 2020

To address:

In file included from _deps/elastix_fetch-src/Core/ComponentBaseClasses/elxTransformBase.h:384:0,
from _deps/elastix_fetch-src/Core/Kernel/elxElastixTemplate.h:39,
from _deps/elastix_fetch-src/Core/Install/elxIncludes.h:39,
from _deps/elastix_fetch-src/Components/FixedImagePyramids/FixedRecursivePyramid/elxFixedRecursivePyramid.h:21,
from _deps/elastix_fetch-src/Components/FixedImagePyramids/FixedRecursivePyramid/elxFixedRecursivePyramid.cxx:19:
_deps/elastix_fetch-src/Core/ComponentBaseClasses/elxTransformBase.hxx: In member function ‘void itk::PixelTypeChangeCommand::Execute(itk::Object*, const itk::EventObject&)’:
_deps/elastix_fetch-src/Core/ComponentBaseClasses/elxTransformBase.hxx:75:55: error: ‘VECTOR’ is not a member of ‘itk::ImageIOBase’
castcaller->GetModifiableImageIO()->SetPixelType( ImageIOBase::VECTOR );
^
_deps/elastix_fetch-src/Core/ComponentBaseClasses/elxTransformBase.hxx: In member function ‘void itk::PixelTypeChangeCommand::Execute(const itk::Object*, const itk::EventObject&)’:
_deps/elastix_fetch-src/Core/ComponentBaseClasses/elxTransformBase.hxx:83:55: error: ‘VECTOR’ is not a member of ‘itk::ImageIOBase’
castcaller->GetModifiableImageIO()->SetPixelType( ImageIOBase::VECTOR );

Copy link
Member

@N-Dekker N-Dekker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Matt. I'm sorry to say this pull request cannot be merged right now, as we we would still like to remain compatible with ITK 5.0.1 for now.

@N-Dekker
Copy link
Member

@thewtex Did you build ITK with ITK_LEGACY_REMOVE ON or OFF? For the time being, I think it should be OFF for ITK 5.1, in order to preserve ITK 5.0.1 compatibility for elastix. Right?

@thewtex
Copy link
Contributor Author

thewtex commented May 11, 2020

@N-Dekker ok, this could wait until elastix requires ITK 5.1.0.

Did you build ITK with ITK_LEGACY_REMOVE ON or OFF?

Yes, this is for the ITKElastix remote module / Python package, which requires the lastest and greatest ITK :-).

@N-Dekker
Copy link
Member

Yes, this is for the ITKElastix remote module / Python package, which requires the lastest and greatest ITK :-).

@thewtex Thanks for explaining, Matt. Unfortunately we do not have enough resources for elastix to actively support two different versions of ITK. As I just discussed with Marius @mstaring and Stefan @stefanklein However, once ITK 5.1 (final) is officially released, we intend to quickly upgrade the develop branch of elastix from ITK 5.0.1 to ITK 5.1.

Can you please give us an estimation of when ITK 5.1 is officially released?

@thewtex
Copy link
Contributor Author

thewtex commented May 13, 2020

@N-Dekker makes sense.

The Git tag for ITK v5.1.0 is out. I anticipate the final release announcement sometime in the next week.

@N-Dekker
Copy link
Member

@thewtex Could you possibly still amend your commit (and force-push) just to adjust the following line of code in Testing/CI/Azure/ci.yml to the latest ITK version tag?

ITKv5_VERSION: v5.0.1

ITKv5_VERSION: v5.0.1

It would be great to see your pull request going from red to green 😃

@thewtex
Copy link
Contributor Author

thewtex commented May 15, 2020

@N-Dekker yes, done :-) 💚

@thewtex thewtex force-pushed the elxTransformBase-strongly-typed-enum branch from 56c2ebe to 0cc710e Compare May 15, 2020 15:46
@N-Dekker
Copy link
Member

Thanks for adjusting the ITK tag to v5.1.0 in the Elastix yml file, Matt! Unfortunately it appears that there are still some more compilation errors left now, at the Azure CI, including:

itkAdvancedBSplineDeformableTransformTest.cxx
d:\a\1\s\common\transforms\itkAdvancedBSplineDeformableTransformBase.h(78): error C2039: 'TransformCategoryType': is not a member of 'itk::AdvancedTransform<TScalarType,3,3>' [D:\a\1\Elastix-build\Testing\itkAdvancedBSplineDeformableTransformTest.vcxproj]

...

d:\a\1\s\common\transforms\itkAdvancedBSplineDeformableTransformBase.h(270): error C2555: 'itk::AdvancedBSplineDeformableTransformBase<TScalarType,3>::GetTransformCategory': overriding virtual function return type differs and is not covariant from 'itk::Transform<TScalarType,3,3>::GetTransformCategory' [D:\a\1\Elastix-build\Testing\itkBSplineJacobianGradientPerformanceTest.vcxproj]

@thewtex
Copy link
Contributor Author

thewtex commented Jul 20, 2020

@N-Dekker do you possibly have time to follow-up on this?

@N-Dekker
Copy link
Member

N-Dekker commented Aug 5, 2020

@thewtex I think I finally have some time today! Unfortunately your PR still fails on the CI. I'll have a look.

Do you happen to have a fix for the remaining errors at the CI? Like this one:

elxTransformParametersCompare.cxx
d:\a\1\s\common\transforms\itkAdvancedMatrixOffsetTransformBase.h(138): error C2039: 'TransformCategoryType': is not a member of 'itk::AdvancedTransform<TScalarType,3,3>' [D:\a\1\Elastix-build\Testing\elxInvertTransform.vcxproj]

At https://dev.azure.com/kaspermarstal/Elastix/_build/results?buildId=825&view=logs&j=34a65711-f108-577e-6707-abb292f048dd&t=b76e394f-4286-5ca5-0a60-2e5c8021c924&l=74

@thewtex
Copy link
Contributor Author

thewtex commented Aug 6, 2020

@N-Dekker awesome, thanks!

error C2039: 'TransformCategoryType'

This is now itk::TransformBaseTemplateEnums::TransformCategory

https://github.com/InsightSoftwareConsortium/ITK/blob/8edb8659da2c21fd9dc4c6b2037f7311943a7b04/Modules/Core/Transform/include/itkTransformBase.h#L39-L54

@N-Dekker
Copy link
Member

N-Dekker commented Aug 20, 2020

@thewtex Sorry for letting you wait, I'm just back from vacation (heatwave)! Thank you very much for moving the commit from PR #247 to this one, PR #245. Are these two commits together sufficient for you to build elastix + ITK 5.1 + ITK_LEGACY_REMOVE? I just tried your PR branch (elxTransformBase-strongly-typed-enum), and I still get many compilation errors, like:

elxAdaptiveStochasticGradientDescent.cxx
[elastix-source]\Common\Transforms\itkAdvancedBSplineDeformableTransformBase.h(78,32): error C2039: 'TransformCategoryType': is not a member of 'itk::AdvancedTransform<double,2,2>'

See also https://dev.azure.com/kaspermarstal/Elastix/_build/results?buildId=829&view=logs&j=34a65711-f108-577e-6707-abb292f048dd&t=b76e394f-4286-5ca5-0a60-2e5c8021c924&l=143

So it seems to me that there are still some errors to be fixed before this PR can be merged. Right? If so, do you still have time to make this PR ready? Or what is your suggestion?

@N-Dekker
Copy link
Member

@thewtex I guess we see many more legacy-remove errors on the CI than the ones you already fixed, because the CI includes Elastix CMake options -DBUILD_TESTING=ON -DUSE_ALL_COMPONENTS=ON

N-Dekker added a commit that referenced this pull request Aug 28, 2020
ITK's `TransformBaseTemplate::TransformCategoryType` was removed with commit InsightSoftwareConsortium/ITK@33daf94 "ENH: Consistent use of typed enums, naming", by Matt McCormick, Dec 6, 2019.

It was then defined "legacy" with commit InsightSoftwareConsortium/ITK@0775d4a "COMP: expose TransformCategoryType under LEGACY", by Dženan Zukić, Jan 7, 2020.

This commit aims to pave the way for `ITK_LEGACY_REMOVE`, as in pull request #245 by Matt McCormick.
@N-Dekker N-Dekker force-pushed the elxTransformBase-strongly-typed-enum branch from e7d6ccf to 1c8e3ca Compare August 28, 2020 19:29
@N-Dekker
Copy link
Member

FYI, I just did a rebase develop to get this PR back in sync with our develop branch. My intention is to do another rebase develop once pull request #269 is merged successfully.

@N-Dekker N-Dekker force-pushed the elxTransformBase-strongly-typed-enum branch from bc23908 to 4f3a089 Compare August 29, 2020 09:36
Uses LoggerBaseEnums::TimeStampFormat, to address:

> elastix/Common/OpenCL/ITKimprovements/itkOpenCLLogger.cxx:114:15:
> error: no type named 'TimeStampFormatType' in 'itk::LoggerBase';
> did you mean 'TimeStampFormatEnum'?

Uses ITK 5.1.0 strongly typed enums in elxTransformBase, to address:

In file included from _deps/elastix_fetch-src/Core/ComponentBaseClasses/elxTransformBase.h:384:0,
                 from _deps/elastix_fetch-src/Core/Kernel/elxElastixTemplate.h:39,
                 from _deps/elastix_fetch-src/Core/Install/elxIncludes.h:39,
                 from _deps/elastix_fetch-src/Components/FixedImagePyramids/FixedRecursivePyramid/elxFixedRecursivePyramid.h:21,
                 from _deps/elastix_fetch-src/Components/FixedImagePyramids/FixedRecursivePyramid/elxFixedRecursivePyramid.cxx:19:
_deps/elastix_fetch-src/Core/ComponentBaseClasses/elxTransformBase.hxx: In member function ‘void itk::PixelTypeChangeCommand<T>::Execute(itk::Object*, const itk::EventObject&)’:
_deps/elastix_fetch-src/Core/ComponentBaseClasses/elxTransformBase.hxx:75:55: error: ‘VECTOR’ is not a member of ‘itk::ImageIOBase’
     castcaller->GetModifiableImageIO()->SetPixelType( ImageIOBase::VECTOR );
                                                       ^
_deps/elastix_fetch-src/Core/ComponentBaseClasses/elxTransformBase.hxx: In member function ‘void itk::PixelTypeChangeCommand<T>::Execute(const itk::Object*, const itk::EventObject&)’:
_deps/elastix_fetch-src/Core/ComponentBaseClasses/elxTransformBase.hxx:83:55: error: ‘VECTOR’ is not a member of ‘itk::ImageIOBase’
     castcaller->GetModifiableImageIO()->SetPixelType( ImageIOBase::VECTOR );

Replaced legacy TransformCategoryType, fixed use of StopConditionType, to address (from VS2017):

[elastix-source]\Common\Transforms\itkAdvancedBSplineDeformableTransformBase.h(78,32): error C2039: 'TransformCategoryType': is not a member of 'itk::AdvancedTransform<double,2,2>'

At https://dev.azure.com/kaspermarstal/Elastix/_build/results?buildId=829&view=logs&j=34a65711-f108-577e-6707-abb292f048dd&t=b76e394f-4286-5ca5-0a60-2e5c8021c924&l=143

and:

> elxSimultaneousPerturbation.h(113): error C3646: 'StopConditionType': unknown override specifier

At https://dev.azure.com/kaspermarstal/Elastix/_build/results?buildId=875&view=logs&j=34a65711-f108-577e-6707-abb292f048dd&t=b76e394f-4286-5ca5-0a60-2e5c8021c924&l=397
@N-Dekker N-Dekker force-pushed the elxTransformBase-strongly-typed-enum branch from 4f3a089 to 5e0c541 Compare August 31, 2020 12:40
@N-Dekker
Copy link
Member

@thewtex Hi Matt, I just combined your two commits and mine into a single commit, that I would like to merge to the develop branch. Can you please check if it's still OK to you? I would like to merge tomorrow morning 😃

@N-Dekker
Copy link
Member

N-Dekker commented Sep 1, 2020

Thank you very much for your contribution @thewtex I'll merge now, I hope it will allow you to get ITKElastix back in sync with SuperElastix/elastix 😃

@N-Dekker N-Dekker merged commit 092d289 into SuperElastix:develop Sep 1, 2020
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