Added missing files in CMakeLists.txt for the mfilm plugin and fixed warnings.
parent
401025b094
commit
38b8fa7f37
|
@ -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(",");
|
||||||
|
|
Loading…
Reference in New Issue