comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Selective Convolution
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Selective Convolution [message #71682] Tue, 13 July 2010 11:32
James[2] is currently offline  James[2]
Messages: 44
Registered: November 2009
Member
Hi Everyone,

I am getting some painfully slow execution times dominated by running
CONVOL on three-dimensional arrays. I'm working with a sparse data
set of blood vessel images. I'm only interested in calculating the
field _inside_ the blood vessels, so the vast majority of the array is
empty space that I don't care about. I'd like to instruct CONVOL to
only calculate convolutions inside the blood vessels, but when I try
to do this:

;example, simpler version of what I'm doing
x[nonzero] += r*convol(x[nonzero], pdvkern)

IDL complains, and rightfully so: the subscripted array is now one-
dimensional, and it doesn't make sense to convolve it by a 3D kernel.

My first thought was setting the empty space to NaN values, but the
NaN keyword to CONVOL does the opposite of what I want - it replaces
NaN values with the convolution of real values, and ignores NaN values
in the convolution of "good" elements. I don't ever want to replace a
NaN value with a convolved value, but I would like to treat NaN values
as zeroes when calculating the convolution of "good" elements.

So, I'm thinking I might have to write a C routine for selective
convolution. Any other ideas for how to overcome this?

Thanks,
James Preiss
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: .hdr file
Next Topic: Re: RE trying to export pixel data from .dat files, based on coordinate loc

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:56:15 PDT 2025

Total time taken to generate the page: 0.00553 seconds