[Insight-users] Excluding background pixels in Image to List Adaptor

Karthik Krishnan karthik.krishnan at kitware.com
Tue Oct 30 17:16:10 EDT 2007


Hi Mark:

Yes there is.

Please see the class itkImageToListGenerator . The class was written for
reasons identical to the ones you have.

Specifically look for the methods
  * SetMaskImage
  * SetMaskValue

The former method takes any spatial object as input. So you could use the
itkImageMaskSpatialObject to create a spatial object out of your mask image
and feed it in there.

Unlike an adaptor, this is a generator, as in, this class does not attempt
to avoid replicating the memory, by providing a facade. There is the
itk::Image and there is a seperate itk::ListSample. However access is far
more efficient.

Hope this helps.
Regards
--
karthik

On 10/30/07, Mark Bouts <mark at invivonmr.uu.nl> wrote:
>
> Hi,
>
> Is there a way of not including the background pixels in the conversion
> from Image to List types. I'm currently using a kD-tree for storing my
> vector points after I have retrieved them from multiple images. When
> processing this tree it takes considerable time since the background
> pixels are also processed for which there is no need. Is there a way of
> making use of a mask or something similar when converting to the list?
>
> Thanks!
>
> Mark
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>



-- 
Karthik Krishnan
R&D Engineer,
Kitware Inc.
Ph: 518 371 3971 x119
      518 698 3045 (cell)
Fax: 518 371 3971
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20071030/e9c51b33/attachment.htm


More information about the Insight-users mailing list