コード例 #1
0
  void TestOpDeselectPoint()
  {
    //check OpDESELECTPOINT  ExecuteOperation
    mitk::Point3D point4(0.);

    doOp = new mitk::PointOperation(mitk::OpDESELECTPOINT, point4,4);

    pointSet->ExecuteOperation(doOp);

    CPPUNIT_ASSERT_EQUAL_MESSAGE("check PointOperation OpDESELECTPOINT ",
        false, pointSet->GetSelectInfo(4));
    CPPUNIT_ASSERT_EQUAL_MESSAGE("check GetNumeberOfSelected ",
        true, pointSet->GetNumberOfSelected() == 0 );

    /*
    if (pointSet->GetSelectInfo(4))
    {
    std::cout<<"[FAILED]"<<std::endl;
    return EXIT_FAILURE;
    }
    delete doOp;
    std::cout<<"[PASSED]"<<std::endl;


    if(pointSet->GetNumberOfSelected() != 0)
    {
    std::cout<<"[FAILED]"<<std::endl;
    return EXIT_FAILURE;
    }
    std::cout<<"[PASSED]"<<std::endl;
     */
  }
コード例 #2
0
  void EvaluateState(std::string &refPsFile, mitk::PointSet::Pointer ps, int selected)
  {
    mitk::PointSet::Pointer refPs = dynamic_cast<mitk::PointSet*>(mitk::IOUtil::Load(refPsFile)[0].GetPointer());
    refPs->UpdateOutputInformation();
    ps->UpdateOutputInformation();

    MITK_ASSERT_EQUAL(ps, refPs, "");

    MITK_TEST_CONDITION_REQUIRED(true, "Test against reference point set.");
    MITK_TEST_CONDITION_REQUIRED(ps->GetNumberOfSelected() == 1, "One selected point.");
    MITK_TEST_CONDITION_REQUIRED(ps->GetSelectInfo(selected), "Testing if proper point is selected.");
  }
コード例 #3
0
  void TestGetNumberOfSelected()
  {

    // check GetNumeberOfSelected
    CPPUNIT_ASSERT_EQUAL_MESSAGE("check GetNumeberOfSelected ",
        true, pointSet->GetNumberOfSelected() == 1);

          /*
      if(pointSet->GetNumberOfSelected() != 1)
      {
      std::cout<<"[FAILED]"<<std::endl;
      return EXIT_FAILURE;
      }
      std::cout<<"[PASSED]"<<std::endl;
           */
  }