Revision a763b81ee81810f5fa544165d5053bde478b2dbd authored by Konrad Werys on 28 November 2019, 13:47:50 UTC, committed by Konrad Werys on 28 November 2019, 13:47:50 UTC
1 parent e3f0532
Raw File
TomatoOnePixel_test.cpp
/*!
 * \file OxCalculatorT2_test.cpp
 * \author Konrad Werys
 * \date 2019/11/01
 */

#include <OxFitterLevenbergMarquardtVnl.h>
#include "gtest/gtest.h"
#include "OxTestData.h"

#include "CmakeConfigForTomato.h"

#include "TomatoOnePixel.h"

#ifdef USE_VNL
TEST(TomatoOnePixel, blood) {

    typedef double TYPE;

    char filePath [] = "testData/T2_blood.yaml";
    Ox::TestData<TYPE> testData(filePath);

    Ox::TomatoOptions<TYPE> options;
    options.signal_magnitude = testData.getSignalMag();
    options.echo_times = testData.getEchoTimes();
    options.parameter_to_map = Ox::T2_basic;
    options.model_type = Ox::_ModelT2TwoParam;

//    options.fitting_method = Ox::LevMarVnl;
//    options.printCurrent();
    std::map<std::string, TYPE > results = Ox::calculateOnePixel(options);

    EXPECT_NEAR(results["A"],  testData.getResultsTwoParam()[0], 1e-1);
    EXPECT_NEAR(results["T2"], testData.getResultsTwoParam()[1], 1e-1);
}

#endif
back to top