Add usage of command line.
This commit is contained in:
@@ -12,7 +12,6 @@ namespace Recon
|
||||
const std::string ReconParamsFileName = "configReconstruction_USCT3Dv3.json";
|
||||
const std::string ReflectParamsFileName = "configReflectionReconstruction_USCT3Dv3.json";
|
||||
const std::string TransParramsFileName = "configTransmissionReconstruction_USCT3Dv3.json";
|
||||
const std::string ConfigPath= "./";
|
||||
|
||||
Aurora::Matrix readToMatrix(const nlohmann::json& aJsonObj, bool aIsHorizontal = true)
|
||||
{
|
||||
@@ -37,14 +36,14 @@ namespace Recon
|
||||
return Aurora::Matrix();
|
||||
}
|
||||
|
||||
void initalizeConfigFromFiles()
|
||||
void initalizeConfigFromFiles(const std::string aConfigPath)
|
||||
{
|
||||
nlohmann::json reconParamsJson;
|
||||
nlohmann::json reflectParamsJson;
|
||||
nlohmann::json transParamsJson;
|
||||
std::ifstream reconParamsFile(ReconParamsFileName);
|
||||
std::ifstream reflectParamsFile(ReflectParamsFileName);
|
||||
std::ifstream transParamsFile(TransParramsFileName);
|
||||
std::ifstream reconParamsFile(aConfigPath + ReconParamsFileName);
|
||||
std::ifstream reflectParamsFile(aConfigPath + ReflectParamsFileName);
|
||||
std::ifstream transParamsFile(aConfigPath + TransParramsFileName);
|
||||
if(reconParamsFile.good())
|
||||
{
|
||||
reconParamsFile >> reconParamsJson;
|
||||
@@ -111,7 +110,7 @@ namespace Recon
|
||||
}
|
||||
else
|
||||
{
|
||||
RECON_INFO(ReconParamsFileName + " not found.");
|
||||
RECON_INFO(aConfigPath + ReconParamsFileName + " not found.");
|
||||
}
|
||||
|
||||
if(reflectParamsFile.good())
|
||||
@@ -360,7 +359,7 @@ namespace Recon
|
||||
}
|
||||
else
|
||||
{
|
||||
RECON_INFO(ReflectParamsFileName + " not found.");
|
||||
RECON_INFO(aConfigPath + ReflectParamsFileName + " not found.");
|
||||
}
|
||||
|
||||
if(transParamsFile.good())
|
||||
@@ -611,14 +610,14 @@ namespace Recon
|
||||
}
|
||||
else
|
||||
{
|
||||
RECON_INFO(TransParramsFileName + " not found.");
|
||||
RECON_INFO(aConfigPath + TransParramsFileName + " not found.");
|
||||
}
|
||||
reflectParams::expectedAScanDataLength = reconParams::expectedAScanDataLength;
|
||||
reflectParams::gpuSelectionList = reconParams::gpuSelectionList;
|
||||
transParams::gpuSelectionList = reconParams::gpuSelectionList;
|
||||
}
|
||||
|
||||
void initalizeConfig()
|
||||
void initalizeConfig(const std::string aConfigPath)
|
||||
{
|
||||
//reconParams.measurementInfo.ce
|
||||
reconParams::useCEMeasured = true;
|
||||
@@ -761,6 +760,6 @@ namespace Recon
|
||||
transParams::runTransmissionReco = true;
|
||||
transParams::nonNeg = false;
|
||||
|
||||
initalizeConfigFromFiles();
|
||||
initalizeConfigFromFiles(aConfigPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace Recon
|
||||
EXTERN_C bool nonNeg;
|
||||
}
|
||||
|
||||
void initalizeConfig();
|
||||
void initalizeConfig(const std::string aConfigPath);
|
||||
}
|
||||
|
||||
#endif //RECON_CONFIG_H
|
||||
Reference in New Issue
Block a user