Пример #1
0
bool mitk::PlaneGeometryData::VerifyRequestedRegion()
{
  if(GetPlaneGeometry()==NULL) return false;

  return true;
}
Пример #2
0
}

void mitkSlicedGeometry3D_ChangeImageGeometryConsideringOriginOffset_Test()
{
  MITK_TEST_OUTPUT(<< "====== mitkSlicedGeometry3D_ChangeImageGeometryConsideringOriginOffset_Test() ======");

  auto origin = createPoint(91.3, -13.3, 0);
  auto spacing = createVector(1.0, 0.9, 0.3);
  auto numberOfSlices = 5;
  auto slicedGeometry = createSlicedGeometry(origin, spacing, numberOfSlices);

  MITK_TEST_OUTPUT(<< "SlicedGeometry3D isn't an image geometry by default");
  MITK_TEST_CONDITION_REQUIRED(slicedGeometry->GetImageGeometry() == false, "");

  MITK_TEST_OUTPUT(<< "First and last PlaneGeometry in SlicedGeometry3D are not image geometries");
  auto firstPlaneGeometry = slicedGeometry->GetPlaneGeometry(0);
  auto lastPlaneGeometry = slicedGeometry->GetPlaneGeometry(numberOfSlices - 1);
  MITK_TEST_CONDITION_REQUIRED(firstPlaneGeometry->GetImageGeometry() == false, "");
  MITK_TEST_CONDITION_REQUIRED(lastPlaneGeometry->GetImageGeometry() == false, "");

  auto originOfSlicedGeometry = slicedGeometry->GetOrigin();
  auto originOfFirstPlaneGeometry = firstPlaneGeometry->GetOrigin();
  auto originOfLastPlaneGeometry = lastPlaneGeometry->GetOrigin();
  auto firstCornerPointOfSlicedGeometry = slicedGeometry->GetCornerPoint(0);
  auto secondCornerPointOfFirstPlaneGeometry = firstPlaneGeometry->GetCornerPoint(1);
  auto thirdCornerPointOfLastPlaneGeometry = lastPlaneGeometry->GetCornerPoint(2);

  MITK_TEST_OUTPUT(<< "Calling SlicedGeometry3D::ChangeImageGeometryConsideringOriginOffset(true)");
  slicedGeometry->ChangeImageGeometryConsideringOriginOffset(true);
  MITK_TEST_OUTPUT(<< "SlicedGeometry3D is an image geometry");
  MITK_TEST_CONDITION_REQUIRED(slicedGeometry->GetImageGeometry() == true, "");
Пример #3
0
bool mitk::PlaneGeometryData::RequestedRegionIsOutsideOfTheBufferedRegion()
{
  if(GetPlaneGeometry()==NULL) return true;

  return false;
}