[Insight-users] Voxel coordinates inside of a filter?
Cory Quammen
cquammen at cs.unc.edu
Fri Dec 2 09:07:28 EST 2011
Hi Christina,
Thank you for clarifying what you are trying to do. You are right,
there is currently no way to access the voxel coordinates or indices
via the functor using the existing UnaryFunctorImageFilter. An
inefficient way to get the voxel location would be to use
PhysicalPointImageSource to generate an image with the coordinates,
then pass this image to the BinaryFunctorImageFilter as its second
input. PhysicalPointImageSource is available in the latest ITK v4
release candidate, so you would need to be using that version.
A more efficient solution would be to create a new
UnaryFunctorImageFilter class that provides the voxel coordinates to
the functor. I don't think this would be too hard to do, and it would
be a nice addition to ITK.
Cory
On Fri, Dec 2, 2011 at 8:24 AM, Chr. Rossmanith
<cr at neuro.ma.uni-heidelberg.de> wrote:
> Hi Cory,
>
> I fear I don't know how to apply your suggestion to my problem. Within the
> operator() of the functor of my filter I only have a value of type "const
> TInput & A", nothing I could pass to TransformIndexToPhysicalPoint(). What I
> would like to have are the voxel coordinates (x,y,z) of the current voxel...
>
> Christina
>
> Am 25.11.2011 20:23, schrieb Cory Quammen:
>>
>> Christina,
>>
>> The method
>>
>> void ImageBase::< VImageDimension
>>>
>>> ::TransformIndexToPhysicalPoint(const IndexType& index, Point<
>>
>> TCoordRep, VImageDimension> & point) const
>>
>> will probably give you what you need. The first argument is the voxel
>> index, and the second argument is a Point that will store the location
>> of the voxel. The Image class descends from ImageBase, so this method
>> is available for Image classes.
>>
>> Hope that helps,
>> Cory
>>
>> On Fri, Nov 25, 2011 at 9:48 AM, Chr. Rossmanith
>> <cr at neuro.ma.uni-heidelberg.de> wrote:
>>>
>>> Hi,
>>>
>>> I've used an unary functor image filter to implement an analysis of time
>>> series. Now I'd like to know the voxel coordinates of a time series
>>> during
>>> analysis. Is this information available somehow?
>>>
>>> Thank you for any hint,
>>> Christina Rossmanith
>>> --
>>> Dept. of Neurology
>>> UMM Mannheim
>>>
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>>
>>
>
>
--
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill
More information about the Insight-users
mailing list