Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced support multi head spect projection data #1579

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

smanwell
Copy link

Changes in this pull request

This changes is related to #1184: SPECT projection DICOM: support multiple heads.
Changes have been introduced in the SPECT_dicom_to_interfile utility to accommodate such datasets.
Relevant details have been described here.

Additional changes include:

  • support for decompressing pixel data, if required (using gdcm API, no new dependencies introduced).
  • removal of unused variable and commented code

Testing performed

The code was executed on several multi-head SPECT projection datasets, including those with and without compressed pixel data.
White-box testing was performed to confirm that exception handling was working as expected in the function: SPECTDICOMData::get_proj_data(const std::string& output_file).

Related issues

This change fixes #1184.

Checklist before requesting a review

  • I have performed a self-review of my code
  • The code builds and runs on my machine (built on Visual Studio 2022, Windows 11 OS)

- Trying to enhance support for the multi-head SPECT systems.
- Modifications to the open_read_file function: - set the number of projections as the number of detector heads times the number of frames per detector.
- Retrieve the axial positions array from every item (i.e detector head) in the Detector Information Sequence.
-- A new function GetDetectorInfo() was created in the fashion of existing methods, e.g. GetRadionuclideInfo(), to handle this.
… the SPECT_dicom_to_interfile utilitly was failing to set the full extent of rotation in the presence of multiple detector heads.

The Scan Arc DICOM Tag (0018,1143), represents the "The effective angular range of the scan data" and is limited to the range of motion of only a single head.
Since STIR determine the azimuthal position of the each projection view using the extent of rotation and the number of views, the total angular range among all detector heads is required.

This commit introduces a change to the SPECT_dicom_to_interfile utilitly such that the extent of rotation written to the output interfile is determined as the product of the number of detectors and the scan arc.

(cherry picked from commit 69178f599610bbb14db5471f636ecf204aa61c54)
(cherry picked from commit 63064ff)
… DICOM data.

- It now detects whether the data are compressed, and if so it rewrites the file using a non-compressed transfer syntax UID and re-reads the file.
- The get_proj_data function is now recursive as it calls itself to re-read the non-compressed DICOM projection data.
…nt smart pointers for calls to gdcm::DataElement::GertValueAsSQ()
… on to the latest STIR master.

- remove duplicate code in SPECTDICOMData::open_dicom_file()
-- Gave precedence to my changes related to setting the num_of_projections variable which accounts for multiple detector heads
-- Gave precedence to my changes related to setting the rotation_radius variable, which accounts for multiple detector heads
- remove unecessary { } blocks in SPECTDICOMData::open_dicom_file()
- moved the DICOM reads associated with isotope name, actual frame duration (string), and energy windows outside of the if (!is_planar) block. Consistent with STIR master.
- modified SPECTDICOMData::open_proj_data() such that it no longer needs to write the uncompressed pixel data to a file. The change of DICOM transfer syntax is managed in memory. As a result this function no longer calls itself recursively when decompression is required.
- removed the optional input argument from the SPECTDICOMData::open_proj_data()  method, no longer needed due to previous change.
- refactorerd the code block in SPECTDICOMData::open_proj_data()  that was responsible for populate the float vector - pixel_data_as_float, into a separate function as it is now invoked in separate if-blocks depending on whether decompression was required.
- included initialization values for several more member variavles of the SPECTDICOMData class.
- removed the unused member variable SPECTDICOMData::num_dimensions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SPECT projection DICOM: support multiple heads
1 participant