Skip to content

Commit

Permalink
ENH: Use a macro to print boolean objects
Browse files Browse the repository at this point in the history
Use a macro to print boolean objects. Avoids boilerplate code.

Appearances of the form:
```
os << indent << "{name}: " << (m_{name} ? "On" : "Off") << std::endl;
```

and
```
os << indent << "{name}: " << (this->m_{name} ? "On" : "Off") << std::endl;
```

are substituted by `itkPrintSelfBooleanMacro({name});. The cases where
the statement is broken into multiple lines were also considered.

Add the script used to perform automatically the substitution.
  • Loading branch information
jhlegarreta authored and dzenanz committed Jul 18, 2024
1 parent b652989 commit e93fa19
Show file tree
Hide file tree
Showing 153 changed files with 321 additions and 268 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ConstShapedNeighborhoodIterator<TImage, TBoundaryCondition>::PrintSelf(std::ostr
}
os << "] ";

os << indent << "CenterIsActive: " << (m_CenterIsActive ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(CenterIsActive);
}

template <typename TImage, typename TBoundaryCondition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ GaussianDerivativeSpatialFunction<TOutput, VImageDimension, TInput>::PrintSelf(s
os << indent << "Sigma: " << m_Sigma << std::endl;
os << indent << "Mean: " << m_Mean << std::endl;
os << indent << "Scale: " << m_Scale << std::endl;
os << indent << "Normalized: " << (m_Normalized ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(Normalized);
os << indent << "Direction: " << m_Direction << std::endl;
}
} // end namespace itk
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkGaussianSpatialFunction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ GaussianSpatialFunction<TOutput, VImageDimension, TInput>::PrintSelf(std::ostrea
os << indent << "Sigma: " << m_Sigma << std::endl;
os << indent << "Mean: " << m_Mean << std::endl;
os << indent << "Scale: " << m_Scale << std::endl;
os << indent << "Normalized: " << (m_Normalized ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(Normalized);
}
} // end namespace itk

Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkImageSource.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void
ImageSource<TOutputImage>::PrintSelf(std::ostream & os, Indent indent) const
{
Superclass::PrintSelf(os, indent);
os << indent << "DynamicMultiThreading: " << (m_DynamicMultiThreading ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(DynamicMultiThreading);
}

} // end namespace itk
Expand Down
4 changes: 2 additions & 2 deletions Modules/Core/Common/include/itkInPlaceImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ InPlaceImageFilter<TInputImage, TOutputImage>::PrintSelf(std::ostream & os, Inde
{
Superclass::PrintSelf(os, indent);

os << indent << "InPlace: " << (m_InPlace ? "On" : "Off") << std::endl;
os << indent << "RunningInPlace: " << (m_RunningInPlace ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(InPlace);
itkPrintSelfBooleanMacro(RunningInPlace);
}

template <typename TInputImage, typename TOutputImage>
Expand Down
7 changes: 7 additions & 0 deletions Modules/Core/Common/include/itkMacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,13 @@ compilers.
ITK_MACROEND_NOOP_STATEMENT
// A useful macro in the PrintSelf method for printing boolean member
// variables.
#define itkPrintSelfBooleanMacro(name) \
os << indent << #name << ": " << (this->m_##name ? "On" : "Off") << std::endl; \
ITK_MACROEND_NOOP_STATEMENT
/** Set a decorated output. This defines the Set"name"() and a Set"name"Output() method */
#define itkSetDecoratedOutputMacro(name, type) \
virtual void Set##name##Output(const SimpleDataObjectDecorator<type> * _arg) \
Expand Down
4 changes: 2 additions & 2 deletions Modules/Core/Common/src/itkProcessObject.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1269,8 +1269,8 @@ ProcessObject::PrintSelf(std::ostream & os, Indent indent) const

os << indent << "NumberOfRequiredOutputs: " << m_NumberOfRequiredOutputs << std::endl;
os << indent << "NumberOfWorkUnits: " << m_NumberOfWorkUnits << std::endl;
os << indent << "ReleaseDataBeforeUpdateFlag: " << (m_ReleaseDataBeforeUpdateFlag ? "On" : "Off") << std::endl;
os << indent << "AbortGenerateData: " << (m_AbortGenerateData ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(ReleaseDataBeforeUpdateFlag);
itkPrintSelfBooleanMacro(AbortGenerateData);
os << indent << "Progress: " << progressFixedToFloat(m_Progress) << std::endl;
os << indent << "Multithreader: " << std::endl;
m_MultiThreader->PrintSelf(os, indent.GetNextIndent());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ FiniteDifferenceImageFilter<TInputImage, TOutputImage>::PrintSelf(std::ostream &
Superclass::PrintSelf(os, indent);

os << indent << "ElapsedIterations: " << m_ElapsedIterations << std::endl;
os << indent << "UseImageSpacing: " << (m_UseImageSpacing ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UseImageSpacing);
os << indent << "State: " << (m_IsInitialized ? "INITIALIZED" : "UNINITIALIZED") << std::endl;
os << indent << "MaximumRMSError: " << m_MaximumRMSError << std::endl;
os << indent << "NumberOfIterations: " << m_NumberOfIterations << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/GPUCommon/include/itkGPUReduction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ GPUReduction<TElement>::PrintSelf(std::ostream & os, Indent indent) const
os << indent << "TestGPUKernelHandle: " << m_TestGPUKernelHandle << std::endl;

os << indent << "Size: " << m_Size << std::endl;
os << indent << "SmallBlock: " << (m_SmallBlock ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(SmallBlock);

os << indent << "GPUResult: " << static_cast<typename NumericTraits<TElement>::PrintType>(m_GPUResult) << std::endl;
os << indent << "CPUResult: " << static_cast<typename NumericTraits<TElement>::PrintType>(m_CPUResult) << std::endl;
Expand Down
4 changes: 2 additions & 2 deletions Modules/Core/GPUCommon/src/itkGPUDataManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ GPUDataManager::PrintSelf(std::ostream & os, Indent indent) const
os << indent << "MemFlags: " << m_MemFlags << std::endl;
os << indent << "GPUBuffer: " << m_GPUBuffer << std::endl;
os << indent << "CPUBuffer: " << m_CPUBuffer << std::endl;
os << indent << "IsGPUBufferDirty: " << (m_IsGPUBufferDirty ? "On" : "Off") << std::endl;
os << indent << "IsCPUBufferDirty: " << (m_IsCPUBufferDirty ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(IsGPUBufferDirty);
itkPrintSelfBooleanMacro(IsCPUBufferDirty);
}

} // namespace itk
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ GPUFiniteDifferenceImageFilter<TInputImage, TOutputImage, TParentImageFilter>::P

itkPrintSelfObjectMacro(DifferenceFunction);

os << indent << "UseImageSpacing: " << (m_UseImageSpacing ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UseImageSpacing);
os << indent << "State: " << m_State << std::endl;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ BSplineInterpolateImageFunction<TImageType, TCoordRep, TCoefficientType>::PrintS

itkPrintSelfObjectMacro(CoefficientFilter);

os << indent << "UseImageDirection: " << (m_UseImageDirection ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UseImageDirection);

os << indent
<< "NumberOfWorkUnits: " << static_cast<typename NumericTraits<ThreadIdType>::PrintType>(m_NumberOfWorkUnits)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ CentralDifferenceImageFunction<TInputImage, TCoordRep, TOutputType>::PrintSelf(s
{
this->Superclass::PrintSelf(os, indent);

os << indent << "UseImageDirection: " << (m_UseImageDirection ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UseImageDirection);

itkPrintSelfObjectMacro(Interpolator);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ GaussianBlurImageFunction<TInputImage, TOutput>::PrintSelf(std::ostream & os, In
os << indent << "Extent[" << i << "] : " << m_Extent[i] << std::endl;
}
os << indent << "MaximumKernelWidth: " << m_MaximumKernelWidth << std::endl;
os << indent << "UseImageSpacing: " << (m_UseImageSpacing ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UseImageSpacing);

os << indent << "Internal Image : " << m_InternalImage << std::endl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void
GaussianDerivativeImageFunction<TInputImage, TOutput>::PrintSelf(std::ostream & os, Indent indent) const
{
this->Superclass::PrintSelf(os, indent);
os << indent << "UseImageSpacing: " << (m_UseImageSpacing ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UseImageSpacing);

os << indent << "Sigma: " << m_Sigma << std::endl;
os << indent << "Extent: " << m_Extent << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2694,7 +2694,7 @@ BinaryMask3DMeshSource<TInputImage, TOutputMesh>::PrintSelf(std::ostream & os, I
{
Superclass::PrintSelf(os, indent);

os << indent << "RegionOfInterestProvidedByUser: " << (m_RegionOfInterestProvidedByUser ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(RegionOfInterestProvidedByUser);
os << indent << "RegionOfInterest: " << m_RegionOfInterest << std::endl;

os << indent << "LUT: " << m_LUT << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ ContourSpatialObject<TDimension>::PrintSelf(std::ostream & os, Indent indent) co
// os << indent << "ControlPoints: " << m_ControlPoints << std::endl;
os << indent << "InterpolationMethod: " << m_InterpolationMethod << std::endl;
os << indent << "InterpolationFactor: " << m_InterpolationFactor << std::endl;
os << indent << "IsClosed: " << (m_IsClosed ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(IsClosed);
os << indent << "OrientationInObjectSpace: " << m_OrientationInObjectSpace << std::endl;
os << indent << "OrientationInObjectSpaceMTime: "
<< static_cast<typename NumericTraits<ModifiedTimeType>::PrintType>(m_OrientationInObjectSpaceMTime) << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ PolygonSpatialObject<TDimension>::PrintSelf(std::ostream & os, Indent indent) co
Superclass::PrintSelf(os, indent);
os << indent << "OrientationInObjectSpace: " << m_OrientationInObjectSpace << std::endl;
os << indent << "OrientationInObjectSpaceMTime: " << m_OrientationInObjectSpaceMTime << std::endl;
os << indent << "IsClosed: " << (m_IsClosed ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(IsClosed);
os << indent << "ThicknessInObjectSpace: " << m_ThicknessInObjectSpace << std::endl;
}

Expand Down
4 changes: 2 additions & 2 deletions Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ TubeSpatialObject<TDimension, TTubePointType>::PrintSelf(std::ostream & os, Inde
Superclass::PrintSelf(os, indent);

os << indent << "ParentPoint : " << m_ParentPoint << std::endl;
os << indent << "EndRounded: " << (m_EndRounded ? "On" : "Off") << std::endl;
os << indent << "Root: " << (m_Root ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(EndRounded);
itkPrintSelfBooleanMacro(Root);
}

template <unsigned int TDimension, typename TTubePointType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,7 @@ PipelineMonitorImageFilter<TImageType>::PrintSelf(std::ostream & os, Indent inde
{
Superclass::PrintSelf(os, indent);

os << indent
<< "ClearPipelineOnGenerateOutputInformation: " << (m_ClearPipelineOnGenerateOutputInformation ? "On" : "Off")
<< std::endl;
itkPrintSelfBooleanMacro(ClearPipelineOnGenerateOutputInformation);
os << indent << "NumberOfUpdates: " << m_NumberOfUpdates << std::endl;
os << indent << "NumberOfClearPipeline: " << m_NumberOfClearPipeline << std::endl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ AzimuthElevationToCartesianTransform<TParametersValueType, VDimension>::PrintSel
os << indent << "AzimuthAngularSeparation: " << m_AzimuthAngularSeparation << std::endl;
os << indent << "ElevationAngularSeparation: " << m_ElevationAngularSeparation << std::endl;
os << indent << "FirstSampleDistance: " << m_FirstSampleDistance << std::endl;
os << indent << "ForwardAzimuthElevationToPhysical: " << (m_ForwardAzimuthElevationToPhysical ? "On" : "Off")
<< std::endl;
itkPrintSelfBooleanMacro(ForwardAzimuthElevationToPhysical);
}

template <typename TParametersValueType, unsigned int VDimension>
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Transform/include/itkEuler3DTransform.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ Euler3DTransform<TParametersValueType>::PrintSelf(std::ostream & os, Indent inde
os << indent << "AngleX: " << static_cast<typename NumericTraits<ScalarType>::PrintType>(m_AngleX) << std::endl;
os << indent << "AngleY: " << static_cast<typename NumericTraits<ScalarType>::PrintType>(m_AngleY) << std::endl;
os << indent << "AngleZ: " << static_cast<typename NumericTraits<ScalarType>::PrintType>(m_AngleZ) << std::endl;
os << indent << "ComputeZYX: " << (m_ComputeZYX ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(ComputeZYX);
}

} // namespace itk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -947,12 +947,11 @@ MRIBiasFieldCorrectionFilter<TInputImage, TOutputImage, TMaskImage>::PrintSelf(s

os << indent << "SlicingDirection: " << m_SlicingDirection << std::endl;

os << indent << "BiasFieldMultiplicative: " << (m_BiasFieldMultiplicative ? "On" : "Off") << std::endl;
os << indent << "UsingInterSliceIntensityCorrection: " << (m_UsingInterSliceIntensityCorrection ? "On" : "Off")
<< std::endl;
os << indent << "UsingSlabIdentification: " << (m_UsingSlabIdentification ? "On" : "Off") << std::endl;
os << indent << "UsingBiasFieldCorrection: " << (m_UsingBiasFieldCorrection ? "On" : "Off") << std::endl;
os << indent << "GeneratingOutput: " << (m_GeneratingOutput ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(BiasFieldMultiplicative);
itkPrintSelfBooleanMacro(UsingInterSliceIntensityCorrection);
itkPrintSelfBooleanMacro(UsingSlabIdentification);
itkPrintSelfBooleanMacro(UsingBiasFieldCorrection);
itkPrintSelfBooleanMacro(GeneratingOutput);

os << indent << "SlabNumberOfSamples: " << m_SlabNumberOfSamples << std::endl;
os << indent << "SlabBackgroundMinimumThreshold: "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ BinaryClosingByReconstructionImageFilter<TInputImage, TKernel>::PrintSelf(std::o
os << indent
<< "ForegroundValue: " << static_cast<typename NumericTraits<InputPixelType>::PrintType>(m_ForegroundValue)
<< std::endl;
os << indent << "FullyConnected: " << (m_FullyConnected ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(FullyConnected);
}

} // end namespace itk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ BinaryOpeningByReconstructionImageFilter<TInputImage, TKernel>::PrintSelf(std::o
<< std::endl;
os << indent << "BackgroundValue: " << static_cast<typename NumericTraits<PixelType>::PrintType>(m_BackgroundValue)
<< std::endl;
os << indent << "FullyConnected: " << (m_FullyConnected ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(FullyConnected);
}

} // end namespace itk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ ObjectMorphologyImageFilter<TInputImage, TOutputImage, TKernel>::PrintSelf(std::

m_DefaultBoundaryCondition.Print(os, indent);

os << indent << "UseBoundaryCondition: " << (m_UseBoundaryCondition ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UseBoundaryCondition);
os << indent << "Kernel: " << static_cast<typename NumericTraits<KernelType>::PrintType>(m_Kernel) << std::endl;
os << indent << "ObjectValue: " << static_cast<typename NumericTraits<PixelType>::PrintType>(m_ObjectValue)
<< std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,17 +257,16 @@ PatchBasedDenoisingBaseImageFilter<TInputImage, TOutputImage>::PrintSelf(std::os

os << indent << "State: " << m_State << std::endl;
os << indent << "PatchRadius: " << m_PatchRadius << std::endl;
os << indent << "KernelBandwidthEstimation: " << (m_KernelBandwidthEstimation ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(KernelBandwidthEstimation);
os << indent << "KernelBandwidthUpdateFrequency: " << m_KernelBandwidthUpdateFrequency << std::endl;
os << indent << "NumberOfIterations: " << m_NumberOfIterations << std::endl;
os << indent << "ElapsedIterations: " << m_ElapsedIterations << std::endl;
os << indent << "NoiseModel: " << m_NoiseModel << std::endl;
os << indent << "SmoothingWeight: " << m_SmoothingWeight << std::endl;
os << indent << "NoiseModelFidelityWeight: " << m_NoiseModelFidelityWeight << std::endl;
os << indent << "AlwaysTreatComponentsAsEuclidean: " << (m_AlwaysTreatComponentsAsEuclidean ? "On" : "Off")
<< std::endl;
itkPrintSelfBooleanMacro(AlwaysTreatComponentsAsEuclidean);
os << indent << "ComponentSpace: " << m_ComponentSpace << std::endl;
os << indent << "ManualReinitialization: " << (m_ManualReinitialization ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(ManualReinitialization);
}
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2388,11 +2388,11 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>::PrintSelf(std::ostrea
os << "(Cannot be computed: input not set)" << std::endl;
}

os << indent << "UseSmoothDiscPatchWeights: " << (m_UseSmoothDiscPatchWeights ? "On" : "Off") << std::endl;
os << indent << "UseFastTensorComputations: " << (m_UseFastTensorComputations ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UseSmoothDiscPatchWeights);
itkPrintSelfBooleanMacro(UseFastTensorComputations);

os << indent << "KernelBandwidthSigma: " << m_KernelBandwidthSigma << std::endl;
os << indent << "KernelBandwidthSigmaIsSet: " << (m_KernelBandwidthSigmaIsSet ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(KernelBandwidthSigmaIsSet);

os << indent << "IntensityRescaleInvFactor: " << m_IntensityRescaleInvFactor << std::endl;

Expand All @@ -2403,7 +2403,7 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>::PrintSelf(std::ostrea
os << indent << "KernelBandwidthFractionPixelsForEstimation: " << m_KernelBandwidthFractionPixelsForEstimation
<< std::endl;

os << indent << "ComputeConditionalDerivatives: " << (m_ComputeConditionalDerivatives ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(ComputeConditionalDerivatives);

os << indent << "MinSigma: " << m_MinSigma << std::endl;
os << indent << "MinProbability: " << m_MinProbability << std::endl;
Expand All @@ -2415,7 +2415,7 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>::PrintSelf(std::ostrea

os << indent << "NoiseSigma: " << m_NoiseSigma << std::endl;
os << indent << "NoiseSigmaSquared: " << m_NoiseSigmaSquared << std::endl;
os << indent << "NoiseSigmaIsSet: " << (m_NoiseSigmaIsSet ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(NoiseSigmaIsSet);

itkPrintSelfObjectMacro(Sampler);
itkPrintSelfObjectMacro(UpdateBuffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ BSplineSmoothingOnUpdateDisplacementFieldTransform<TParametersValueType, VDimens

os << indent << "SplineOrder: " << static_cast<typename NumericTraits<SplineOrderType>::PrintType>(m_SplineOrder)
<< std::endl;
os << indent << "EnforceStationaryBoundary: " << (m_EnforceStationaryBoundary ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(EnforceStationaryBoundary);
os << indent << "NumberOfControlPointsForTheUpdateField: " << m_NumberOfControlPointsForTheUpdateField << std::endl;
os << indent << "NumberOfControlPointsForTheTotalField: " << m_NumberOfControlPointsForTheTotalField << std::endl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ DisplacementFieldJacobianDeterminantFilter<TInputImage, TRealType, TOutputImage>

os << indent << "DerivativeWeights: " << m_DerivativeWeights << std::endl;
os << indent << "HalfDerivativeWeights: " << m_HalfDerivativeWeights << std::endl;
os << indent << "UseImageSpacing: " << (m_UseImageSpacing ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UseImageSpacing);
os << indent << "RequestedNumberOfThreads: "
<< static_cast<typename NumericTraits<ThreadIdType>::PrintType>(m_RequestedNumberOfWorkUnits) << std::endl;
os << indent << "RealValuedInputImage: " << m_RealValuedInputImage.GetPointer() << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,14 @@ DisplacementFieldToBSplineImageFilter<TInputImage, TInputPointSet, TOutputImage>
{
Superclass::PrintSelf(os, indent);

os << indent << "EstimateInverse: " << (m_EstimateInverse ? "On" : "Off") << std::endl;
os << indent << "EnforceStationaryBoundary: " << (m_EnforceStationaryBoundary ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(EstimateInverse);
itkPrintSelfBooleanMacro(EnforceStationaryBoundary);
os << indent << "NumberOfControlPoints: " << m_NumberOfControlPoints << std::endl;
os << indent << "NumberOfFittingLevels: " << m_NumberOfFittingLevels << std::endl;

itkPrintSelfObjectMacro(PointWeights);

os << indent << "UsePointWeights: " << (m_UsePointWeights ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UsePointWeights);

os << indent
<< "BSplineDomainOrigin: " << static_cast<typename NumericTraits<OriginType>::PrintType>(m_BSplineDomainOrigin)
Expand All @@ -409,9 +409,8 @@ DisplacementFieldToBSplineImageFilter<TInputImage, TInputPointSet, TOutputImage>
os << indent << "BSplineDomainDirection: "
<< static_cast<typename NumericTraits<DirectionType>::PrintType>(m_BSplineDomainDirection) << std::endl;

os << indent << "BSplineDomainIsDefined: " << (m_BSplineDomainIsDefined ? "On" : "Off") << std::endl;
os << indent << "UseInputFieldToDefineTheBSplineDomain: " << (m_UseInputFieldToDefineTheBSplineDomain ? "On" : "Off")
<< std::endl;
itkPrintSelfBooleanMacro(BSplineDomainIsDefined);
itkPrintSelfBooleanMacro(UseInputFieldToDefineTheBSplineDomain);
}

} // end namespace itk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ ContourDirectedMeanDistanceImageFilter<TInputImage1, TInputImage2>::PrintSelf(st
{
Superclass::PrintSelf(os, indent);

os << indent << "UseImageSpacing: " << (m_UseImageSpacing ? "On" : "Off") << std::endl;
itkPrintSelfBooleanMacro(UseImageSpacing);
os << indent << "ContourDirectedMeanDistance: " << m_ContourDirectedMeanDistance << std::endl;
}
} // end namespace itk
Expand Down
Loading

0 comments on commit e93fa19

Please sign in to comment.