Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add NumberOfWorkUnits to ElastixMain, used by CreateComponent #728

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

N-Dekker
Copy link
Member

@N-Dekker N-Dekker commented Sep 4, 2022

With this commit, the GenerateData() member function of both TransformixFilter and ElastixRegistrationMethod pass their NumberOfWorkUnits to their corresponding ElastixMain/TransformixMain object, which passed this NumberOfWorkUnits to each component that is an itk::ProcessObject.

Related to issue InsightSoftwareConsortium/ITKElastix#163 "No option to set number of threads for Transformix", by Sebastian (@Svdvoort)

With this commit, the GenerateData() member function of both `TransformixFilter` and `ElastixRegistrationMethod` pass their NumberOfWorkUnits to their corresponding ElastixMain/TransformixMain object, which passed this NumberOfWorkUnits to each component that is an `itk::ProcessObject`.
@N-Dekker
Copy link
Member Author

N-Dekker commented Sep 6, 2022

For the record, five out of the ten elastix component base classes (at https://github.com/SuperElastix/elastix/tree/3e89c0cf9c90998b336fbed22c92d9f42bcf2959/Core/ComponentBaseClasses/) have an ITKBaseType that is derived (directly or indirectly) from itk::ProcessObject:

elastix component base class ITKBaseType inheritance
FixedImagePyramidBase itk::MultiResolutionPyramidImageFilter<> ImageToImageFilter => ImageSource => ProcessObject
MovingImagePyramidBase itk::MultiResolutionPyramidImageFilter<> ImageToImageFilter => ImageSource => ProcessObject
ImageSamplerBase itk::ImageSamplerBase<> ImageToVectorContainerFilter => VectorContainerSource => ProcessObject
RegistrationBase itk::MultiResolutionImageRegistrationMethod2<> ProcessObject
ResamplerBase itk::ResampleImageFilter<> ImageToImageFilter => ImageSource => ProcessObject

The other five are not derived from itk::ProcessObject:

elastix component base class ITKBaseType inheritance
InterpolatorBase itk::InterpolateImageFunction<> ImageFunction => FunctionBase => Object
ResampleInterpolatorBase itk::InterpolateImageFunction<> ImageFunction => FunctionBase => Object
MetricBase itk::SingleValuedCostFunction CostFunction => Object
OptimizerBase itk::Optimizer Object
TransformBase AdvancedCombinationTransform AdvancedTransform => Transform => TransformBaseTemplate => Object

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.

1 participant