diff --git a/Modules/CameraCalibration/mitkCameraIntrinsicsProperty.cpp b/Modules/CameraCalibration/mitkCameraIntrinsicsProperty.cpp index e6ac3712c0..1e4f18c97f 100644 --- a/Modules/CameraCalibration/mitkCameraIntrinsicsProperty.cpp +++ b/Modules/CameraCalibration/mitkCameraIntrinsicsProperty.cpp @@ -1,59 +1,69 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #include "mitkCameraIntrinsicsProperty.h" namespace mitk { bool CameraIntrinsicsProperty::IsEqual(const BaseProperty& property) const { return this->m_Value->Equals(static_cast<const Self&>(property).m_Value.GetPointer()); } bool CameraIntrinsicsProperty::Assign(const BaseProperty& property) { this->m_Value = static_cast<const Self&>(property).m_Value; return true; } std::string CameraIntrinsicsProperty::GetValueAsString() const { std::stringstream myStr; myStr << GetValue(); return myStr.str(); } CameraIntrinsicsProperty::CameraIntrinsicsProperty() : BaseProperty() {} CameraIntrinsicsProperty::CameraIntrinsicsProperty(const CameraIntrinsicsProperty& other) : BaseProperty(other) { } CameraIntrinsicsProperty::CameraIntrinsicsProperty( mitk::CameraIntrinsics::Pointer value ) : BaseProperty(), m_Value( value ) {} itk::LightObject::Pointer CameraIntrinsicsProperty::InternalClone() const { itk::LightObject::Pointer result(new Self(*this)); result->UnRegister(); return result; } +bool CameraIntrinsicsProperty::ToJSON(nlohmann::json&) const +{ + return false; +} + +bool CameraIntrinsicsProperty::FromJSON(const nlohmann::json&) +{ + return false; +} + } // namespace mitk diff --git a/Modules/CameraCalibration/mitkCameraIntrinsicsProperty.h b/Modules/CameraCalibration/mitkCameraIntrinsicsProperty.h index c992948156..23d40b6c69 100644 --- a/Modules/CameraCalibration/mitkCameraIntrinsicsProperty.h +++ b/Modules/CameraCalibration/mitkCameraIntrinsicsProperty.h @@ -1,73 +1,76 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef mitkCameraIntrinsicsProperty_h #define mitkCameraIntrinsicsProperty_h #include "mitkBaseProperty.h" #include "mitkCameraIntrinsics.h" namespace mitk { #ifdef _MSC_VER # pragma warning(push) # pragma warning(disable: 4522) #endif class MITKCAMERACALIBRATION_EXPORT CameraIntrinsicsProperty : public BaseProperty { public: typedef mitk::CameraIntrinsics::Pointer ValueType; mitkClassMacro(CameraIntrinsicsProperty, BaseProperty); itkFactorylessNewMacro(Self); itkCloneMacro(Self) mitkNewMacro1Param(CameraIntrinsicsProperty, mitk::CameraIntrinsics::Pointer); itkSetMacro(Value, mitk::CameraIntrinsics::Pointer ); itkGetConstMacro(Value, mitk::CameraIntrinsics::Pointer ); std::string GetValueAsString() const override; + bool ToJSON(nlohmann::json& j) const override; + bool FromJSON(const nlohmann::json& j) override; + using BaseProperty::operator=; protected: mitk::CameraIntrinsics::Pointer m_Value; CameraIntrinsicsProperty(); CameraIntrinsicsProperty(const CameraIntrinsicsProperty&); CameraIntrinsicsProperty( mitk::CameraIntrinsics::Pointer value ); private: // purposely not implemented CameraIntrinsicsProperty& operator=(const CameraIntrinsicsProperty&); itk::LightObject::Pointer InternalClone() const override; bool IsEqual(const BaseProperty& property) const override; bool Assign(const BaseProperty& property) override; }; #ifdef _MSC_VER # pragma warning(pop) #endif } // namespace mitk #endif