Skip to content
Snippets Groups Projects
Verified Commit f6bb29e8 authored by Mohcine Chraibi's avatar Mohcine Chraibi
Browse files

init method I

parent bfc4ed47
Branches
No related tags found
2 merge requests!15Resolve "Method D | IndividualFD file use wrong PersID",!14Resolve "Method I | new measurement method"
...@@ -162,6 +162,18 @@ void Analysis::InitArgs(ArgumentParser* args) ...@@ -162,6 +162,18 @@ void Analysis::InitArgs(ArgumentParser* args)
_IndividualFDFlags = args->GetIndividualFDFlags(); _IndividualFDFlags = args->GetIndividualFDFlags();
_plotTimeseriesD=args->GetIsPlotTimeSeriesD(); _plotTimeseriesD=args->GetIsPlotTimeSeriesD();
} }
if(args->GetIsMethodI()) {
_DoesUseMethodI = true;
vector<int> Measurement_Area_IDs = args->GetAreaIDforMethodI();
for(unsigned int i=0; i<Measurement_Area_IDs.size(); i++)
{
_areaForMethod_I.push_back(dynamic_cast<MeasurementArea_B*>( args->GetMeasurementArea(Measurement_Area_IDs[i])));
}
_StartFramesMethodI = args->GetStartFramesMethodI();
_StopFramesMethodI = args->GetStopFramesMethodI();
_IndividualFDFlags = args->GetIndividualFDFlags();
_plotTimeseriesI=args->GetIsPlotTimeSeriesI();
}
_deltaF = args->GetDelatT_Vins(); _deltaF = args->GetDelatT_Vins();
_cutByCircle = args->GetIsCutByCircle(); _cutByCircle = args->GetIsCutByCircle();
......
...@@ -483,23 +483,6 @@ bool ArgumentParser::ParseIniFile(const string& inifile) ...@@ -483,23 +483,6 @@ bool ArgumentParser::ParseIniFile(const string& inifile)
{ {
areaB->_zPos=10000001.0; areaB->_zPos=10000001.0;
} }
// get bounding box
// loading geometry is done in analysis.cpp
// so this is done twice, which is not nice.
// For big geometries it could be slow.
Building* building = new Building();
building->LoadGeometry(GetGeometryFilename().string());
building->InitGeometry();
building->AddSurroundingRoom(); // this is a big reactagle
// slightly bigger than the
// geometry boundaries
double geo_minX = building->_xMin;
double geo_minY = building->_yMin;
double geo_maxX = building->_xMax;
double geo_maxY = building->_yMax;
Log->Write("INFO: \tBounding box:\n \t\tminX = %.2f\n \t\tmaxX = %.2f \n \t\tminY = %.2f \n\t\tmaxY = %.2f", geo_minX, geo_maxX, geo_minY, geo_maxY);
std::map<int, polygon_2d> geoPoly; std::map<int, polygon_2d> geoPoly;
polygon_2d poly; polygon_2d poly;
Log->Write("INFO: \tMeasure area id <%d> with type <%s>",areaB->_id, areaB->_type.c_str()); Log->Write("INFO: \tMeasure area id <%d> with type <%s>",areaB->_id, areaB->_type.c_str());
...@@ -517,6 +500,24 @@ bool ArgumentParser::ParseIniFile(const string& inifile) ...@@ -517,6 +500,24 @@ bool ArgumentParser::ParseIniFile(const string& inifile)
if(num_verteces == 0) // big bounding box if(num_verteces == 0) // big bounding box
{ {
Log->Write("\tWARNING: NO measure area points given (%d). default BB!!", num_verteces); Log->Write("\tWARNING: NO measure area points given (%d). default BB!!", num_verteces);
// get bounding box
// loading geometry is done in analysis.cpp
// so this is done twice, which is not nice.
// For big geometries it could be slow.
Building* building = new Building();
building->LoadGeometry(GetGeometryFilename().string());
building->InitGeometry();
building->AddSurroundingRoom(); // this is a big reactagle
// slightly bigger than the
// geometry boundaries
double geo_minX = building->_xMin;
double geo_minY = building->_yMin;
double geo_maxX = building->_xMax;
double geo_maxY = building->_yMax;
Log->Write("INFO: \tBounding box:\n \t\tminX = %.2f\n \t\tmaxX = %.2f \n \t\tminY = %.2f \n\t\tmaxY = %.2f", geo_minX, geo_maxX, geo_minY, geo_maxY);
//1 //1
double box_px = geo_minX*M2CM; double box_px = geo_minX*M2CM;
double box_py = geo_minY*M2CM; double box_py = geo_minY*M2CM;
...@@ -1182,6 +1183,10 @@ bool ArgumentParser::GetIsMethodD() const ...@@ -1182,6 +1183,10 @@ bool ArgumentParser::GetIsMethodD() const
{ {
return _isMethodD; return _isMethodD;
} }
bool ArgumentParser::GetIsMethodI() const
{
return _isMethodI;
}
bool ArgumentParser::GetIsCutByCircle() const bool ArgumentParser::GetIsCutByCircle() const
{ {
...@@ -1227,6 +1232,11 @@ vector<bool> ArgumentParser::GetIsPlotTimeSeriesD() const ...@@ -1227,6 +1232,11 @@ vector<bool> ArgumentParser::GetIsPlotTimeSeriesD() const
return _isPlotTimeSeriesD; return _isPlotTimeSeriesD;
} }
vector<bool> ArgumentParser::GetIsPlotTimeSeriesI() const
{
return _isPlotTimeSeriesI;
}
bool ArgumentParser::GetIsOneDimensional() const bool ArgumentParser::GetIsOneDimensional() const
{ {
return _isOneDimensional; return _isOneDimensional;
...@@ -1278,16 +1288,31 @@ vector<int> ArgumentParser::GetAreaIDforMethodD() const ...@@ -1278,16 +1288,31 @@ vector<int> ArgumentParser::GetAreaIDforMethodD() const
return _areaIDforMethodD; return _areaIDforMethodD;
} }
vector<int> ArgumentParser::GetAreaIDforMethodI() const
{
return _areaIDforMethodI;
}
vector<int> ArgumentParser::GetStartFramesMethodD() const vector<int> ArgumentParser::GetStartFramesMethodD() const
{ {
return _start_frames_MethodD; return _start_frames_MethodD;
} }
vector<int> ArgumentParser::GetStartFramesMethodI() const
{
return _start_frames_MethodI;
}
vector<int> ArgumentParser::GetStopFramesMethodD() const vector<int> ArgumentParser::GetStopFramesMethodD() const
{ {
return _stop_frames_MethodD; return _stop_frames_MethodD;
} }
vector<int> ArgumentParser::GetStopFramesMethodI() const
{
return _stop_frames_MethodI;
}
vector<bool> ArgumentParser::GetIndividualFDFlags() const vector<bool> ArgumentParser::GetIndividualFDFlags() const
{ {
return _individual_FD_flags; return _individual_FD_flags;
......
...@@ -136,10 +136,12 @@ public: ...@@ -136,10 +136,12 @@ public:
bool GetIsMethodB() const; bool GetIsMethodB() const;
bool GetIsMethodC() const; bool GetIsMethodC() const;
bool GetIsMethodD() const; bool GetIsMethodD() const;
bool GetIsMethodI() const;
std::vector<int> GetAreaIDforMethodA() const; std::vector<int> GetAreaIDforMethodA() const;
std::vector<int> GetAreaIDforMethodB() const; std::vector<int> GetAreaIDforMethodB() const;
std::vector<int> GetAreaIDforMethodC() const; std::vector<int> GetAreaIDforMethodC() const;
std::vector<int> GetAreaIDforMethodD() const; std::vector<int> GetAreaIDforMethodD() const;
std::vector<int> GetAreaIDforMethodI() const;
std::vector<int> GetStartFramesMethodD() const; std::vector<int> GetStartFramesMethodD() const;
std::vector<int> GetStopFramesMethodD() const; std::vector<int> GetStopFramesMethodD() const;
std::vector<int> GetStartFramesMethodI() const; std::vector<int> GetStartFramesMethodI() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment