[Insight-developers] Problem with ImageAdaptors
Luis Ibanez
luis.ibanez at kitware.com
Fri Jul 21 09:52:01 EDT 2006
Hi Vincent, Henning,
The bug has been fixed yesterday.
Not the ImageAdaptor has the methods for transforming
PhysicalPoints into Index and ContinousIndex.
The ImageAdaptor is now tested with a LinearInterpolator.
Please update your CVS checkout, and let us know
if you find any problems,
Thanks
Luis
-----------------------
Vincent Agnus wrote:
> Hi, Luis and Henning
>
> This bug is already reported (#3252):
>
> http://www.itk.org/Bug/bug.php?op=show&bugid=3252&pos=0
>
> Regards,
>
> Vincent
>
>
>
> On Tue, 2006-07-18 at 17:58 -0400, Luis Ibanez wrote:
>
>>Hi Henning,
>>
>>
>>Well, this is an "inconvenient" bug...
>>
>>
>>Here is what happens:
>>
>> ImageAdaptor<T,N> derives from ImageBase<N>
>> Image<T,N> derives from ImageBase<N>
>> OrientedImage<T,N> derives from ImageBase<N>
>>
>>The difference between the OrientedImage and the Image
>>is the way they implement the methods
>>
>> * TransformPhysicalPointToContinuousIndex
>> * TransformPhysicalPointToIndex
>> * TransformIndexToPhysicalPoint
>>
>>Where N is the Image Dimension and T is the PixelType.
>>
>>
>>One way to fix the "bug" of ImageAdaptors could be
>>to move the Transform method up to the ImageBase,
>>but that will ruin the mechanism established for
>>the OrientedImage.
>>
>>Another way is to duplicate the implementation of
>>the Transform methods of the Image into the
>>ImageAdaptor. That's probably the simplest solution,
>>at this point and something that you could do in
>>your local copy of ITK.
>>
>>For the long term of ITK, the appropriate solution
>>is probably to move the implementation of the
>>Transform method to the ImageBase and pay some
>>performance penalty in those images that are
>>axis-aligned.
>>
>>
>>In summary, the immediate solution for your problem
>>is to copy the methods from the Image into the
>>ImageAdaptor.
>>
>>The bad news is that even if you copy the methods
>>in the ImageAdaptor, it is unlikely that you will
>>be able to use ImageInterpolators over image adaptors
>>because many of them my require neighborhood operations.
>>
>>As we describe in the previous email, the PixelAccessor
>>trick used by the ImageAdaptors is not suitable for getting
>>neighborhoods of the pixels. Some interpolators may work,
>>as long as they don't use an ITK neighborhood class inside.
>>
>>
>>
>> Regards,
>>
>>
>>
>> Luis
>>
>>
>>
>>
>>----------------------
>>Henning Meyer wrote:
>>
>>>When trying to use an image adaptor as input to a filter which uses an
>>>InterpolateImageFunction, there is an compiler error:
>>>
>>>C:\devel\Visual
>>>Studio\libs\InsightToolkit-2.6.0\Code\Common\itkInterpolateImageFunction.h(89):
>>>
>>>error C2039: 'TransformPhysicalPointToContinuousIndex': Ist kein
>>>Element von 'itk::ImageAdaptor<TImage,TAccessor>'
>>> with
>>> [
>>> TImage=DistImageType,
>>> TAccessor=UpperThresholdAccessor
>>> ]
>>>
>>>
>>>I think this is a bug, but the fix should be pretty easy.
>>>
>>>Henning
>>>_______________________________________________
>>>Insight-developers mailing list
>>>Insight-developers at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-developers
>>>
>>>
>>
>>
>>_______________________________________________
>>Insight-developers mailing list
>>Insight-developers at itk.org
>>http://www.itk.org/mailman/listinfo/insight-developers
>
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
More information about the Insight-developers
mailing list