コード例 #1
0
const mitk::NavigationData* mitk::NavigationDataToNavigationDataFilter::GetInput(std::string navDataName) const
{
  const DataObjectPointerArray& inputs = const_cast<Self*>(this)->GetInputs();
  for (DataObjectPointerArray::const_iterator it = inputs.begin(); it != inputs.end(); ++it)
    if (std::string(navDataName) == (static_cast<NavigationData*>(it->GetPointer()))->GetName())
      return static_cast<NavigationData*>(it->GetPointer());
  return nullptr;
}
コード例 #2
0
const mitk::IGTLMessage*
mitk::IGTLDeviceSource::GetInput(std::string msgName) const
{
  const DataObjectPointerArray& inputs = const_cast<Self*>(this)->GetInputs();
  for (DataObjectPointerArray::const_iterator it = inputs.begin();
       it != inputs.end(); ++it)
    if (std::string(msgName) ==
        (static_cast<IGTLMessage*>(it->GetPointer()))->GetName())
      return static_cast<IGTLMessage*>(it->GetPointer());
  return NULL;
}