13 #ifndef itkFunctorFromStringImageFilter_h 14 #define itkFunctorFromStringImageFilter_h 35 template<
typename TInputImage,
typename TOutputImage,
class TMaskImage=Image<
double,3> >
89 void ThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread,
98 void operator=(const Self &) ITK_DELETE_FUNCTION;
107 template <class ImageType, class ImageOutType, class MaskImageType=Image<
double,4> >
109 FunctorFromStringOPImage(const
std::vector<
itk::SmartPointer<ImageType> >& images,
itk::SmartPointer<ImageOutType>& outImage, const
std::
string& funcStr, const
itk::SmartPointer<MaskImageType>& mask=
nullptr,
int numberOfThreads=-1)
112 typename FunctorImageFilterType::Pointer filter = FunctorImageFilterType::New();
115 filter->SetMaskImage(mask);
116 for (
int i = 0; i < images.size(); ++i )
118 filter->SetInput(i, images[i]);
120 filter->SetExpression(funcStr);
123 if (numberOfThreads>0)
124 filter->SetNumberOfThreads(numberOfThreads);
128 outImage = filter->GetOutput();
134 #if !defined(ITK_MANUAL_INSTANTIATION) && !defined(__itkFunctorFromStringImageFilter_hxx) utl::Functor::VectorMultiVariableFunctionWrapper FunctorType
virtual ~FunctorFromStringImageFilter()
OutputImageType::PixelType OutputImagePixelType
Implements vector-valued generic operation on one image.
FunctorBaseVectorImageFilter< TInputImage, TOutputImage, utl::Functor::VectorMultiVariableFunctionWrapper<>, TMaskImage > Superclass
bool IsImageEmpty(const SmartPointer< ImageType > &image)
OutputImageType::SizeType OutputImageSizeType
OutputImageType::IndexType OutputImageIndexType
Implements vector-valued generic operation on images with the same size.
InputImageType::SizeType InputImageSizeType
InputImageType::SpacingType InputImageSpacingType
#define ITK_DELETE_FUNCTION
InputImageType::ConstPointer InputImageConstPointer
InputImageType::Pointer InputImagePointer
OutputImageType::Pointer OutputImagePointer
OutputImageType::RegionType OutputImageRegionType
Superclass::MaskImageType MaskImageType
InputImageType::RegionType InputImageRegionType
InputImageType::PixelType InputImagePixelType
bool IsLogDebug(const int level=utl::LogLevel)
TInputImage InputImageType
virtual void PropagateRequestedRegion(DataObject *output) ITK_OVERRIDE
OutputImageType::SpacingType OutputImageSpacingType
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
#define itkSetGetMacro(name, type)
TOutputImage OutputImageType
Superclass::MaskImageType MaskImageType
FunctorFromStringImageFilter Self
void FunctorFromStringOPImage(const std::vector< itk::SmartPointer< ImageType > > &images, itk::SmartPointer< ImageOutType > &outImage, const std::string &funcStr, const itk::SmartPointer< MaskImageType > &mask=nullptr, int numberOfThreads=-1)
InputImageType::IndexType InputImageIndexType