[Insight-users] distance map filters.., writing filters

Karthik Krishnan Karthik.Krishnan at kitware.com
Thu Dec 22 16:02:28 EST 2005


Yes you are right.. I misunderstood your previous mail.

It should still be possible to restrict the computation to rectangular 
regions by setting the requested region of the output to a desired VOI 
as in

filter->GetOuptut()->SetRequestedRegion( ... )
filter->Update();

[Of course, this assumes that the VOI is rectagular.]

The easiest way to write a filter is to look at the existing ones and 
the documentation of itkImageToImageFilter.h

-karthik

Kalpathi Subramanian wrote:

> I am already giving it a binary image (background is 0 and object
> is white).. what I would like are distances computed only for
> the white voxels. As you might know,  in many instances the number
> of object voxels is a lot smaller compared to the total number of 
> voxels. Thus, the distance computation will run a lot faster.
>
> In other words,  I dont need the distances from the background voxels
> in my application.
>
> Thanks.
>
>     -- krs
>
>
>
> Karthik Krishnan wrote:
>
>> If you give the DanielssonDistanceMap filter a binary image, its 
>> going to calculate distances to the boundaries of that binary image .
>>
>> So what you are looking for is probably a filter that classifies/ 
>> binarizes your input image into object pixels and non-object pixels ?
>>
>> Kalpathi Subramanian wrote:
>>
>>>
>>> Is there a way to restrict the computation of the distance
>>> map to, say, "object pixels"? I am using the Danielsson filter..
>>> Seems like its not possible from looking at the docs.
>>>
>>> Otherwise, I was considering developing a filter. Are there
>>> any guidelines on how to go about building  a new  filter that
>>> I can plug into the pipeline?
>>>
>>>     -- krs
>>>
>


More information about the Insight-users mailing list