[Insight-users] HammingWindowFunction types (Wrapping Problem by creating *.cmake file)

Dan Mueller dan.muel at gmail.com
Fri Jun 6 17:15:19 EDT 2008


Sorry, I should have also included
itkHammingWindowedSincInterpolateImageFunction.h source code in my
previous mail:

#ifndef __itkHammingWindowedSincInterpolateImageFunction_h
#define __itkHammingWindowedSincInterpolateImageFunction_h

#include "itkWindowedSincInterpolateImageFunction.h"

namespace itk
{
template <class TInputImage,
          unsigned int VRadius,
          class TBoundaryCondition=ConstantBoundaryCondition<TInputImage>,
          class TCoordRep=double>
class ITK_EXPORT HammingWindowedSincInterpolateImageFunction :
  public WindowedSincInterpolateImageFunction<TInputImage,
											  VRadius,
											  Function::HammingWindowFunction<VRadius>,
											  TBoundaryCondition,
											  TCoordRep>
{
public:
  /** Standard class typedefs. */
  typedef HammingWindowedSincInterpolateImageFunction Self;
  typedef WindowedSincInterpolateImageFunction<TInputImage,
											   VRadius,
											   Function::HammingWindowFunction<VRadius>,
											   TBoundaryCondition,
											   TCoordRep> Superclass;
  typedef SmartPointer<Self> Pointer;
  typedef SmartPointer<const Self> ConstPointer;

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

protected:
  HammingWindowedSincInterpolateImageFunction() {}
  virtual ~HammingWindowedSincInterpolateImageFunction() {}

private:
  HammingWindowedSincInterpolateImageFunction(const Self&);
//purposely not implemented
  void operator=(const Self&);                             //purposely
not implemented
};

} // end namespace itk

#endif

