[Insight-users] itkTileImageFilter.hxx no matching function for VectorImage<PixelType, 2u>
Bill Lorensen
bill.lorensen at gmail.com
Thu Nov 17 08:23:47 EST 2011
It appears that the TileImageFilter does not support vector images.
i'll investigate whet it will take to add support.
On Thu, Nov 17, 2011 at 4:30 AM, Mengqiu Tian <tianmengqiu at gmail.com> wrote:
> Hi Bill,
>
> Did you received my email?
> Do you have any idea what happens?
>
> Mengqiu
>
> On Tue, Nov 15, 2011 at 1:53 PM, Mengqiu Tian <tianmengqiu at gmail.com> wrote:
>>
>> Hi Bill,
>>
>> I followed your suggestion that replace the original one into
>> m_DefaultPixelValue = NumericTraits< OutputPixelType
>> >::ZeroValue(m_DefaultPixelValue);
>>
>> The problem of no matching function had been solved, however, my program
>> still could not compiled.
>> A new problem raised that
>>
>> itkTileImageFilter.hxx: In member function ‘void
>> itk::TileImageFilter<TInputImage, TOutputImage>::GenerateData() [with
>> TInputImage = itk::VectorImage<short unsigned int, 2u>, TOutputImage =
>> itk::VectorImage<short unsigned int, 3u>]’:
>> instantiated from here itkTileImageFilter.hxx:91:7: error: invalid
>> const_cast from type ‘const itk::VectorImage<short unsigned int,
>> 2u>::PixelContainer*’ to type ‘itk::TileImageFilter<TInputImage,
>> TOutputImage>::GenerateData() [with TInputImage = itk::VectorImage<short
>> unsigned int, 2u>, TOutputImage = itk::VectorImage<short unsigned int,
>> 3u>]::PixelContainerType*’
>>
>> I will keep on looking for the solution.
>>
>> Regards,
>>
>> Mengqiu
>>
>>
>> On Sat, Nov 12, 2011 at 12:07 AM, Mengqiu Tian <tianmengqiu at gmail.com>
>> wrote:
>>>
>>> No problem, just because of the time difference, I was off work then, and
>>> the computer of our library need to be reboot this weekend.
>>> Enjoy your weekend :)
>>> Mengqiu
>>>
>>> On Sat, Nov 12, 2011 at 5:49 AM, Bill Lorensen <bill.lorensen at gmail.com>
>>> wrote:
>>>>
>>>> Please try my suggestion. As I said, I believe you have found a bug...
>>>>
>>>> Bill
>>>>
>>>> On Fri, Nov 11, 2011 at 11:03 AM, Mengqiu Tian <tianmengqiu at gmail.com>
>>>> wrote:
>>>> > Hi Bill,
>>>> >
>>>> > Thanks a lot for reply.
>>>> > I applied itkVectorCastImageFilter.h, and explicitly converted the
>>>> > VectorImage< PixelType, 2u > into Image< itk::Vector< PixelType, 3u >,
>>>> > 2u >.
>>>> > Now the problem had been solved.
>>>> > I still have no idea why itkTileImageFilter.h does not work with
>>>> > VectorImage
>>>> > Type. I would try your suggestion next Monday.
>>>> >
>>>> > Wish you a nice weekend :D
>>>> >
>>>> > Mengqiu
>>>> >
>>>> > On Fri, Nov 11, 2011 at 2:04 PM, Bill Lorensen
>>>> > <bill.lorensen at gmail.com>
>>>> > wrote:
>>>> >>
>>>> >> Definitely a bug.
>>>> >>
>>>> >> Try replacing the offending statement with:
>>>> >> m_DefaultPixelValue =
>>>> >> NumericTraits< OutputPixelType >::ZeroValue(m_DefaultPixelValue);
>>>> >>
>>>> >> If if works, let me know and I'll submit a patch.
>>>> >>
>>>> >> Thanks,
>>>> >>
>>>> >> Bill
>>>> >>
>>>> >> On Fri, Nov 11, 2011 at 3:22 AM, Mengqiu Tian <tianmengqiu at gmail.com>
>>>> >> wrote:
>>>> >> > Dear all,
>>>> >> >
>>>> >> > I am trying to convert single vector images into one vector image
>>>> >> > series(
>>>> >> > one file including a series of vector images ). I found
>>>> >> > itkTileImageFilter.h, and the input comes from the output of
>>>> >> > another
>>>> >> > filterA
>>>> >> > ( instead of files ).
>>>> >> > The pixel type of output of filterA is VectorImage<PixelType, 2u>
>>>> >> > and
>>>> >> > the
>>>> >> > pixel type of output of TileImageFilter should be VectorImage<
>>>> >> > PixelType, 3u
>>>> >> >>. My problem is, when I try to compile my program, I got a error:
>>>> >> >
>>>> >> >
>>>> >> > ITK/Modules/Filtering/ImageGrid/include/itkTileImageFilter.hxx:37:3:
>>>> >> > error:
>>>> >> > no matching function for call to
>>>> >> > ‘itk::NumericTraits<itk::VariableLengthVector<short unsigned int>
>>>> >> >>::ZeroValue()’
>>>> >> >
>>>> >> >
>>>> >> > /ITK/Modules/Core/Common/include/itkNumericTraitsVariableLengthVectorPixel.h:112:21:
>>>> >> > note: candidate is: static const
>>>> >> > itk::NumericTraits<itk::VariableLengthVector<TValueType> >::Self
>>>> >> > itk::NumericTraits<itk::VariableLengthVector<TValueType>
>>>> >> > >::ZeroValue(const
>>>> >> > itk::NumericTraits<itk::VariableLengthVector<TValueType> >::Self&)
>>>> >> > [with
>>>> >> > T =
>>>> >> > short unsigned int,
>>>> >> > itk::NumericTraits<itk::VariableLengthVector<TValueType>
>>>> >> >>::Self = itk::VariableLengthVector<short unsigned int>]
>>>> >> >
>>>> >> >
>>>> >> > How could I fix this?
>>>> >> >
>>>> >> > Thx in advance :)
>>>> >> >
>>>> >> > Mengqiu
>>>> >> >
>>>> >> > _____________________________________
>>>> >> > 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
>>>> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Unpaid intern in BillsBasement at noware dot com
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Unpaid intern in BillsBasement at noware dot com
>>>
>>
>
>
--
Unpaid intern in BillsBasement at noware dot com
More information about the Insight-users
mailing list