[ITK-dev] itk::Mesh::CopyInformation redundancy?

Williams, Norman K norman-k-williams at uiowa.edu
Tue Jun 17 13:24:28 EDT 2014


This looks like a case where copy/paste didn’t work out, or the code changed without all the ramifications of the change propagating.

Nothing actually happens in Mesh::CopyInformation except the call to Superclass::CopyInformation.

Should something happen in this method? If not, is there a reason to have a Mesh::CopyInformation at all?

template< typename TPixelType, unsigned int VDimension, typename TMeshTraits >
void
Mesh< TPixelType, VDimension, TMeshTraits >
::CopyInformation(const DataObject *data)
{
  this->Superclass::CopyInformation(data);
  const Self *mesh = ITK_NULLPTR;
  try
    {
    mesh = dynamic_cast< const Self * >( data );
    }
  catch ( ... )
    {
    // mesh could not be cast back down
    itkExceptionMacro( << "itk::Mesh::CopyInformation() cannot cast "
                       << typeid( data ).name() << " to "
                       << typeid( Self * ).name() );
    }
  if ( !mesh )
    {
    // pointer could not be cast back down
    itkExceptionMacro( << "itk::Mesh::CopyInformation() cannot cast "
                       << typeid( data ).name() << " to "
                       << typeid( Self * ).name() );
    }

  // Copy here specific elements of the Mesh
}





________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-developers/attachments/20140617/3424dd82/attachment.html>


More information about the Insight-developers mailing list