Loading...
Searching...
No Matches
itkCenteredTransformInitializer2.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkCenteredTransformInitializer2.h,v $
Date: $Date: 2010-07-04 10:30:49 $
Version: $Revision: 1.11 $
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef itkCenteredTransformInitializer2_h
#define itkCenteredTransformInitializer2_h
#include "itkObject.h"
#include "itkObjectFactory.h"
#include "itkImageMaskSpatialObject.h"
#include "itkAdvancedImageMomentsCalculator.h"
#include <iostream>
namespace itk
{
template <class TTransform, class TFixedImage, class TMovingImage>
class ITK_TEMPLATE_EXPORT CenteredTransformInitializer2 : public Object
{
public:
ITK_DISALLOW_COPY_AND_MOVE(CenteredTransformInitializer2);
using Self = CenteredTransformInitializer2;
using Superclass = Object;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(CenteredTransformInitializer2, Object);
using TransformType = TTransform;
using TransformPointer = typename TransformType::Pointer;
itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension);
itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension);
using FixedImageType = TFixedImage;
using MovingImageType = TMovingImage;
using FixedImagePointer = typename FixedImageType::ConstPointer;
using MovingImagePointer = typename MovingImageType::ConstPointer;
using FixedImageMaskType = Image<unsigned char, InputSpaceDimension>;
using MovingImageMaskType = Image<unsigned char, OutputSpaceDimension>;
using FixedImageMaskPointer = typename FixedImageMaskType::ConstPointer;
using MovingImageMaskPointer = typename MovingImageMaskType::ConstPointer;
using FixedImageMaskConstPointer = typename FixedImageMaskType::ConstPointer;
using MovingImageMaskConstPointer = typename MovingImageMaskType::ConstPointer;
using FixedImageCalculatorType = AdvancedImageMomentsCalculator<FixedImageType>;
using MovingImageCalculatorType = AdvancedImageMomentsCalculator<MovingImageType>;
using FixedImageCalculatorPointer = typename FixedImageCalculatorType::Pointer;
using MovingImageCalculatorPointer = typename MovingImageCalculatorType::Pointer;
using OffsetType = typename TransformType::OffsetType;
using InputPointType = typename TransformType::InputPointType;
using OutputVectorType = typename TransformType::OutputVectorType;
using InputPixelType = typename FixedImageType::PixelType;
itkSetObjectMacro(Transform, TransformType);
itkSetConstObjectMacro(FixedImage, FixedImageType);
itkSetConstObjectMacro(MovingImage, MovingImageType);
itkSetConstObjectMacro(FixedImageMask, FixedImageMaskType);
itkSetConstObjectMacro(MovingImageMask, MovingImageMaskType);
itkSetMacro(NumberOfSamplesForCenteredTransformInitialization, SizeValueType);
itkSetMacro(LowerThresholdForCenterGravity, InputPixelType);
itkSetMacro(CenterOfGravityUsesLowerThreshold, bool);
virtual void
InitializeTransform();
void
GeometryOn()
{
m_UseMoments = false;
m_UseOrigins = false;
m_UseTop = false;
}
void
MomentsOn()
{
m_UseMoments = true;
m_UseOrigins = false;
m_UseTop = false;
}
void
OriginsOn()
{
m_UseMoments = false;
m_UseOrigins = true;
m_UseTop = false;
}
void
GeometryTopOn()
{
m_UseMoments = false;
m_UseOrigins = false;
m_UseTop = true;
}
itkGetConstObjectMacro(FixedCalculator, FixedImageCalculatorType);
itkGetConstObjectMacro(MovingCalculator, MovingImageCalculatorType);
protected:
CenteredTransformInitializer2();
~CenteredTransformInitializer2() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;
itkGetModifiableObjectMacro(Transform, TransformType);
SizeValueType m_NumberOfSamplesForCenteredTransformInitialization{};
InputPixelType m_LowerThresholdForCenterGravity{};
bool m_CenterOfGravityUsesLowerThreshold{};
private:
TransformPointer m_Transform{};
FixedImagePointer m_FixedImage{};
MovingImagePointer m_MovingImage{};
FixedImageMaskPointer m_FixedImageMask{};
MovingImageMaskPointer m_MovingImageMask{};
bool m_UseMoments{};
bool m_UseOrigins{};
bool m_UseTop{};
FixedImageCalculatorPointer m_FixedCalculator{};
MovingImageCalculatorPointer m_MovingCalculator{};
};
} // namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkCenteredTransformInitializer2.hxx"
#endif
#endif /* itkCenteredTransformInitializer2_h */
itk::AdvancedImageMomentsCalculator
Compute moments of an n-dimensional image.
Definition itkAdvancedImageMomentsCalculator.h:69
itk::AdvancedImageMomentsCalculator< FixedImageType >::Pointer
SmartPointer< Self > Pointer
Definition itkAdvancedImageMomentsCalculator.h:74
itk::CenteredTransformInitializer2::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(Transform, TransformType)
itk::CenteredTransformInitializer2::GeometryOn
void GeometryOn()
Definition itkCenteredTransformInitializer2.h:173
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::OffsetType
typename TransformType::OffsetType OffsetType
Definition itkCenteredTransformInitializer2.h:138
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_MovingCalculator
MovingImageCalculatorPointer m_MovingCalculator
Definition itkCenteredTransformInitializer2.h:232
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_CenterOfGravityUsesLowerThreshold
bool m_CenterOfGravityUsesLowerThreshold
Definition itkCenteredTransformInitializer2.h:217
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_UseMoments
bool m_UseMoments
Definition itkCenteredTransformInitializer2.h:227
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::TransformType
AffineTransformType TransformType
Definition itkCenteredTransformInitializer2.h:109
itk::CenteredTransformInitializer2::CenteredTransformInitializer2
CenteredTransformInitializer2()
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::FixedImageMaskType
Image< unsigned char, InputSpaceDimension > FixedImageMaskType
Definition itkCenteredTransformInitializer2.h:123
itk::CenteredTransformInitializer2::InitializeTransform
virtual void InitializeTransform()
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::InputPixelType
typename FixedImageType::PixelType InputPixelType
Definition itkCenteredTransformInitializer2.h:146
itk::CenteredTransformInitializer2::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_NumberOfSamplesForCenteredTransformInitialization
SizeValueType m_NumberOfSamplesForCenteredTransformInitialization
Definition itkCenteredTransformInitializer2.h:215
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::MovingImageMaskType
Image< unsigned char, OutputSpaceDimension > MovingImageMaskType
Definition itkCenteredTransformInitializer2.h:124
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_UseTop
bool m_UseTop
Definition itkCenteredTransformInitializer2.h:229
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::FixedImageType
FixedImageType FixedImageType
Definition itkCenteredTransformInitializer2.h:117
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::InputPointType
typename TransformType::InputPointType InputPointType
Definition itkCenteredTransformInitializer2.h:141
itk::CenteredTransformInitializer2::itkStaticConstMacro
itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension)
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_MovingImage
MovingImagePointer m_MovingImage
Definition itkCenteredTransformInitializer2.h:223
itk::CenteredTransformInitializer2::GeometryTopOn
void GeometryTopOn()
Definition itkCenteredTransformInitializer2.h:194
itk::CenteredTransformInitializer2::MomentsOn
void MomentsOn()
Definition itkCenteredTransformInitializer2.h:180
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_FixedCalculator
FixedImageCalculatorPointer m_FixedCalculator
Definition itkCenteredTransformInitializer2.h:231
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_UseOrigins
bool m_UseOrigins
Definition itkCenteredTransformInitializer2.h:228
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_Transform
TransformPointer m_Transform
Definition itkCenteredTransformInitializer2.h:220
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::MovingImageMaskConstPointer
typename MovingImageMaskType::ConstPointer MovingImageMaskConstPointer
Definition itkCenteredTransformInitializer2.h:128
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::Self
CenteredTransformInitializer2 Self
Definition itkCenteredTransformInitializer2.h:97
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::OutputVectorType
typename TransformType::OutputVectorType OutputVectorType
Definition itkCenteredTransformInitializer2.h:144
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_MovingImageMask
MovingImageMaskPointer m_MovingImageMask
Definition itkCenteredTransformInitializer2.h:225
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::MovingImageMaskPointer
typename MovingImageMaskType::ConstPointer MovingImageMaskPointer
Definition itkCenteredTransformInitializer2.h:126
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkCenteredTransformInitializer2.h:100
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_LowerThresholdForCenterGravity
InputPixelType m_LowerThresholdForCenterGravity
Definition itkCenteredTransformInitializer2.h:216
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_FixedImageMask
FixedImageMaskPointer m_FixedImageMask
Definition itkCenteredTransformInitializer2.h:224
itk::CenteredTransformInitializer2::OriginsOn
void OriginsOn()
Definition itkCenteredTransformInitializer2.h:187
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::FixedImageMaskConstPointer
typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
Definition itkCenteredTransformInitializer2.h:127
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::MovingImagePointer
typename MovingImageType::ConstPointer MovingImagePointer
Definition itkCenteredTransformInitializer2.h:121
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::FixedImagePointer
typename FixedImageType::ConstPointer FixedImagePointer
Definition itkCenteredTransformInitializer2.h:120
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::m_FixedImage
FixedImagePointer m_FixedImage
Definition itkCenteredTransformInitializer2.h:222
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::FixedImageCalculatorPointer
typename FixedImageCalculatorType::Pointer FixedImageCalculatorPointer
Definition itkCenteredTransformInitializer2.h:134
itk::CenteredTransformInitializer2::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(CenteredTransformInitializer2)
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::FixedImageMaskPointer
typename FixedImageMaskType::ConstPointer FixedImageMaskPointer
Definition itkCenteredTransformInitializer2.h:125
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::TransformPointer
typename TransformType::Pointer TransformPointer
Definition itkCenteredTransformInitializer2.h:110
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::Superclass
Object Superclass
Definition itkCenteredTransformInitializer2.h:98
itk::CenteredTransformInitializer2::~CenteredTransformInitializer2
~CenteredTransformInitializer2() override=default
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::Pointer
SmartPointer< Self > Pointer
Definition itkCenteredTransformInitializer2.h:99
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::MovingImageCalculatorType
AdvancedImageMomentsCalculator< MovingImageType > MovingImageCalculatorType
Definition itkCenteredTransformInitializer2.h:132
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::MovingImageCalculatorPointer
typename MovingImageCalculatorType::Pointer MovingImageCalculatorPointer
Definition itkCenteredTransformInitializer2.h:135
itk::CenteredTransformInitializer2::itkStaticConstMacro
itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension)
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::MovingImageType
MovingImageType MovingImageType
Definition itkCenteredTransformInitializer2.h:118
itk::CenteredTransformInitializer2< AffineTransformType, FixedImageType, MovingImageType >::FixedImageCalculatorType
AdvancedImageMomentsCalculator< FixedImageType > FixedImageCalculatorType
Definition itkCenteredTransformInitializer2.h:131
itkAdvancedImageMomentsCalculator.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |