MCPcopy Create free account
hub / github.com/MITK/MITK / LiftAndAttach

Function LiftAndAttach

Modules/DICOM/src/mitkBaseDICOMReaderService.cpp:184–201  ·  view source on GitHub ↗

Convenience: per-frame lift + property attach in one step. Returns true when the lift succeeded and the property was attached.

Source from the content-addressed store, hash-verified

182 // Convenience: per-frame lift + property attach in one step. Returns
183 // true when the lift succeeded and the property was attached.
184 bool LiftAndAttach(const mitk::DICOMImageBlockDescriptor& desc,
185 mitk::BaseData* data,
186 Uint16 group,
187 const char* creator,
188 Uint16 elementOffset,
189 const char* propName)
190 {
191 mitk::DICOMCachedValueLookupTable table;
192 if (!LiftPrivateTagPerFrame(desc, group, creator, elementOffset, table))
193 {
194 return false;
195 }
196 auto prop = mitk::GetDICOMPropertyForDICOMValuesFunctor(table);
197 if (prop.IsNull()) return false;
198
199 data->SetProperty(propName, prop);
200 return true;
201 }
202
203 // Hook called per loaded image. No-op unless modality is "PT". Each
204 // vendor branch is independent; they all share the same lift

Callers 1

LiftPETVendorPrivateTagsFunction · 0.85

Calls 3

LiftPrivateTagPerFrameFunction · 0.85
IsNullMethod · 0.45
SetPropertyMethod · 0.45

Tested by

no test coverage detected