MCPcopy Create free account
hub / github.com/MITK/MITK / CopyInformation

Method CopyInformation

Modules/Core/src/DataManagement/mitkBaseData.cpp:222–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222void mitk::BaseData::CopyInformation(const itk::DataObject *data)
223{
224 const auto *bd = dynamic_cast<const Self *>(data);
225 if (bd != nullptr)
226 {
227 m_PropertyList = bd->GetPropertyList()->Clone();
228 if (bd->GetTimeGeometry() != nullptr)
229 {
230 m_TimeGeometry = bd->GetTimeGeometry()->Clone();
231 }
232 }
233 else
234 {
235 // pointer could not be cast back down; this can be the case if your filters input
236 // and output objects differ in type; then you have to write your own GenerateOutputInformation method
237 itkExceptionMacro(<< "mitk::BaseData::CopyInformation() cannot cast " << typeid(data).name() << " to "
238 << typeid(Self *).name());
239 }
240}
241
242bool mitk::BaseData::IsInitialized() const
243{

Callers

nothing calls this directly

Calls 3

CloneMethod · 0.45
GetPropertyListMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected