Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/src/lib/common/world.cxx
ViewVC logotype

Diff of /branches/vis15/src/lib/common/world.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4449, Mon Aug 22 18:33:28 2016 UTC revision 4450, Mon Aug 22 18:33:57 2016 UTC
# Line 48  Line 48 
48    
49      //! Check that a nrrd has the expected structure for loading into a dynamic sequence      //! Check that a nrrd has the expected structure for loading into a dynamic sequence
50      //! \param nin the nrrd to check      //! \param nin the nrrd to check
51      //! \param nDims the number of dimensions in the sequence elements      //! \param nDims the number of dimensions in the sequence elements; for a sequence of
52        //!              scalars nDims will be 0
53      //! \param dims the array of sequence element dimensions      //! \param dims the array of sequence element dimensions
54      //! \return the number of values per element, or zero on error      //! \return the number of values per element, or zero on error
55      uint32_t world_base::check_nrrd (const Nrrd *nin, uint32_t nDims, const uint32_t *dims)      uint32_t world_base::check_nrrd (const Nrrd *nin, uint32_t nDims, const uint32_t *dims)
# Line 60  Line 61 
61          }          }
62    
63        // check the structure of the nrrd file        // check the structure of the nrrd file
64          if (nin->spaceDim != 0) {          if ((nin->spaceDim != 0) && (nin->spaceDim != 1)) {
65              this->error ("unexpected number of axes in nrrd; expected 0, found %d\n",              this->error ("unexpected number of axes in nrrd; found %d\n",
66                  nin->spaceDim);                  nin->spaceDim);
67              return 0;              return 0;
68          }          }
69          if (nin->dim - 1 != nDims) {          if (nin->dim - 1 != nDims) {
70              this->error ("unexpected nrrd dimension; expected %d, found %d\n",              this->error ("unexpected nrrd dimension; expected %d, found %d\n", nDims, nin->dim-1);
                 nDims, nin->dim-1);  
71              return 0;              return 0;
72          }          }
73          for (unsigned int i = 0;  i < nDims;  i++) {          for (unsigned int i = 0;  i < nDims;  i++) {

Legend:
Removed from v.4449  
changed lines
  Added in v.4450

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0