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

Method IsValidRepresentation

Utilities/DICOMParser/DICOMParser.cxx:200–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200bool DICOMParser::IsValidRepresentation(doublebyte rep, quadbyte& len, VRTypes& mytype)
201{
202 switch (rep)
203 {
204 case DICOMParser::VR_AW:
205 case DICOMParser::VR_AE:
206 case DICOMParser::VR_AS:
207 case DICOMParser::VR_CS:
208 case DICOMParser::VR_UI:
209 case DICOMParser::VR_DA:
210 case DICOMParser::VR_DS:
211 case DICOMParser::VR_DT:
212 case DICOMParser::VR_IS:
213 case DICOMParser::VR_LO:
214 case DICOMParser::VR_LT:
215 case DICOMParser::VR_PN:
216 case DICOMParser::VR_ST:
217 case DICOMParser::VR_TM:
218 case DICOMParser::VR_SH:
219 case DICOMParser::VR_FL:
220 case DICOMParser::VR_SL:
221 case DICOMParser::VR_AT:
222 case DICOMParser::VR_UL:
223 case DICOMParser::VR_US:
224 case DICOMParser::VR_SS:
225 case DICOMParser::VR_FD:
226 len = DataFile->ReadDoubleByte();
227 mytype = VRTypes(rep);
228 return true;
229
230 case DICOMParser::VR_OB: // OB - LE
231 case DICOMParser::VR_OW:
232 case DICOMParser::VR_UN:
233 case DICOMParser::VR_UT:
234 case DICOMParser::VR_SQ:
235 DataFile->ReadDoubleByte();
236 len = DataFile->ReadQuadByte();
237 mytype = VRTypes(rep);
238 return true;
239
240 default:
241 //
242 //
243 // Need to comment out in new paradigm.
244 //
245 DataFile->Skip(-2);
246 len = DataFile->ReadQuadByte();
247 mytype = DICOMParser::VR_UNKNOWN;
248 return false;
249 }
250}
251
252void DICOMParser::ReadNextRecord(
253 doublebyte& group, doublebyte& element, DICOMParser::VRTypes& mytype)

Callers 2

ReadNextRecordMethod · 0.95
ParseExplicitRecordMethod · 0.95

Calls 4

VRTypesEnum · 0.85
ReadDoubleByteMethod · 0.80
ReadQuadByteMethod · 0.80
SkipMethod · 0.45

Tested by

no test coverage detected