comparison Core/ImageFormats/ImageAccessor.cpp @ 983:80d4f1618b33 plugins

Sample plugin to replace DCMTK by GDCM when decoding images
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 01 Jul 2014 12:01:58 +0200
parents 87791ebc1f50
children 6e7e5ed91c2d
comparison
equal deleted inserted replaced
982:5983e59ac670 983:80d4f1618b33
166 width_ = width; 166 width_ = width;
167 height_ = height; 167 height_ = height;
168 pitch_ = pitch; 168 pitch_ = pitch;
169 buffer_ = const_cast<void*>(buffer); 169 buffer_ = const_cast<void*>(buffer);
170 170
171 assert(GetBytesPerPixel(format_) * width_ <= pitch_); 171 assert(GetBytesPerPixel() * width_ <= pitch_);
172 } 172 }
173 173
174 174
175 void ImageAccessor::AssignWritable(PixelFormat format, 175 void ImageAccessor::AssignWritable(PixelFormat format,
176 unsigned int width, 176 unsigned int width,
183 width_ = width; 183 width_ = width;
184 height_ = height; 184 height_ = height;
185 pitch_ = pitch; 185 pitch_ = pitch;
186 buffer_ = buffer; 186 buffer_ = buffer;
187 187
188 assert(GetBytesPerPixel(format_) * width_ <= pitch_); 188 assert(GetBytesPerPixel() * width_ <= pitch_);
189 } 189 }
190 190
191 191
192 void ImageAccessor::ToMatlabString(std::string& target) const 192 void ImageAccessor::ToMatlabString(std::string& target) const
193 { 193 {