[Insight-users] ConnectedThresholdImageFilter on one slice only ?

Luis Ibanez luis.ibanez at kitware.com
Thu Dec 25 17:30:12 EST 2008


Hi Maximilien,

The process you are describing seems to be a reasonable
way of doing this.


More specifically:

    1) Extract the slice with the

                     "ExtractImageFilter"

    2) Run the connectedThresholdImageFilter
       in 2D on the extracted slice


    3) Copy the slice back to the image, using the

               "PasteImageFilter"


I'm surprised to hear that the last part takes a lot of
time. It should take a couple of seconds at most.
Were you doing this by using ImageIterators ?
or were you using calls to SetPixel() and GetPixel() ?

Please give it a try to the PasteImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1PasteImageFilter.html

and let us know if you still experience any problems.


     Regards,


         Luis



-------------------------
Maximilien Renard wrote:
> Hi there,
> 
> I'm trying to use ConnectedThresholdImageFilter on one slice of an 3D
> Image only (the result should be the original image exactly the same
> except the specified slice where we put the seed).
> Now I'm extracting the slice into a new 3D Image where it is alone,
> then I apply the filter and finally I copy every voxel of the filtered
> image one by one into the original one. But that takes a lot of time
> (the last step is very long).
> 
> Is there a better way to do that ? I'm new to ITK and I'm not
> acknowledged with ITK Doxygen documentation which is quite hermetic
> for me (I was used to read documentations such as the one of PHP or
> Qt).
> 
> Thanks for your future help,
> 
> Best regards and merry christmas,
> 
> Maximilien Renard
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list