[Insight-users] problem reconstructing an MRI image in ITK

robert behan robehan at gmail.com
Thu Nov 18 11:20:43 EST 2010


Hi Don,

After I apply the iFFT I actually recast the image to a signed short
using the resample filter, rescale the intensity range and write it to
a Dicom file. I suspected this may have been a problem but didn't
properly look into it. I take it I should leave it as a float after
the FFT has been applied and output that to a file?

I gather if the FFT gives an image with pixel values in a very narrow
intensity band then converting from a float to a short will destroy
the info in the image? Maybe that's why I have just been getting
images with zero ( or whatever lower intensity threshold I set )?

Rob

On 18 November 2010 15:28, Don Bigler <dcb210 at psu.edu> wrote:
> Rob,
>        See my comments below:
>
> On Nov 18, 2010, at 9:42 AM, robert behan wrote:
>
>> HI Don,
>>
>> Thanks again for the info.
>>
>> I gather I should use the complex to complex  filter because it will
>> allow me to reconstruct a real, imaginary or magnitude image whereas
>> the complex conjugate to real just reconstructs a real valued image?
> Correct.
>>
>> I should  actually have clarified that when I pass my ITK k-space
>> object to the FFT filter the result just gives me an image of zeros in
>> effect. The k-space object is properly initialised as I can output an
>> image of k-space from it so I don't see any reason why the FFT doesn't
>> give an output other than zeros.
> Odd!  What output data type are you using?  I would expect this only if your output data type is not float.
>>
>> Seems that this may be a linking error. The code compiles fine but the
>> FFT doesn't seem to do anything and doesn't throw any kind of errors
>> or exceptions.
> If there is a linking error you will detect it during the compilation.
>>
>> Any suggestions as to what might be causing this would be much
>> appreciated. I am at a loss to explain it. I promise not to continue
>> bombarding you with questions!! and your help has been appreciated.
>>
>> Cheers,
>>
>> Rob
>>
>> On 16 November 2010 17:24, Don Bigler <dcb210 at psu.edu> wrote:
>>> Rob,
>>>        Actually, you should use FFTComplexConjugateToComplexConjugateImageFilter instead of FFTComplexConjugateToRealImageFilter.  Also you'll likely need FFTShiftImageFilter as well to map the image from the four corners to the center again.  Something else to be aware of, if your sequence is a fast turbo echo or EPI, multiple lines of k-space may be acquired in a single excitation.  Also, often times the order of acquisition in the phase encoding direction is not sequential, so reordering is necessary.  I hope this helps!  Good luck!
>>> Don
>>>
>>> On Nov 15, 2010, at 1:13 PM, robert behan wrote:
>>>
>>>> Hi Don,
>>>>
>>>> Many thanks for your swift reply. I will have to double check but I
>>>> think the data I am trying to reconstruct was acquired using a simple
>>>> spin echo sequence ( or a fast gradient echo sequence ) with an 8
>>>> channel brain coil. I am trying to get ITK to produce an image for one
>>>> slice and one coil and then I will subsequently develop the code to do
>>>> a sum of square reconstruction.
>>>>
>>>> It is confusing because I can populate an ITK image using the k-space
>>>> data and produce an image using the absolute values of the k-space
>>>> data. I write the image to a Dicom file and export it into Matlab. I
>>>> can compare the image against an image of k-space produced from the
>>>> same GE P-file data but using a Matlab MRI Recon script instead.
>>>>
>>>> I then produce an ITK image with the same complex k-space data but
>>>> defined as a complex image type and apply the fft vnl
>>>> complex-conjugate to real filter on it and the result is just
>>>> garbage!!
>>>>
>>>> I think you may be right it appears to be a problem with how I have
>>>> ordered the data.
>>>>
>>>> There is also a line of baseline values in the k-space data which may
>>>> be causing a problem.
>>>>
>>>> I have a script in Matlab which can reconstruct MRI images from raw GE
>>>> Pfiles and I have noticed a number of things. If the baseline isn't
>>>> removed before the ifft is applied then the result is garbage
>>>> (basically just an image of gray lines of varying intensity). The same
>>>> applied if you try to apply the ifft to the absolute value of the
>>>> complex k-space data rather than the complex data itself or if the
>>>> complex k-space data is reshaped into a matrix of the wrong size.
>>>>
>>>> I am not exactly sure what the problem is but I do think it is
>>>> something along these lines. Any additional insights or suggestions
>>>> are more than welcome,
>>>>
>>>> Cheers,
>>>>
>>>> Rob
>>>>
>>>> On 15 November 2010 17:31, Don Bigler <dcb210 at psu.edu> wrote:
>>>>> Hi Rob,
>>>>>        Reconstructing on MRI image from k-space can be very tricky depending on the pulse sequence used and the method by which the vender stores k-space data to disk.  What pulse sequence did you use to acquire the data?  It sounds to me like you need to reorder the k-space data before performing the FFT.  Did you view the k-space data first before reconstruction?  That can help point you in the right direction.
>>>>> Regards,
>>>>> Don
>>>>>
>>>>> Don Bigler, Ph.D.
>>>>> Postdoctoral Scholar
>>>>> Center for Emerging Neurotechnology and Imaging
>>>>> Penn State University College of Medicine
>>>>> 500 University Dr.
>>>>> Psychiatry, C5518
>>>>> Hershey, PA 17033
>>>>> Phone: (717) 531-7963
>>>>> Fax: (717) 531-6491
>>>>>
>>>>> Hershey Confidentiality Statement:
>>>>>
>>>>> This message (including any attachments) contains information intended for a specific individual(s) and purpose that may be privileged, confidential or otherwise protected from disclosure pursuant to applicable law.  Any inappropriate use, distribution or copying of the message is strictly prohibited and may subject you to criminal or civil penalty.  If you have received this transmission in error, please reply to the sender indicating this error and delete the transmission from your system immediately.
>>>>>
>>>>>
>>>>
>>>
>>> Don Bigler, Ph.D.
>>> Postdoctoral Scholar
>>> Center for Emerging Neurotechnology and Imaging
>>> Penn State University College of Medicine
>>> 500 University Dr.
>>> Psychiatry, C5518
>>> Hershey, PA 17033
>>> Phone: (717) 531-7963
>>> Fax: (717) 531-6491
>>>
>>> Hershey Confidentiality Statement:
>>>
>>> This message (including any attachments) contains information intended for a specific individual(s) and purpose that may be privileged, confidential or otherwise protected from disclosure pursuant to applicable law.  Any inappropriate use, distribution or copying of the message is strictly prohibited and may subject you to criminal or civil penalty.  If you have received this transmission in error, please reply to the sender indicating this error and delete the transmission from your system immediately.
>>>
>>>
>>
>
> Don Bigler, Ph.D.
> Postdoctoral Scholar
> Center for Emerging Neurotechnology and Imaging
> Penn State University College of Medicine
> 500 University Dr.
> Psychiatry, C5518
> Hershey, PA 17033
> Phone: (717) 531-7963
> Fax: (717) 531-6491
>
> Hershey Confidentiality Statement:
>
> This message (including any attachments) contains information intended for a specific individual(s) and purpose that may be privileged, confidential or otherwise protected from disclosure pursuant to applicable law.  Any inappropriate use, distribution or copying of the message is strictly prohibited and may subject you to criminal or civil penalty.  If you have received this transmission in error, please reply to the sender indicating this error and delete the transmission from your system immediately.
>
>


More information about the Insight-users mailing list