Skip to content

Commit

Permalink
ENH: Use itkPrintSelfObjectMacro to print objects that can be null
Browse files Browse the repository at this point in the history
Use `itkPrintSelfObjectMacro` to print objects that can be null.
  • Loading branch information
jhlegarreta authored and dzenanz committed Dec 27, 2021
1 parent ce00b06 commit 5d860e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Expand Up @@ -293,12 +293,8 @@ TimeVaryingVelocityFieldIntegrationImageFilter<TTimeVaryingVelocityField, TDispl
os << indent << "LowerTimeBound: " << this->m_LowerTimeBound << std::endl;
os << indent << "UpperTimeBound: " << this->m_UpperTimeBound << std::endl;
os << indent << "NumberOfIntegrationSteps: " << this->m_NumberOfIntegrationSteps << std::endl;

if (!this->m_InitialDiffeomorphism.IsNull())
{
os << indent << "InitialDiffeomorphism: " << this->m_InitialDiffeomorphism << std::endl;
os << indent << "DisplacementFieldInterpolator: " << this->m_DisplacementFieldInterpolator << std::endl;
}
itkPrintSelfObjectMacro(InitialDiffeomorphism);
itkPrintSelfObjectMacro(DisplacementFieldInterpolator);
}

} // end namespace itk
Expand Down
6 changes: 1 addition & 5 deletions Modules/Video/IO/include/itkVideoFileReader.hxx
Expand Up @@ -325,11 +325,7 @@ VideoFileReader<TOutputVideoStream>::PrintSelf(std::ostream & os, Indent indent)
Superclass::PrintSelf(os, indent);

os << indent << "FileName: " << this->m_FileName << std::endl;
if (m_VideoIO)
{
os << indent << "VideoIO:" << std::endl;
this->m_VideoIO->Print(os, indent.GetNextIndent());
}
itkPrintSelfObjectMacro(VideoIO);
}

} // end namespace itk
Expand Down

0 comments on commit 5d860e6

Please sign in to comment.