bool OpenIGTLinkProtocol::unpackBody(const igtl::MessageBase::Pointer &body) { int c = body->Unpack(this->doCRC()); if (c & igtl::MessageHeader::UNPACK_BODY) { this->translate(mHeader, body); } else { CX_LOG_CHANNEL_ERROR(CX_OPENIGTLINK_CHANNEL_NAME) << "Could not unpack the body of type: " << body->GetDeviceType(); return false; } return true; }
bool OpenIGTLinkProtocol::unpackHeader(const igtl::MessageHeader::Pointer &header) const { int doCRCOnHeader = 1; int c = header->Unpack(doCRCOnHeader); if (c & igtl::MessageHeader::UNPACK_HEADER) { //CX_LOG_DEBUG() << "unpacked header of type " << header->GetDeviceType(); return true; } else { CX_LOG_CHANNEL_ERROR(CX_OPENIGTLINK_CHANNEL_NAME) << "Could not unpack header"; return false; } }
void DicomWidget::setupDatabaseDirectory() { QString databaseDirectory = this->getDICOMDatabaseDirectory(); QDir qdir(databaseDirectory); if ( !qdir.exists(databaseDirectory) ) { if ( !qdir.mkpath(databaseDirectory) ) { CX_LOG_CHANNEL_ERROR("dicom") << "Could not create database directory \"" << databaseDirectory; } } CX_LOG_CHANNEL_INFO("dicom") << "DatabaseDirectory set to: " << databaseDirectory; mBrowser->setDatabaseDirectory(databaseDirectory); }