19 #include "ImageMultiplicationCLP.h" 27 main (
int argc,
char const* argv[])
32 typedef float FloatType;
35 typedef itk::VectorImage<FloatType,4> InputImageType;
36 typedef itk::VectorImage<FloatType,4> OutputImageType;
37 typedef InputImageType::PixelType ContainerType;
39 InputImageType::Pointer input = InputImageType::New();
41 int pixelDimension = input->GetNumberOfComponentsPerPixel();
44 MultiplyFilterType::Pointer filter = MultiplyFilterType::New();
48 vec.SetSize(pixelDimension);
49 for (
int i = 0; i < pixelDimension; i += 1 )
52 filter->SetInput(input);
53 filter->SetConstantVector(vec);
57 OutputImageType::Pointer output = filter->GetOutput();
int main(int argc, char const *argv[])
mutiple a const to a image (replaced by 4DImageMath).
bool SaveImage(const SmartPointer< ImageType > &image, const std::string &filename, const std::string &printInfo="Writing Image:")
bool ReadImage(const std::string &filename, SmartPointer< ImageType > &image, const std::string &printInfo="Reading Image:")
Multiply input pixels by a constant.