Update startReconstructions.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#include "startReconstructions.h"
|
||||
#include "Data/TemperatureData.h"
|
||||
#include "Function.h"
|
||||
#include "MatlabWriter.h"
|
||||
#include "config/config.h"
|
||||
#include "log/log.h"
|
||||
#include "common/getMeasurementMetaData.h"
|
||||
#include "common/getGeometryInfo.h"
|
||||
#include "common/estimatePulseLength.h"
|
||||
@@ -11,6 +13,7 @@
|
||||
#include <iostream>
|
||||
#include "Parser/Parser.h"
|
||||
#include "Parser/Data/MetaData.h"
|
||||
#include "Parser/ShotList/ShotList.h"
|
||||
|
||||
#include "Matrix.h"
|
||||
#include "MatlabReader.h"
|
||||
@@ -28,16 +31,16 @@ using namespace Aurora;
|
||||
|
||||
void Recon::startReconstructions()
|
||||
{
|
||||
// std::string dataPath = "/home/AScans_Data/volunteer_20230328/20230328T123237/";
|
||||
// std::string refPath = "/home/AScans_Data/volunteer_20230328/20230328T123237/";
|
||||
std::string dataPath = "/home/AScans_Data/ADW_TAS_Issue/20230418T145123/";
|
||||
std::string refPath = "/home/AScans_Data/ADW_TAS_Issue/20230418T141000/";
|
||||
std::string outputPath;
|
||||
//std::string dataPath = "/home/AScans_Data/volunteer_20230620/20230620T120410/";
|
||||
//std::string refPath = "/home/AScans_Data/volunteer_20230620/20230620T122424/";
|
||||
//std::string dataPath = "/home/AScans_Data/10VolunteerStudyData/20221107/20221107T142539";
|
||||
//std::string refPath = "/home/AScans_Data/10VolunteerStudyData/20221107/20221107T152522";
|
||||
std::string outputPath = "/home/sun/20230627_20230418T145123_UR.mat";
|
||||
MatlabWriter writer(outputPath);
|
||||
Parser dataParser(dataPath);
|
||||
Parser refParser(refPath);
|
||||
std::string rootMeasUniqueID = dataParser.getMetaData().getMeasurementID();
|
||||
std::string rootRefUniqueID = refParser.getMetaData().getMeasurementID();
|
||||
|
||||
//init total used receiver/emitter/motorPos
|
||||
Matrix motorPosTotal, slList, snList, rlList, rnList;
|
||||
if(transParams::runTransmissionReco && reflectParams::runReflectionReco)
|
||||
@@ -116,15 +119,9 @@ void Recon::startReconstructions()
|
||||
motorPosAvailableRef = Matrix();
|
||||
}
|
||||
|
||||
Matrix isEqual = (ce.ceRef == ceRef.ceRef);
|
||||
if (sum(isEqual, FunctionDirection::All).getData()[0] == isEqual.getDataSize())
|
||||
{
|
||||
std::cout<<"CEs are not equal"<<std::endl;
|
||||
}
|
||||
|
||||
if(!ce.ce.isNull() && !ceRef.ce.isNull())
|
||||
{
|
||||
isEqual = (ce.ce == ceRef.ce);
|
||||
Matrix isEqual = (ce.ce == ceRef.ce);
|
||||
if (sum(isEqual, FunctionDirection::All).getData()[0] == isEqual.getDataSize())
|
||||
{
|
||||
std::cout<<"CEs are not equal."<<std::endl;
|
||||
@@ -214,10 +211,12 @@ void Recon::startReconstructions()
|
||||
transParams::gpuSelectionList = reconParams::gpuSelectionList;
|
||||
|
||||
GeometryInfo geomRef = getGeometryInfo(motorPosAvailableRef, transformationMatricesRef, rlList, rnList, slList, snList);
|
||||
|
||||
RECON_INFO("Start transmissionRecostruction.");
|
||||
transmissionResult = startTransmissionReconstruction(mp_inter, mpRef_inter, slList_inter, snList_inter, rlList_inter, rnList_inter, temp, tempRef, geom, geomRef, expInfo, expInfoRef, preComputes, &dataParser, &refParser);
|
||||
attAvailable = true;
|
||||
sosAvailable = true;
|
||||
writer.setMatrix(transmissionResult.recoSOS, "sos");
|
||||
writer.setMatrix(transmissionResult.recoATT, "att");
|
||||
}
|
||||
|
||||
if(reflectParams::runReflectionReco)
|
||||
@@ -240,6 +239,10 @@ void Recon::startReconstructions()
|
||||
preComputes.offset = estimateOffset(expInfo, ce, preComputes.matchedFilter);
|
||||
|
||||
reflectParams::gpuSelectionList = reconParams::gpuSelectionList;
|
||||
startReflectionReconstruction(&dataParser, preProcessData.saftMode, mp_inter, slList_inter, snList_inter, rlList_inter, rnList_inter, geom, preProcessData.transRecos, expInfo, preComputes);
|
||||
RECON_INFO("Start reflectionRecostruction.");
|
||||
Matrix env = startReflectionReconstruction(&dataParser, preProcessData.saftMode, mp_inter, slList_inter, snList_inter, rlList_inter, rnList_inter, geom, preProcessData.transRecos, expInfo, preComputes);
|
||||
writer.setMatrix(env, "reflect");
|
||||
}
|
||||
|
||||
writer.write();
|
||||
}
|
||||
Reference in New Issue
Block a user