![]() |
ImFusion SDK 4.3
|
Namespace containing helper functions to reconstruct potential volumes from a set of individual DICOM frames. More...
Namespace containing helper functions to reconstruct potential volumes from a set of individual DICOM frames.
Functions | |
| std::vector< FrameDescriptorSet > | groupVolumes (const std::vector< FrameDescriptor > &frames, const ErrorRecorder *recorder) |
| Tries to group individual frames into volumes depending on their position and orientation An ErrorRecorder can be optionally passed to retrieve potential errors. | |
| std::vector< FrameDescriptorSet > | group4DVolumes (const std::vector< FrameDescriptor > &frames) |
| Tries to group the frames as a list of 3D volumes (e.g. | |
| std::vector< std::vector< FrameDescriptor > > | partitionFramesByTag (std::function< const Dicom::Element< int > &(Dicom::IOD *)> getElement, const std::vector< FrameDescriptor > &sortedFrames) |
| Partitions the frames into subgroups according to the given element. | |
| void | sortFramesByPosition (std::vector< FrameDescriptor > &frames) |
| Sorts the frames according to their position relative to normal of the first frame. | |
| int | maxTransformationDigits (const std::vector< FrameDescriptor > &frames) |
| Returns the maximum number of decimal digits that was used to store the transformation in the DICOM. | |
| int | maxTransformationDigits (const Element< std::vector< std::string > > &imagePositionPatient) |
| double | sliceVarianceThreshold (const std::vector< FrameDescriptor > &frames) |
| Returns the maximum allowed variance between slice spacings for the given set of frames. | |
| double | maxAllowedGantryTilt () |
| Returns the maximum allowed gantry tilt in degrees for loading a 3D volume (currently set to 0.1 plus epsilon) | |
| double | computeSliceSpacing (const FrameDescriptorSet &frames) |
| Computes the average slice spacing of all frames. | |
| std::vector< FrameDescriptorSet > group4DVolumes | ( | const std::vector< FrameDescriptor > & | frames | ) |
Tries to group the frames as a list of 3D volumes (e.g.
perfusion acquisitions). All volumes are expected to have the same size and the same matrix. Returns an empty list if the frames cannot be grouped in this way. This is also called internally by groupVolumes.
| std::vector< std::vector< FrameDescriptor > > partitionFramesByTag | ( | std::function< const Dicom::Element< int > &(Dicom::IOD *)> | getElement, |
| const std::vector< FrameDescriptor > & | sortedFrames ) |
Partitions the frames into subgroups according to the given element.
Some DICOMs have an additional sub-level beneath series which depend on certain tags. E.g. some MR series contain two acquisitions at different times which can be split according to AcquisitionNumber. This method will parition the given list of frames into sub-groups of frames that share the same element value. E.g. consider the following list of frames with their AcquisitionNumber:
It would be split into two list: List 1:
The initial sorting of the frames is preserved. The frames are only partitioned if all frames have the requested element and the element is considered valid. Otherwise this function returns the unmodified original list of frames as only item.
| void sortFramesByPosition | ( | std::vector< FrameDescriptor > & | frames | ) |
Sorts the frames according to their position relative to normal of the first frame.
The sorting is stable, i.e. frames with the same position will retain their sorting.
| int maxTransformationDigits | ( | const std::vector< FrameDescriptor > & | frames | ) |
Returns the maximum number of decimal digits that was used to store the transformation in the DICOM.
Returns 0 if the number could not be determined.
| double computeSliceSpacing | ( | const FrameDescriptorSet & | frames | ) |
Computes the average slice spacing of all frames.
Only use with parallel frames! If the frames contain SpacingBetweenSlices and the value is close enough to the computed slice spacing, it will be returned instead.