merge Edgar's changes
commit
5a50f8d112
|
@ -7,7 +7,7 @@ macro(add_film)
|
||||||
add_mts_plugin(${ARGN} TYPE film)
|
add_mts_plugin(${ARGN} TYPE film)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
add_film(mfilm mfilm.cpp)
|
add_film(mfilm mfilm.cpp cnpy.h cnpy.cpp)
|
||||||
add_film(ldrfilm ldrfilm.cpp annotations.h banner.h MTS_HW)
|
add_film(ldrfilm ldrfilm.cpp annotations.h banner.h MTS_HW)
|
||||||
add_film(hdrfilm hdrfilm.cpp annotations.h banner.h MTS_HW)
|
add_film(hdrfilm hdrfilm.cpp annotations.h banner.h MTS_HW)
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ void cnpy::parse_npy_header(FILE* fp, unsigned int& word_size, unsigned int*& sh
|
||||||
std::string header = fgets(buffer,256,fp);
|
std::string header = fgets(buffer,256,fp);
|
||||||
assert(header[header.size()-1] == '\n');
|
assert(header[header.size()-1] == '\n');
|
||||||
|
|
||||||
int loc1, loc2;
|
size_t loc1, loc2;
|
||||||
|
|
||||||
//fortran order
|
//fortran order
|
||||||
loc1 = header.find("fortran_order")+16;
|
loc1 = header.find("fortran_order")+16;
|
||||||
|
@ -79,7 +79,7 @@ void cnpy::parse_npy_header(FILE* fp, unsigned int& word_size, unsigned int*& sh
|
||||||
loc2 = header.find(")");
|
loc2 = header.find(")");
|
||||||
std::string str_shape = header.substr(loc1+1,loc2-loc1-1);
|
std::string str_shape = header.substr(loc1+1,loc2-loc1-1);
|
||||||
if(str_shape[str_shape.size()-1] == ',') ndims = 1;
|
if(str_shape[str_shape.size()-1] == ',') ndims = 1;
|
||||||
else ndims = std::count(str_shape.begin(),str_shape.end(),',')+1;
|
else ndims = static_cast<unsigned int>(std::count(str_shape.begin(),str_shape.end(),',')+1);
|
||||||
shape = new unsigned int[ndims];
|
shape = new unsigned int[ndims];
|
||||||
for(unsigned int i = 0;i < ndims;i++) {
|
for(unsigned int i = 0;i < ndims;i++) {
|
||||||
loc1 = str_shape.find(",");
|
loc1 = str_shape.find(",");
|
||||||
|
|
|
@ -96,6 +96,9 @@ Spectrum Spectrum::rgbIllum2SpecBlue;
|
||||||
Float Spectrum::m_wavelengths[SPECTRUM_SAMPLES + 1];
|
Float Spectrum::m_wavelengths[SPECTRUM_SAMPLES + 1];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/// Pre-integrated D65 illuminant
|
||||||
|
Spectrum Spectrum::CIE_D65;
|
||||||
|
|
||||||
void Spectrum::staticInitialization() {
|
void Spectrum::staticInitialization() {
|
||||||
#if SPECTRUM_SAMPLES != 3
|
#if SPECTRUM_SAMPLES != 3
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
|
|
Loading…
Reference in New Issue