Commit 450a9db4 authored by Laurent Belcour's avatar Laurent Belcour

[Fix] Short fix to enable loading .bin UTIA samples. EXR files still not

possible due to the interface introduced by Ludo. We will have to
rollback to previous interface, or provide additional informations into
the arguments object passed.
parent 3c11d5a4
...@@ -84,10 +84,12 @@ public: ...@@ -84,10 +84,12 @@ public:
this->nPerPlane = N_PER_PLANE; this->nPerPlane = N_PER_PLANE;
this->Bd = new double[planes*nti*npi*ntv*npv]; this->Bd = new double[planes*nti*npi*ntv*npv];
_min = vec(4);
_min[0] = 0.0; _min[0] = 0.0;
_min[1] = 0.0; _min[1] = 0.0;
_min[2] = 0.0; _min[2] = 0.0;
_min[3] = 0.0; _min[3] = 0.0;
_max = vec(4);
_max[0] = 0.5*M_PI; _max[0] = 0.5*M_PI;
_max[1] = 2.0*M_PI; _max[1] = 2.0*M_PI;
_max[2] = 0.5*M_PI; _max[2] = 0.5*M_PI;
...@@ -318,19 +320,14 @@ ALTA_DLL_EXPORT data* load_data(std::istream& input, const arguments& args) ...@@ -318,19 +320,14 @@ ALTA_DLL_EXPORT data* load_data(std::istream& input, const arguments& args)
} else } else
#endif #endif
UTIA* result = new UTIA(alta::parameters(0, 0, UTIA* result = new UTIA(alta::parameters(4, 3,
params::UNKNOWN_INPUT, params::SPHERICAL_TL_PL_TV_PV,
params::UNKNOWN_OUTPUT)); params::RGB_COLOR));
int count = 0; int count = result->planes * result->nti * result->npi
for(int isp=0; isp < result->planes; isp++) { * result->ntv * result->npv;
for(int ni=0; ni< result->nti * result->npi; ni++) input.read((char*)result->Bd, count*sizeof(double));
for(int nv=0; nv < result->ntv * result->npv; nv++) { std::cout << "<<INFO>> Successfully read BRDF" << std::endl;
input >> result->Bd[count++];
}
}
std::cout << "<<INFO>> Successfully read BRDF" << std::endl;
return result; return result;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment