You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will create a PR that add the following function acting on RawAcquisitionData object :
Subset of profiles
A function that return subset of profile according to flag. For example if I want to create a raw object only with the [ACQ_IS_PARALLEL_CALIBRATION,ACQ_IS_PARALLEL_CALIBRATION_AND_IMAGING] : raw_subset(raw,ACQ_IS_PARALLEL_CALIBRATION+ACQ_IS_PARALLEL_CALIBRATION_AND_IMAGING) or raw_subset(raw,["ACQ_IS_PARALLEL_CALIBRATION","ACQ_IS_PARALLEL_CALIBRATION_AND_IMAGING"])
Remove readout oversampling
function remove_oversampling!(raw)
ratioFOV = raw.params["encodedFOV"][1] / raw.params["reconFOV"][1]
# Assuming all profiles have the same size
sdim = size(raw.profiles[1].data)
sdim_out = Int(sdim[1] / ratioFOV)
start = Int((sdim[1] - sdim_out) ÷ 2)
Threads.@threads for profile in raw.profiles
tmp = profile.data
tmp = ifftshift(ifft(ifftshift(tmp, 1), 1), 1)
@views tmp = tmp[start:start+sdim_out, :]
tmp = fftshift(fft(fftshift(tmp, 1), 1), 1)
profile.data = tmp
profile.head.number_of_samples = sdim_out
profile.head.center_sample = UInt16(profile.head.center_sample / ratioFOV)
profile.head.discard_pre = UInt16(profile.head.discard_pre / ratioFOV)
profile.head.discard_post = UInt16(profile.head.discard_post / ratioFOV)
end
raw.params["encodedSize"][1] = raw.params["encodedSize"][1] ÷ ratioFOV
return raw
end
Coil compression on RawAcquisitionData
SVD calculation will be done on calibration profiles ?
Any other idea about function that acts on RawAcquisitionData ?
The text was updated successfully, but these errors were encountered:
Hmm,
I am now able to filter the acquisition by FLAGS but I think we also need a function to create an "IMAGING" datasets. Any idea how to do that ?
Something like :
functionremove_raw_by_flags(rawData::RawAcquisitionData, flags= [ACQ_IS_NOISE_MEASUREMENT,
ACQ_IS_PARALLEL_CALIBRATION,
ACQ_IS_NAVIGATION_DATA,
ACQ_IS_PHASECORR_DATA],
ACQ_IS_DUMMYSCAN_DATA,
ACQ_IS_PHASE_STABILIZATION_REFERENCE,
ACQ_IS_PHASE_STABILIZATION)
# return profiles that are not flagsend
I am not sure about the default flags we should remove
ACQ_IS_NOISE_MEASUREMENT,
ACQ_IS_PARALLEL_CALIBRATION,
ACQ_IS_PARALLEL_CALIBRATION_AND_IMAGING, #we should keep it
ACQ_IS_REVERSE, # we should keep it
ACQ_IS_NAVIGATION_DATA,
ACQ_IS_PHASECORR_DATA,
ACQ_IS_HPFEEDBACK_DATA,
ACQ_IS_DUMMYSCAN_DATA,
ACQ_IS_RTFEEDBACK_DATA,
ACQ_IS_SURFACECOILCORRECTIONSCAN_DATA, #we should keep it
ACQ_IS_PHASE_STABILIZATION_REFERENCE,
ACQ_IS_PHASE_STABILIZATION,
I will create a PR that add the following function acting on RawAcquisitionData object :
Subset of profiles
A function that return subset of profile according to flag. For example if I want to create a raw object only with the [ACQ_IS_PARALLEL_CALIBRATION,ACQ_IS_PARALLEL_CALIBRATION_AND_IMAGING] :
raw_subset(raw,ACQ_IS_PARALLEL_CALIBRATION+ACQ_IS_PARALLEL_CALIBRATION_AND_IMAGING)
or raw_subset(raw,["ACQ_IS_PARALLEL_CALIBRATION","ACQ_IS_PARALLEL_CALIBRATION_AND_IMAGING"])Remove readout oversampling
function remove_oversampling!(raw)
ratioFOV = raw.params["encodedFOV"][1] / raw.params["reconFOV"][1]
end
Coil compression on RawAcquisitionData
SVD calculation will be done on calibration profiles ?
Any other idea about function that acts on RawAcquisitionData ?
The text was updated successfully, but these errors were encountered: