diff --git a/Code/Common/otbStreamingTraits.h b/Code/Common/otbStreamingTraits.h index ac405dfadf7291503f6e062244b32e55090d1eda..1edd0e516da6a581c5b18db8ec9222d6c8c07bf1 100644 --- a/Code/Common/otbStreamingTraits.h +++ b/Code/Common/otbStreamingTraits.h @@ -32,6 +32,7 @@ #include "otbWindowedSincInterpolateImageWelchFunction.h" #include "otbWindowedSincInterpolateImageLanczosFunction.h" #include "otbWindowedSincInterpolateImageBlackmanFunction.h" +#include "otbBCOInterpolateImageFunction.h" #include "otbProlateInterpolateImageFunction.h" @@ -151,6 +152,7 @@ public: typedef WindowedSincInterpolateImageLanczosFunction<ImageType> LanczosInterpolationType; typedef WindowedSincInterpolateImageBlackmanFunction<ImageType> BlackmanInterpolationType; typedef ProlateInterpolateImageFunction<ImageType> ProlateInterpolationType; + typedef BCOInterpolateImageFunction<ImageType> BCOInterpolationType; static unsigned int CalculateNeededRadiusForInterpolator(const InterpolationType* interpolator); }; @@ -195,6 +197,8 @@ public: // OTB Interpolators (supported for otb::VectorImage) typedef WindowedSincInterpolateImageGaussianFunction<ImageType> GaussianInterpolationType; + typedef BCOInterpolateImageFunction<ImageType> BCOInterpolationType; + //typedef WindowedSincInterpolateImageCosineFunction<ImageType> CosineInterpolationType; //typedef WindowedSincInterpolateImageHammingFunction<ImageType> HammingInterpolationType; //typedef WindowedSincInterpolateImageWelchFunction<ImageType> WelchInterpolationType; diff --git a/Code/Common/otbStreamingTraits.txx b/Code/Common/otbStreamingTraits.txx index 62a1f31d043ba659c9c03b9d8d421bffb8980a63..57aef4d9fd1cab73eaa7f0e89bb78f344b5ebff2 100644 --- a/Code/Common/otbStreamingTraits.txx +++ b/Code/Common/otbStreamingTraits.txx @@ -290,6 +290,12 @@ unsigned int StreamingTraits<TImage> otbMsgDevMacro(<< "Blackman Windowed Interpolator"); neededRadius = dynamic_cast<const BlackmanInterpolationType *>(interpolator)->GetRadius(); } + else if (className == "BCOInterpolateImageFunction") + { + otbMsgDevMacro(<< "BCO Interpolator"); + neededRadius = dynamic_cast<const BCOInterpolationType *>(interpolator)->GetRadius(); + } + /*else if (className == "WindowedSincInterpolateImageFunction") { @@ -334,6 +340,11 @@ unsigned int StreamingTraits< otb::VectorImage<TPixel,VImageDimension> > otbMsgDevMacro(<< "Gaussian Windowed Interpolator"); neededRadius = dynamic_cast<const GaussianInterpolationType *>(interpolator)->GetRadius(); } + else if (className == "BCOInterpolateImageFunction") + { + otbMsgDevMacro(<< "BCO Interpolator"); + neededRadius = dynamic_cast<const BCOInterpolationType *>(interpolator)->GetRadius(); + } /*else if (className == "WindowedSincInterpolateImageFunction") { diff --git a/Testing/Code/BasicFilters/otbStreamingTraits.cxx b/Testing/Code/BasicFilters/otbStreamingTraits.cxx index 1ecc13e51007dce657f39f30594a10256db4ebb9..ccedb02f8a4c01c47f5822e98fb68bdcfeeb0665 100644 --- a/Testing/Code/BasicFilters/otbStreamingTraits.cxx +++ b/Testing/Code/BasicFilters/otbStreamingTraits.cxx @@ -50,6 +50,7 @@ int otbStreamingTraitsImage(int argc, char* argv[]) TestInstanciate<StreamingTraits::LanczosInterpolationType>(); TestInstanciate<StreamingTraits::BlackmanInterpolationType>(); TestInstanciate<StreamingTraits::ProlateInterpolationType>(); + TestInstanciate<StreamingTraits::BCOInterpolationType>(); return EXIT_SUCCESS; } @@ -64,6 +65,7 @@ int otbStreamingTraitsVectorImage(int argc, char* argv[]) TestInstanciate<StreamingTraits::NearestNeighborInterpolationType>(); TestInstanciate<StreamingTraits::LinearInterpolationType>(); TestInstanciate<StreamingTraits::GaussianInterpolationType>(); + TestInstanciate<StreamingTraits::BCOInterpolationType>(); return EXIT_SUCCESS; }