Revision as of 14:10, 10 August 2015 by Rjpatruno (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In order to allow for more flexibility, PBRT was modified to allow for a multiplication of the raw spectral data by a given matrix which is n x nSpectralSamples in dimension. This matrix can be specified via a separate file, which is named in the PBRT file.

TODO: describe this new file format.

[edit] film/image.cpp and film/image.h

  • Added conversionMatrix private data member, along with nCMRows and nCMCols, which specifies the size of the conversion Matrix
  • Initialize nCMRows and nCMCols to nSpectralSamples.
  • Added void ImageFilm::ParseConversionMatrix(string filename) to take care of conversion matrix parsing from a file
  • Changed ImageFilm *CreateImageFilm(const ParamSet &params, Filter *filter) to allow for detection of conversion matrix filename, as well as parsing of this text file.
   //Andy changed 
   ImageFilm * newFilm = new ImageFilm(xres, yres, filter, crop, filename, openwin);
   string conversionMatrixFilename = params.FindOneString("conversionmatrixfile", "");
   std::cout<< "\nconversionMatrixFilename: " << conversionMatrixFilename << "\n\n";
   return newFilm;

[edit] pbrtparse.yy/pbrtparse.cpp

  • .yy file will generate the .cpp file using some parsing package that I am not that familiar with.
  • parsing information - interesting to look at and perhaps could help us for future I/O modifications
Personal tools