Convenience: per-frame lift + property attach in one step. Returns true when the lift succeeded and the property was attached.
| 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 |
no test coverage detected