merge Edgar's changes

metadata
Wenzel Jakob 2014-02-14 14:11:11 +01:00
commit 5a50f8d112
3 changed files with 6 additions and 3 deletions

View File

@ -7,7 +7,7 @@ macro(add_film)
add_mts_plugin(${ARGN} TYPE film)
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(hdrfilm hdrfilm.cpp annotations.h banner.h MTS_HW)

View File

@ -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);
assert(header[header.size()-1] == '\n');
int loc1, loc2;
size_t loc1, loc2;
//fortran order
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(")");
std::string str_shape = header.substr(loc1+1,loc2-loc1-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];
for(unsigned int i = 0;i < ndims;i++) {
loc1 = str_shape.find(",");

View File

@ -96,6 +96,9 @@ Spectrum Spectrum::rgbIllum2SpecBlue;
Float Spectrum::m_wavelengths[SPECTRUM_SAMPLES + 1];
#endif
/// Pre-integrated D65 illuminant
Spectrum Spectrum::CIE_D65;
void Spectrum::staticInitialization() {
#if SPECTRUM_SAMPLES != 3
std::ostringstream oss;