[Insight-users] about Region Growing
Luis Ibanez
luis.ibanez at kitware.com
Mon Jan 21 12:29:10 EST 2008
Hi Tuo,
You probably meant the
itkConnectedThresholdImageFilter
and not the
vtkConnectedThresholdImageFilter
There are multiple ways of doing using the original
values instead of the replace value.
Here are some options:
a) run the filter as usual, and then
connect the output of this filter,
and the original images to the
MaskImageFilter. The output will
have the original values on the
region, and zeros elsewhere.
or
b) Modify the code of the file
Insight/Code/BasicFilters/
itkConnectedThresholdImageFilter.txx
in lines 269: replace
it.Set(m_ReplaceValue)
with
it.Set( inputImage->GetPixel( it.GetIndex() ) );
Depending on the size of the region you are segmenting,
method (a) may actually run faster than method (b) and
it has the advantage that you don't need to modify the
source code of ITK.
Although,... what's the fun of using Open Source code
if you don't change the code from time to time :-)
Regards,
Luis
------------------
tuo zhang wrote:
> Hi,
>
> Is there a way to SetReplaceValue as the original
> pixel value when using
> vtkConnectedThresholdImageFilter?
>
> Thank you
>
>
> ___________________________________________________________
> 雅虎邮箱传递新年祝福,个性贺卡送亲朋!
> http://cn.mail.yahoo.com/gc/index.html?entry=5&souce=mail_mailletter_tagline
> _______________________________________________
> 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