void mitk::PointSetToCurvedGeometryFilter::SetDefaultCurvedGeometryProperties ( mitk::DataNode* node ) { if ( node == NULL ) { itkGenericOutputMacro ( "Warning: node is NULL!" ); return; } node->SetIntProperty ( "xresolution", 50 ); node->SetIntProperty ( "yresolution", 50 ); node->SetProperty ( "name", mitk::StringProperty::New ( "Curved Plane" ) ); // exclude extent of this plane when calculating DataStorage bounding box node->SetProperty ( "includeInBoundingBox", mitk::BoolProperty::New ( false ) ); }
/** * \brief returns the current time in milliseconds * * Gets the current time since the Epoch (01.01.1970). gettimeofday returns the elapsed time in * microseconds.This value is calculated to milliseconds and returned as a double. * * \return Returns the elapsed time in milliseconds */ double mitk::LinuxRealTimeClock::GetCurrentStamp() { struct timeval tval; if ( ::gettimeofday( &tval, 0 )!= 0 ) { itkGenericOutputMacro("gettimeofday-method could not successfully acquire the current time"); return -1; } double milliseconds; milliseconds = static_cast< double >( tval.tv_sec ) + static_cast< double >( tval.tv_usec ) / 1e6; return milliseconds*1000; // in milliseconds }
void mitk::IGTTimeStamp::Start(itk::Object::Pointer device) { if (m_RealTimeClock.IsNull()) { Initialize(); } if ( s_Instance.IsNotNull() ) { if (m_DeviceMap.empty()) { m_ReferenceTime = GetCurrentStamp(); m_Time = 0.0; } m_DeviceMap.insert( std::pair<itk::Object::Pointer, double>(device, this->GetElapsed()) ); } else { itkGenericOutputMacro("Trying to use mitk::TimeStamp::Start() " << "without an available singleton instance. Either no instance has " << "been created (use TimeStamp::CreateInstance) or it has already " << "been destroyed."); } }
void mitk::IGTTimeStamp::Stop(itk::Object::Pointer device) { if ( s_Instance.IsNotNull() ) { m_MapIterator = m_DeviceMap.find(device); if ( m_MapIterator != m_DeviceMap.end() ) { m_DeviceMap.erase( m_MapIterator ); } if (m_DeviceMap.empty()) { m_ReferenceTime = 0; m_Time = -1; } } else { itkGenericOutputMacro("Trying to use mitk::TimeStamp::Stop() " << "without an available singleton instance. Either no instance has " << "been created (use TimeStamp::CreateInstance) or it has already " << "been destroyed."); } }