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

SIRF Reading & Writing and gadgetron_ismrmrd_client collide #1156

Closed
johannesmayer opened this issue Dec 8, 2022 · 5 comments
Closed

SIRF Reading & Writing and gadgetron_ismrmrd_client collide #1156

johannesmayer opened this issue Dec 8, 2022 · 5 comments

Comments

@johannesmayer
Copy link
Member

I encountered a problem executing the following steps:

  • reading an ISMRMRD raw file (from patient data) with SIRF and then writing it back to file.
  • calling the gadgetron_ismrmrd_client on that file to reconstruct
  • (I only checked the output for a DICOM writer in the XML configuration file for the gadget chain)

all reconstructions yield zeros.

I have found the solution:

to false for all acquisitions will solve this problem.

@evgueni-ovtchinnikov
Copy link
Contributor

false for all acquisitions will solve this problem

@johannesmayer ... and will create problems elsewhere (as_array, fill, norm, dot, ...)

Better try your steps with these lines in MRAcquisitionData::read commented out:

			if( TO_BE_IGNORED(acq) )
				continue;
			else

@johannesmayer
Copy link
Member Author

johannesmayer commented Dec 8, 2022

Thanks, good point @evgueni-ovtchinnikov.
For my tests I did as you suggested.

I checked again and I ran the following reconstruction (using the "old" Gadgetron commit that's used in the current Superbuild)

preprocessed_data = preprocess_acquisition_data(acq_data)

    # Perform reconstruction of the preprocessed data.
    # 1. set the reconstruction to be for Cartesian GRAPPA data.
    recon_gadgets = ['AcquisitionAccumulateTriggerGadget',
            'BucketToBufferGadget', 
            'GenericReconCartesianReferencePrepGadget', 
            'GRAPPA:GenericReconCartesianGrappaGadget', 
            'GenericReconFieldOfViewAdjustmentGadget', 
            'GenericReconImageArrayScalingGadget', 
            'ImageArraySplitGadget',
            'PhysioInterpolationGadget(phases=30, mode=0, first_beat_on_trigger=true, interp_method=BSpline)']

    recon = Reconstructor(recon_gadgets)
    recon.set_gadget_property('GRAPPA', 'send_out_gfactor', True)

    # 2. set the reconstruction input to be the data we just preprocessed.
    recon.set_input(preprocessed_data)

    # 3. run (i.e. 'process') the reconstruction.
    print('---\n reconstructing...\n')
    recon.process()

    # retrieve reconstruced image and G-factor data
    image_data = recon.get_output('Image PhysioInterp')

    image_data = image_data.abs()
    image_data.write("output.dcm")

Left: reconstruction including the TO_BE_IGNORED in the read function, right without it. So it seems not to be just about the client.

tmprecon_sirf_with_ignore tmprecon_sirf_without_ignore

@evgueni-ovtchinnikov
Copy link
Contributor

@johannesmayer so I understand removing those 3 lines fixed the issue? If so, could you please create a PR, and if GHA builds succeed merge it - or I could do it if you are busy.

@evgueni-ovtchinnikov
Copy link
Contributor

see PR #1161

@evgueni-ovtchinnikov
Copy link
Contributor

taken care of by #1174, closing...

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 a pull request may close this issue.

2 participants