void Equal_DifferentBoundingBox_ReturnsFalse() { //create different bounds to make the comparison false mitk::ScalarType bounds[ ] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; m_AnotherGeometry3D->SetBounds(bounds); MITK_ASSERT_NOT_EQUAL( m_Geometry3D, m_AnotherGeometry3D, "Bounds are different. Result should be false."); }
void GetGridGeometryFromNode(const mitk::DataNode* regNode, mitk::Geometry3D::Pointer& gridDesc, unsigned int& gridFrequ) { int internalFrequ = 1; if(!regNode->GetIntProperty(mitk::nodeProp_RegVisGridFrequence,internalFrequ)) { mitkThrow() << "Cannot configure node correctly. Node property "<<mitk::nodeProp_RegVisGridFrequence<<" is not correctly defined."; } mitk::Vector3DProperty* valueProp = NULL; mitk::Vector3D size; mitk::Vector3D spacing; if (regNode->GetProperty(valueProp, mitk::nodeProp_RegVisFOVSize)) { size = valueProp->GetValue(); } else { mitkThrow() << "Cannot configure node correctly. Node property "<<mitk::nodeProp_RegVisFOVSize<<" is not correctly defined."; } if (regNode->GetProperty(valueProp, mitk::nodeProp_RegVisFOVSpacing)) { spacing = valueProp->GetValue(); } else { mitkThrow() << "Cannot configure node correctly. Node property "<<mitk::nodeProp_RegVisFOVSpacing<<" is not correctly defined."; } mitk::Point3dProperty* originProp = NULL; mitk::Point3D origin; if (regNode->GetProperty(originProp, mitk::nodeProp_RegVisFOVOrigin)) { origin = originProp->GetValue(); } else { mitkThrow() << "Cannot configure node correctly. Node property "<<mitk::nodeProp_RegVisFOVOrigin<<" is not correctly defined."; } gridDesc = mitk::Geometry3D::New(); mitk::Geometry3D::BoundsArrayType bounds = gridDesc->GetBounds(); bounds[0] = 0; bounds[1] = size[0]/spacing[0]; bounds[2] = 0; bounds[3] = size[1]/spacing[1]; bounds[4] = 0; bounds[5] = size[2]/spacing[2]; gridDesc->SetBounds(bounds); gridDesc->SetSpacing(spacing); gridDesc->SetOrigin(origin); gridFrequ = internalFrequ; }