On 06/06/2008, Dan Mueller <dan.muel at gmail.com> wrote:
> Hi Yongqiang,
>
> Here is the wrapping I use in ManagedITK (.NET wrappers for ITK based
> on WrapITK, though not using cableswig); it may help you...
>
> # WindowedSincInterpolateImageFunction with HammingWindowFunction
> WRAP_CLASS("itk::HammingWindowedSincInterpolateImageFunction")
>
>   SET(MANAGED_TYPE_TEMPLATE
> ${MANAGED_ITK_SOURCE_COMMON_PATH}/itkManagedImageFunction_TYPE.cxx.in)
>   SET(MANAGED_WRAPPER_TEMPLATE
> ${MANAGED_ITK_SOURCE_COMMON_PATH}/itkManagedImageFunction_WRAPPER.cxx.in)
>
>   FOREACH(d ${WRAP_ITK_DIMS})
>     FOREACH(t ${WRAP_ITK_SCALAR})
>       FOREACH(r RANGE 4 5)
>         WRAP_TEMPLATE("${ITKM_I${t}${d}}R${r}" "${ITKT_I${t}${d}},${r}")
>       ENDFOREACH(r)
>     ENDFOREACH(t)
>   ENDFOREACH(d)
>
> END_WRAP_CLASS()
>
> 2008/6/6 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>>
>> Hi Yongqiang,
>>
>> I think that you are trying to pass some wrong template parameters for
>> the
>> HammingWindowFunction types.
>> I can't help much though, because I have no idea about what is this
>> class,
>> but someone else may be able to help much.
>>
>> Regards,
>>
>> Gaëtan
>>
>>
>>
>> Le 5 juin 08 à 23:06, Yongqiang Zhao a écrit :
>>
>>>
>>> Hi,
>>>
>>> I am trying to create wrap_itkWindowedSincInterpolateImageFunction.cmake
>>> file to wrap WindowedSincInterpolateImageFunction. The following is the
>>> file:
>>>
>>> SET(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
>>> WRAP_INCLUDE("itkWindowedSincInterpolateImageFunction.h")
>>>
>>>
>>> WRAP_CLASS("itk::Function::HammingWindowFunction")
>>>  WRAP_TEMPLATE("${ITKM_UI}${ITKM_D}${ITKM_D}"
>>> "${ITKT_UI},${ITKT_D},${ITKT_D}")
>>> END_WRAP_CLASS()
>>>
>>> WRAP_CLASS("itk::WindowedSincInterpolateImageFunction" POINTER)
>>>  FOREACH(d ${WRAP_ITK_DIMS})
>>>   FOREACH(t ${WRAP_ITK_SCALAR})
>>>     WRAP_TEMPLATE("${ITKM_I${t}${d}}${ITKM_UI}HWFF${ITKM_UI}"
>>>
>>> "${ITKT_I${t}${d}},${ITKT_UI}*,itk::Function::HammingWindowFunction,${ITKT_I${t}${d}},${ITKT_D}")
>>>   ENDFOREACH(t)
>>>  ENDFOREACH(d)
>>> END_WRAP_CLASS()
>>>
>>> From this file, we can get
>>> wrap_itkWindowedSincInterpolateImageFunction.cxx after ccmake:
>>>
>>> #include "itkCommand.h"
>>> #include "itkOffset.h"
>>> #include "itkVector.h"
>>> #include "itkCovariantVector.h"
>>> #include "itkContinuousIndex.h"
>>> #include "itkArray.h"
>>> #include "itkFixedArray.h"
>>> #include "itkRGBPixel.h"
>>> #include "itkImage.h"
>>> #include "itkVectorImage.h"
>>> #include "itkVariableLengthVector.h"
>>> #include "itkPoint.h"
>>> #include "itkLevelSetNode.h"
>>> #include "itkFlatStructuringElement.h"
>>> #include "itkSpatialObject.h"
>>> #include "itkWindowedSincInterpolateImageFunction.h"
>>>
>>>
>>> #ifdef CABLE_CONFIGURATION
>>> namespace _cable_
>>> {
>>>  const char* const group = "itkWindowedSincInterpolateImageFunction";
>>>  namespace wrappers
>>>  {
>>>
>>>     typedef itk::Function::HammingWindowFunction< unsigned
>>> int,double,double>::HammingWindowFunction itkHammingWindowFunctionUIDD;
>>>
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> signed
>>> short,2>,unsigned int,itk::Function::HammingWindowFunction,itk::Image<
>>> signed short,2>,double>::WindowedSincInterpolateImageFunction
>>> itkWindowedSincInterpolateImageFunctionISS2UIHWFFUI;
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> signed
>>> short,2>,unsigned int,itk::Function::HammingWindowFunction,itk::Image<
>>> signed short,2>,double>::Pointer::SmartPointer
>>> itkWindowedSincInterpolateImageFunctionISS2UIHWFFUI_Pointer;
>>>
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> unsigned char,2>,unsigned
>>> int,itk::Function::HammingWindowFunction,itk::Image< unsigned
>>> char,2>,double>::WindowedSincInterpolateImageFunction
>>> itkWindowedSincInterpolateImageFunctionIUC2UIHWFFUI;
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> unsigned char,2>,unsigned
>>> int,itk::Function::HammingWindowFunction,itk::Image< unsigned
>>> char,2>,double>::Pointer::SmartPointer
>>> itkWindowedSincInterpolateImageFunctionIUC2UIHWFFUI_Pointer;
>>>
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> float,2>,unsigned int,itk::Function::HammingWindowFunction,itk::Image<
>>> float,2>,double>::WindowedSincInterpolateImageFunction
>>> itkWindowedSincInterpolateImageFunctionIF2UIHWFFUI;
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> float,2>,unsigned int,itk::Function::HammingWindowFunction,itk::Image<
>>> float,2>,double>::Pointer::SmartPointer
>>> itkWindowedSincInterpolateImageFunctionIF2UIHWFFUI_Pointer;
>>>
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> signed
>>> short,3>,unsigned int,itk::Function::HammingWindowFunction,itk::Image<
>>> signed short,3>,double>::WindowedSincInterpolateImageFunction
>>> itkWindowedSincInterpolateImageFunctionISS3UIHWFFUI;
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> signed
>>> short,3>,unsigned int,itk::Function::HammingWindowFunction,itk::Image<
>>> signed short,3>,double>::Pointer::SmartPointer
>>> itkWindowedSincInterpolateImageFunctionISS3UIHWFFUI_Pointer;
>>>
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> unsigned char,3>,unsigned
>>> int,itk::Function::HammingWindowFunction,itk::Image< unsigned
>>> char,3>,double>::WindowedSincInterpolateImageFunction
>>> itkWindowedSincInterpolateImageFunctionIUC3UIHWFFUI;
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> unsigned char,3>,unsigned
>>> int,itk::Function::HammingWindowFunction,itk::Image< unsigned
>>> char,3>,double>::Pointer::SmartPointer
>>> itkWindowedSincInterpolateImageFunctionIUC3UIHWFFUI_Pointer;
>>>
>>>     typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> float,3>,unsigned int,itk::Function::HammingWindowFunction,itk::Image<
>>> float,3>,double>::WindowedSincInterpolateImageFunction
>>> itkWindowedSincInterpolateImageFunctionIF3UIHWFFUI;
>>>
>>>   typedef itk::WindowedSincInterpolateImageFunction< itk::Image<
>>> float,3>,unsigned int,itk::Function::HammingWindowFunction,itk::Image<
>>> float,3>,double>::Pointer::SmartPointer
>>> itkWindowedSincInterpolateImageFunctionIF3UIHWFFUI_Pointer;
>>>
>>>  }
>>> void force_instantiate()
>>> {
>>>  using namespace _cable_::wrappers;
>>>
>>> }
>>>
>>> }
>>> #endif
>>>
>>>
>>> After "make", it showed many errors. The main errors are:
>>> type/value mismatch at argument 1 in template parameter list for
>>> 'template
>>> class itk::Function::HammingWindowFunction'
>>>
>>> /Insight-build/Wrapping/WrapITK/Modules/Interpolators/wrap_itkWindowedSincInterpolateImageFunction.cxx:26:
>>> error:   expected a constant of type 'unsigned int', got 'unsigned int'
>>>
>>> /Insight-build/Wrapping/WrapITK/Modules/Interpolators/wrap_itkWindowedSincInterpolateImageFunction.cxx:26:
>>> error: expected initializer before 'itkHammingWindowFunctionUIDD'
>>>
>>> Can anyone tell me how to fix them?
>>>
>>> Best regards,
>>> Yongqiang
>>> _________________________________________________________________
>>> Search that pays you back! Introducing Live Search cashback.
>>>
>>> http://search.live.com/cashback/?&pkw=form=MIJAAF/publ=HMTGL/crea=srchpaysyouback
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>
>> --
>> Gaëtan Lehmann
>> Biologie du Développement et de la Reproduction
>> INRA de Jouy-en-Josas (France)
>> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
>> http://voxel.jouy.inra.fr  http://www.mandriva.org
>> http://www.itk.org  http://www.clavier-dvorak.org
>


More information about the Insight-users mailing list