@@ -90,7 +90,6 @@ MatrixHandle SCIRun::IgbFileMatrix_reader(LoggerHandle pr, const char *filename)
9090 sz=line.size ();
9191
9292
93-
9493 for (int p=0 ;p<sz;p++)
9594 {
9695
@@ -99,16 +98,12 @@ MatrixHandle SCIRun::IgbFileMatrix_reader(LoggerHandle pr, const char *filename)
9998 if (boost::iequals (strs[p], " x" ))
10099 {
101100 x_size=atoi (strs[p+1 ].c_str ());
102-
103-
104101 count += 1 ;
105102
106103 }
107104 if (boost::iequals (strs[p], " t" ))
108105 {
109106 t_size=atoi (strs[p+1 ].c_str ());
110-
111-
112107 count +=1 ;
113108
114109 }
@@ -139,13 +134,13 @@ MatrixHandle SCIRun::IgbFileMatrix_reader(LoggerHandle pr, const char *filename)
139134 is.seekg (0 , ios::end);
140135 length = is.tellg ();
141136 is.seekg (1024 , ios::beg);
137+ t_size=t_size;
138+ length=length-1024 ;
142139
143140 vector<float > vec;
144- vec.resize (x_size*t_size);
141+ vec.resize (length);
142+ is.read ((char *)&vec[0 ],length);
145143
146-
147-
148- is.read ((char *)&vec[0 ],x_size * t_size * sizeof (float ));
149144 if (!is)
150145 {
151146 numbyts=is.gcount ();
@@ -155,11 +150,9 @@ MatrixHandle SCIRun::IgbFileMatrix_reader(LoggerHandle pr, const char *filename)
155150 is.close ();
156151
157152
158- // auto result(boost::make_shared<DenseMatrix>(x_size,t_size));
153+ auto result (boost::make_shared<DenseMatrix>(x_size,t_size));
159154
160- DenseMatrixHandle result;
161-
162- result.reset (new DenseMatrix (x_size,t_size));
155+
163156
164157 for (size_t p=0 ;p<t_size;p++ )
165158 {
0 commit comments