MCPcopy Create free account
hub / github.com/Kitware/VTK / ReadNBytes

Method ReadNBytes

Utilities/DICOMParser/DICOMFile.cxx:206–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206quadbyte DICOMFile::ReadNBytes(int len)
207{
208 quadbyte ret = -1;
209 switch (len)
210 {
211 case 1:
212 char ch;
213 this->Read(&ch, 1); // from Image
214 ret = static_cast<quadbyte>(ch);
215 break;
216 case 2:
217 ret = static_cast<quadbyte>(ReadDoubleByte());
218 break;
219 case 4:
220 ret = ReadQuadByte();
221 break;
222 default:
223 std::cerr << "Unable to read " << len << " bytes" << std::endl;
224 break;
225 }
226 return (ret);
227}
228
229float DICOMFile::ReadAsciiFloat(int len)
230{

Callers

nothing calls this directly

Calls 1

ReadMethod · 0.95

Tested by

no test coverage detected