Loading...
Searching...
No Matches
itkGridScheduleComputer.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.
*
*=========================================================================*/
#ifndef itkGridScheduleComputer_h
#define itkGridScheduleComputer_h
#include "itkObject.h"
#include "itkImageBase.h"
#include "itkTransform.h"
namespace itk
{
template <typename TTransformScalarType, unsigned int VImageDimension>
class ITK_TEMPLATE_EXPORT GridScheduleComputer : public Object
{
public:
ITK_DISALLOW_COPY_AND_MOVE(GridScheduleComputer);
using Self = GridScheduleComputer;
using Superclass = Object;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(GridScheduleComputer, Object);
itkStaticConstMacro(Dimension, unsigned int, VImageDimension);
using TransformScalarType = TTransformScalarType;
using ImageBaseType = ImageBase<Self::Dimension>;
using PointType = typename ImageBaseType::PointType;
using OriginType = typename ImageBaseType::PointType;
using SpacingType = typename ImageBaseType::SpacingType;
using DirectionType = typename ImageBaseType::DirectionType;
using SizeType = typename ImageBaseType::SizeType;
using RegionType = typename ImageBaseType::RegionType;
using GridSpacingFactorType = SpacingType;
using VectorOriginType = std::vector<OriginType>;
using VectorSpacingType = std::vector<SpacingType>;
using VectorDirectionType = std::vector<DirectionType>;
using VectorRegionType = std::vector<RegionType>;
using VectorGridSpacingFactorType = std::vector<GridSpacingFactorType>;
using TransformType = Transform<TransformScalarType, Self::Dimension, Self::Dimension>;
using TransformPointer = typename TransformType::Pointer;
using TransformConstPointer = typename TransformType::ConstPointer;
itkSetMacro(ImageOrigin, OriginType);
itkGetConstMacro(ImageOrigin, OriginType);
itkSetMacro(ImageSpacing, SpacingType);
itkGetConstMacro(ImageSpacing, SpacingType);
itkSetMacro(ImageDirection, DirectionType);
itkGetConstMacro(ImageDirection, DirectionType);
itkSetMacro(ImageRegion, RegionType);
itkGetConstMacro(ImageRegion, RegionType);
itkSetClampMacro(BSplineOrder, unsigned int, 0, 5);
itkGetConstMacro(BSplineOrder, unsigned int);
itkSetMacro(FinalGridSpacing, SpacingType);
itkGetConstMacro(FinalGridSpacing, SpacingType);
virtual void
SetDefaultSchedule(unsigned int levels, double upsamplingFactor);
virtual void
SetSchedule(const VectorGridSpacingFactorType & schedule);
virtual void
GetSchedule(VectorGridSpacingFactorType & schedule) const;
itkSetConstObjectMacro(InitialTransform, TransformType);
virtual void
ComputeBSplineGrid();
virtual void
GetBSplineGrid(unsigned int level,
RegionType & gridRegion,
SpacingType & gridSpacing,
OriginType & gridOrigin,
DirectionType & gridDirection);
protected:
GridScheduleComputer();
~GridScheduleComputer() override = default;
VectorSpacingType m_GridSpacings{};
VectorOriginType m_GridOrigins{};
VectorDirectionType m_GridDirections{};
VectorRegionType m_GridRegions{};
TransformConstPointer m_InitialTransform{};
VectorGridSpacingFactorType m_GridSpacingFactors{};
void
PrintSelf(std::ostream & os, Indent indent) const override;
itkGetConstMacro(NumberOfLevels, unsigned int);
virtual void
ApplyInitialTransform(OriginType & imageOrigin,
SpacingType & imageSpacing,
DirectionType & imageDirection,
SpacingType & finalGridSpacing) const;
private:
OriginType m_ImageOrigin{};
SpacingType m_ImageSpacing{};
RegionType m_ImageRegion{};
DirectionType m_ImageDirection{};
unsigned int m_BSplineOrder{};
unsigned int m_NumberOfLevels{};
SpacingType m_FinalGridSpacing{};
itkSetClampMacro(UpsamplingFactor, float, 1.0, NumericTraits<float>::max());
float m_UpsamplingFactor{};
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkGridScheduleComputer.hxx"
#endif
#endif // end #ifndef itkGridScheduleComputer_h
itk::GridScheduleComputer::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkGridScheduleComputer.h:49
itk::GridScheduleComputer::GridSpacingFactorType
SpacingType GridSpacingFactorType
Definition itkGridScheduleComputer.h:69
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_ImageSpacing
SpacingType m_ImageSpacing
Definition itkGridScheduleComputer.h:176
itk::GridScheduleComputer::VectorRegionType
std::vector< RegionType > VectorRegionType
Definition itkGridScheduleComputer.h:73
itk::GridScheduleComputer::RegionType
typename ImageBaseType::RegionType RegionType
Definition itkGridScheduleComputer.h:68
itk::GridScheduleComputer::TransformType
Transform< TransformScalarType, Self::Dimension, Self::Dimension > TransformType
Definition itkGridScheduleComputer.h:77
itk::GridScheduleComputer::DirectionType
typename ImageBaseType::DirectionType DirectionType
Definition itkGridScheduleComputer.h:66
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_InitialTransform
TransformConstPointer m_InitialTransform
Definition itkGridScheduleComputer.h:156
itk::GridScheduleComputer::TransformPointer
typename TransformType::Pointer TransformPointer
Definition itkGridScheduleComputer.h:78
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_BSplineOrder
unsigned int m_BSplineOrder
Definition itkGridScheduleComputer.h:179
itk::GridScheduleComputer::VectorDirectionType
std::vector< DirectionType > VectorDirectionType
Definition itkGridScheduleComputer.h:72
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_NumberOfLevels
unsigned int m_NumberOfLevels
Definition itkGridScheduleComputer.h:180
itk::GridScheduleComputer::SpacingType
typename ImageBaseType::SpacingType SpacingType
Definition itkGridScheduleComputer.h:65
itk::GridScheduleComputer::Superclass
Object Superclass
Definition itkGridScheduleComputer.h:47
itk::GridScheduleComputer::GridScheduleComputer
GridScheduleComputer()
itk::GridScheduleComputer::PointType
typename ImageBaseType::PointType PointType
Definition itkGridScheduleComputer.h:63
itk::GridScheduleComputer::VectorOriginType
std::vector< OriginType > VectorOriginType
Definition itkGridScheduleComputer.h:70
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_ImageDirection
DirectionType m_ImageDirection
Definition itkGridScheduleComputer.h:178
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_GridRegions
VectorRegionType m_GridRegions
Definition itkGridScheduleComputer.h:155
itk::GridScheduleComputer::SetSchedule
virtual void SetSchedule(const VectorGridSpacingFactorType &schedule)
itk::GridScheduleComputer::SizeType
typename ImageBaseType::SizeType SizeType
Definition itkGridScheduleComputer.h:67
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_ImageRegion
RegionType m_ImageRegion
Definition itkGridScheduleComputer.h:177
itk::GridScheduleComputer::Pointer
SmartPointer< Self > Pointer
Definition itkGridScheduleComputer.h:48
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_GridSpacings
VectorSpacingType m_GridSpacings
Definition itkGridScheduleComputer.h:152
itk::GridScheduleComputer::~GridScheduleComputer
~GridScheduleComputer() override=default
itk::GridScheduleComputer::GetBSplineGrid
virtual void GetBSplineGrid(unsigned int level, RegionType &gridRegion, SpacingType &gridSpacing, OriginType &gridOrigin, DirectionType &gridDirection)
itk::GridScheduleComputer::VectorGridSpacingFactorType
std::vector< GridSpacingFactorType > VectorGridSpacingFactorType
Definition itkGridScheduleComputer.h:74
itk::GridScheduleComputer::TransformConstPointer
typename TransformType::ConstPointer TransformConstPointer
Definition itkGridScheduleComputer.h:79
itk::GridScheduleComputer::ApplyInitialTransform
virtual void ApplyInitialTransform(OriginType &imageOrigin, SpacingType &imageSpacing, DirectionType &imageDirection, SpacingType &finalGridSpacing) const
itk::GridScheduleComputer::TransformScalarType
TTransformScalarType TransformScalarType
Definition itkGridScheduleComputer.h:61
itk::GridScheduleComputer::SetDefaultSchedule
virtual void SetDefaultSchedule(unsigned int levels, double upsamplingFactor)
itk::GridScheduleComputer::itkStaticConstMacro
itkStaticConstMacro(Dimension, unsigned int, VImageDimension)
itk::GridScheduleComputer::ComputeBSplineGrid
virtual void ComputeBSplineGrid()
itk::GridScheduleComputer::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(GridScheduleComputer)
itk::GridScheduleComputer::ImageBaseType
ImageBase< Self::Dimension > ImageBaseType
Definition itkGridScheduleComputer.h:62
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_GridDirections
VectorDirectionType m_GridDirections
Definition itkGridScheduleComputer.h:154
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_UpsamplingFactor
float m_UpsamplingFactor
Definition itkGridScheduleComputer.h:187
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_GridOrigins
VectorOriginType m_GridOrigins
Definition itkGridScheduleComputer.h:153
itk::GridScheduleComputer::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_GridSpacingFactors
VectorGridSpacingFactorType m_GridSpacingFactors
Definition itkGridScheduleComputer.h:157
itk::GridScheduleComputer::GetSchedule
virtual void GetSchedule(VectorGridSpacingFactorType &schedule) const
itk::GridScheduleComputer::OriginType
typename ImageBaseType::PointType OriginType
Definition itkGridScheduleComputer.h:64
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_ImageOrigin
OriginType m_ImageOrigin
Definition itkGridScheduleComputer.h:175
itk::GridScheduleComputer::Self
GridScheduleComputer Self
Definition itkGridScheduleComputer.h:46
itk::GridScheduleComputer< CoordRepType, SpaceDimension >::m_FinalGridSpacing
SpacingType m_FinalGridSpacing
Definition itkGridScheduleComputer.h:181
itk::GridScheduleComputer::VectorSpacingType
std::vector< SpacingType > VectorSpacingType
Definition itkGridScheduleComputer.h:71
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |