[Insight-developers] itk::ImageBase::TransformIndexToPhysicalPoint/TransformPointToContinuousIndex ignores spacing?

kent williams norman-k-williams at uiowa.edu
Tue Mar 17 17:41:03 EDT 2009


I think, if i read it correctly, I'm doing option 3.

I'm borrowing code from
VectorLinearInterpolateNearestNeighborExtrapolateImageFunction and putting
it into itkWarpImageFilter.




On 3/17/09 3:32 PM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:

> 1) If we add this class, shouldn't we also add a class that works with
> scalar images: LinearInterpolateNearestNeighborExtrapolateImageFunction.
> and,
> 2) If we add this class, shouldn't this class use
> VectorLinearInterpolateImageFunction internally for points that are
> inside the region? I hate to see duplicated code.
> 
> Or,
> 3) Do we need this new interpolator at all? Why not do the inside
> region test in the class that uses
> VectorLinearInterplateImageFunction?
> 
> Bill
> 
> On Tue, Mar 17, 2009 at 12:29 PM, Tom Vercauteren
> <tom.vercauteren at m4x.org> wrote:
>> Well, what is the policy for moving a class from review to ITK proper?
>> 
>> It might be a good time to move this interpolator if someone needs it
>> for a bug fix.
>> 
>> Thoughts anyone?
>> 
>> Tom
>> 
>> On Tue, Mar 17, 2009 at 20:12, kent williams
>> <norman-k-williams at uiowa.edu> wrote:
>>> This is actually exactly what I need, but unfortunately, I can't change a
>>> filter that is part of ITK proper to depend on a class in review ;-)
>>> 
>>> 
>>> On 3/17/09 1:57 PM, "Tom Vercauteren" <tom.vercauteren at m4x.org> wrote:
>>> 
>>>> Kent,
>>>> 
>>>> You might also want to switch the interpolator for an
>>>> interpolator/extrapolator such as the one I contributed to the Review
>>>> directory:
>>>> http://www.itk.org/Doxygen/html/classitk_1_1VectorLinearInterpolateNearestN
>>>> eig
>>>> hborExtrapolateImageFunction.html
>>>> 
>>>> With this function, all points are considered as inside the buffer. I
>>>> think that this approach makes sense in your case.
>>>> 
>>>> Hope this helps,
>>>> Tom
>>>> 
>>>> On Tue, Mar 17, 2009 at 19:43, Bill Lorensen <bill.lorensen at gmail.com>
>>>> wrote:
>>>>> Look at what I did in ShrinkImageFilter recently. At Hans's request
>>>>> (do we all work for Hans?) I changed the subsampling so that the image
>>>>> centers aligned.
>>>>> 
>>>>> Bill
>>>>> 
>>>>> On Tue, Mar 17, 2009 at 11:33 AM, kent williams
>>>>> <norman-k-williams at uiowa.edu> wrote:
>>>>>> I was aware of the issue, just never tripped over it before.
>>>>>> 
>>>>>> I'm just not sure how to deal with it in this case.  It points out a
>>>>>> fundamental problem in what I'm trying to do.  The net effect is this:
>>>>>> 
>>>>>> Image A has dimensions { n, n, n } and spacing { s, s, s }
>>>>>> Image B has dimensions { n/2, n/2, n/2 } and spacing { s*2, s*2, s*2 }
>>>>>> Assume origin = { 0, 0, 0 } for both, and both are in the same
>>>>>> orientation.
>>>>>> 
>>>>>> Any physical point on an edge farthest from the origin -- e.g. { n-1, y,
>>>>>> z
>>>>>> }, { x, n-1, z }, { x, y, n-1 } etc -- is INSIDE image A, but NOT INSIDE
>>>>>> image B.  Even though the two images theoretically have the same volume.
>>>>>> 
>>>>>> And this is independent of whether the index is center-of-voxel or corner
>>>>>> of
>>>>>> voxel, or whether you're a North-going Zax or a South-going Zax.
>>>>>> 
>>>>>> The mind reels.
>>>>>> 
>>>>>> On 3/17/09 1:01 PM, "Tom Vercauteren" <tom.vercauteren at gmail.com> wrote:
>>>>>> 
>>>>>>> Hi Kent,
>>>>>>> 
>>>>>>> You might already be aware of that bug:
>>>>>>> http://www.itk.org/Bug/view.php?id=6558
>>>>>>> 
>>>>>>> Right now the use of rounding vs. truncation is not consistent within
>>>>>>> the index <-> world transformations.
>>>>>>> 
>>>>>>> Tom
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Notice: This UI Health Care e-mail (including attachments) is covered by
>>>>>> the
>>>>>> Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
>>>>>> confidential
>>>>>> and may be legally privileged.  If you are not the intended recipient,
>>>>>> you
>>>>>> are hereby notified that any retention, dissemination, distribution, or
>>>>>> copying of this communication is strictly prohibited.  Please reply to
>>>>>> the
>>>>>> sender that you have received the message in error, then delete it.
>>>>>>  Thank
>>>>>> you.
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Powered by www.kitware.com
>>>>>> 
>>>>>> Visit other Kitware open-source projects at
>>>>>> http://www.kitware.com/opensource/opensource.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-developers
>>>>>> 
>>>>> 
>>> 
>>> 
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.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-developers
>> 



More information about the Insight-developers mailing list