[Rtk-users] 4DROOSTERReconstruction example

Cyril Mory cyril.mory at uclouvain.be
Tue Oct 6 08:08:35 EDT 2015


Hi Joel,

I have just pushed a fix for this issue: in the 4DROOSTER filter, I have 
added a resample filter between the ROI input and the 
AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it 
fixes the issue on your side.

Thanks for pointing this out,
Cyril

On 10/02/2015 06:31 PM, Joel Beaudry wrote:
> Hi Simon and Cyril,
>
> @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) 
> and then use itkSnap to create a mask from that 3D image. I then use 
> that mask as the input for ROOSTER, to which I again use the same 
> spacing/dimensions. For some values it seems to work and other it 
> doesn't. I'm wondering if itkSnap is truncating the 
> spacing/dimension/origins when I save my mask, and perhaps why 
> something like (160,2,-159) works but (511,0.88,-224.84). I'll take a 
> look at the metadata.
>
> I'll try resampling my masks and like you said that should probably 
> fix my issues.
>
> Thanks for the help,
> Joel
>
> On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory <cyril.mory at uclouvain.be 
> <mailto:cyril.mory at uclouvain.be>> wrote:
>
>     Indeed, resampling the mask if needed, to the correct size,
>     spacing, origin and direction, seems the simplest way to deal with
>     this issue.
>     But I would do it in the filter rather than in the application, so
>     that anything built on top of ROOSTER (i.e. incremental ROOSTER,
>     or the rtkfourdroostertest) also benefits from it.
>     Feel free to do it if you want, otherwise I'll take care of it
>     next week :)
>
>
>     On 10/02/2015 08:44 AM, Simon Rit wrote:
>>     Hi Joel,
>>     Can you explain how you created your mask? Looking at the code,
>>     it seems to me that if you create a 4D image with RTK, create a
>>     mask from this image with exactly the same meta info and pass it
>>     to ROOSTER, that should work in all cases. If I were you, I would
>>     compare the two mhd files (of the mask and the 4D image you used
>>     to create it) and verify that the meta info is exactly the same.
>>     For ROOSTER, I suggest to add an interpolation when the
>>     information is not inconsistent, e.g., in the main() function. I
>>     can do it if you agree Cyril.
>>     Simon
>>
>>     On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry
>>     <joelbeaudry at gmail.com <mailto:joelbeaudry at gmail.com>> wrote:
>>
>>         Hi Cyril,
>>
>>         After trying out a few attempts, it seems like some values
>>         play nicer than others. Could it be an issue with floating
>>         point comparisons with the spacing and/or origins? It might
>>         explain why certain values seem to work (1.5) and others do
>>         not (0.88). I'll look at what values are being compared and
>>         get back to you.
>>
>>         Thanks,
>>         Joel
>>
>>         On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry
>>         <joelbeaudry at gmail.com <mailto:joelbeaudry at gmail.com>> wrote:
>>
>>             Hi Cyril,
>>
>>             The thing is I'm reconstructing a FDK image with
>>             dimensions 512 (0.88 spacing) and re-creating a mask off
>>             of that. So the motion mask should have the same
>>             dimensions, spacing, and origin as the intended 4D image
>>             since I'm using 4D rooster with --dimension 512 --spacing
>>             0.88. Perhaps I'm creating my mask incorrectly?
>>
>>             I'll try and fiddle with it a bit later and see why the
>>             mask I created for 160 (2), worked but not the case of
>>             512 (0.88), and let you know what I find.
>>
>>             Thanks again,
>>             Joel
>>
>>             On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory
>>             <cyril.mory at uclouvain.be
>>             <mailto:cyril.mory at uclouvain.be>> wrote:
>>
>>                 Hi Joel,
>>
>>                 Good to hear it's working now.
>>                 The error you get is explained on the wiki in the
>>                 small paragraph after the cuda command line :
>>
>>                 Note that the reconstructed volume in this example
>>                 does not fully contain the attenuating object,
>>                 causing hyper-attenuation artifacts on the borders of
>>                 the result. To avoid these artifacts, reconstruct a
>>                 larger volume (--dimension 256) should be fine. *Note
>>                 that you will have to resize your motion mask as
>>                 well, as 3D the motion mask is expected to have the
>>                 same size, spacing and origin as the first 3
>>                 dimensions of the 4D output. *
>>
>>                 I guess I should take some time to fix that, and
>>                 allow any motion mask, but until I do, you can resize
>>                 your motion mask using the CLITK tools
>>                 (http://www.creatis.insa-lyon.fr/rio/vv) or any
>>                 method that suits you.
>>
>>                 Cyril
>>
>>
>>
>>                 On 09/29/2015 09:36 PM, Joel Beaudry wrote:
>>>                 Hi Cyril,
>>>
>>>                 Works like a charm, thanks! I tried it on some other
>>>                 datasets and it seems to be working. I need to
>>>                 increase the resolution and play around with the
>>>                 parameters now.
>>>
>>>                 I haven't had time to test it too much, but I do get
>>>                 an error when attempting to reconstruct with
>>>                 different dimensions. I'm using Cuda, and haven't
>>>                 tried it with just cpu reconstruction yet.
>>>
>>>                 i.e.)
>>>                 --dimension 160 --spacing 2 -> works
>>>                 --dimension 512,64,512 --spacing 0.88,2.5,0.88 -->
>>>                 throws "In AverageOutOfROIImageFilter: information
>>>                 of ROI image does not match input image"
>>>
>>>                 I'll be able to test some other things later and
>>>                 list more details.
>>>
>>>                 Thanks,
>>>                 Joel
>>>
>>>
>>>
>>>                 On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory
>>>                 <cyril.mory at uclouvain.be
>>>                 <mailto:cyril.mory at uclouvain.be>> wrote:
>>>
>>>                     Hi Joel,
>>>
>>>                     I have fixed the wiki example (command line
>>>                     parameters AND data). Can you restart it from
>>>                     scratch and let me know if you still have
>>>                     problems ?
>>>
>>>                     Roughly, the problems were the following:
>>>                     - the "mm_50.mha" motion mask file was not
>>>                     aligned with the CBCT coordinates
>>>                     - the regularization parameters (gamma space and
>>>                     gamma time) were way too high. The
>>>                     regularization with a high gamma-time caused
>>>                     frames to be identical, while it should only
>>>                     discourage variations
>>>
>>>                     I hope it works, now. If it doesn't work for
>>>                     you, please keep asking
>>>                     Cyril
>>>
>>>
>>>                     On 09/28/2015 09:52 AM, Cyril Mory wrote:
>>>>                     Hi Joel,
>>>>
>>>>                     I have just tried to reproduce the wiki
>>>>                     example, and indeed, there are several mistakes
>>>>                     in it. I am working on correcting them. I'll
>>>>                     keep you posted.
>>>>
>>>>                     Cyril
>>>>
>>>>
>>>>                     On 09/26/2015 05:32 AM, Joel Beaudry wrote:
>>>>>                     Hi RTK-users,
>>>>>
>>>>>                     I'm unable to reproduce the images from the
>>>>>                     4DROOSTERReconstruction example. The 5 frames
>>>>>                     should show some differences pertaining to
>>>>>                     patient motion but the ones that I'm producing
>>>>>                     are identical, so no motion is visible.
>>>>>
>>>>>                     Has anyone been able to follow the example and
>>>>>                     the provided dataset to create a 4D image?
>>>>>
>>>>>                     Thanks,
>>>>>                     Joel
>>>>>
>>>>>
>>>>>                     _______________________________________________
>>>>>                     Rtk-users mailing list
>>>>>                     Rtk-users at public.kitware.com  <mailto:Rtk-users at public.kitware.com>
>>>>>                     http://public.kitware.com/mailman/listinfo/rtk-users
>>>>
>>>
>>>
>>
>>
>>
>>
>>         _______________________________________________
>>         Rtk-users mailing list
>>         Rtk-users at public.kitware.com
>>         <mailto:Rtk-users at public.kitware.com>
>>         http://public.kitware.com/mailman/listinfo/rtk-users
>>
>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20151006/9b04864b/attachment-0010.html>


More information about the Rtk-users mailing list