本文整理汇总了C++中floatvectorimagetype::Pointer::GetPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetPointer方法的具体用法?C++ Pointer::GetPointer怎么用?C++ Pointer::GetPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类floatvectorimagetype::Pointer
的用法示例。
在下文中一共展示了Pointer::GetPointer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
FloatVectorImageType::Pointer image = FloatVectorImageType::New();
Testing::GetBlankImage(image.GetPointer(), 4);
Mask::Pointer mask = Mask::New();
Testing::GetFullyValidMask(mask.GetPointer());
UnsignedCharScalarImageType::Pointer manualPriorityImage = UnsignedCharScalarImageType::New();
Testing::GetBlankImage(manualPriorityImage.GetPointer());
unsigned int patchRadius = 5;
typedef PriorityConfidence ConfidencePriorityType;
ConfidencePriorityType priorityConfidence(mask, patchRadius);
PriorityManual<itk::Index<2>, UnsignedCharScalarImageType, ConfidencePriorityType>
priority(manualPriorityImage, &priorityConfidence);
itk::Index<2> filledPixel = {{0,0}};
priority.Update(filledPixel);
priority.SetManualPriorityImage(manualPriorityImage);
itk::Index<2> queryPixel = {{0,0}};
priority.ComputePriority(queryPixel);
return EXIT_SUCCESS;
}
示例2: main
int main()
{
FloatVectorImageType::Pointer image = FloatVectorImageType::New();
Testing::GetBlankImage(image.GetPointer(), 4);
Mask::Pointer mask = Mask::New();
Testing::GetFullyValidMask(mask.GetPointer());
unsigned int patchRadius = 5;
PriorityCriminisi<itk::Index<2>, FloatVectorImageType> priority(image.GetPointer(), mask.GetPointer(), patchRadius);
itk::Index<2> filledPixel;
filledPixel.Fill(0);
priority.Update(filledPixel);
itk::Index<2> queryPixel = {{0,0}};
priority.ComputePriority(queryPixel);
return EXIT_SUCCESS;
}
示例3: main
int main(int argc, char *argv[])
{
if(argc < 3)
{
throw std::runtime_error("Required arguments: inputFileName outputPrefix");
}
std::string inputFileName = argv[1];
std::string outputPrefix = argv[2];
std::cout << "Input: " << inputFileName << std::endl;
std::cout << "Output prefix: " << outputPrefix << std::endl;
typedef itk::ImageFileReader<FloatVectorImageType> ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(inputFileName);
reader->Update();
ITKHelpers::WriteVectorImageAsRGB(reader->GetOutput(), outputPrefix + "/Image.mha");
WriteImagePixelsToRGBSpace(reader->GetOutput(), outputPrefix + "/ImageColors.vtp");
WriteClusteredPixelsInRGBSpace(reader->GetOutput(), 20, outputPrefix + "/ImageColorsClustered.vtp");
FloatVectorImageType::Pointer blurred = FloatVectorImageType::New();
//float blurVariance = 2.0f; // almost no visible blurring
//float blurVariance = 10.0f; // slight blurring of concrete
//float blurVariance = 30.0f;
// TODO: Update this call to the new API
//Helpers::AnisotropicBlurAllChannels<FloatVectorImageType>(reader->GetOutput(), blurred, blurVariance);
ITKHelpers::WriteVectorImageAsRGB(blurred.GetPointer(), outputPrefix + "/BlurredImage.mha");
WriteImagePixelsToRGBSpace(blurred, outputPrefix + "/BlurredImageColors.vtp");
WriteClusteredPixelsInRGBSpace(blurred, 20, outputPrefix + "/BlurredImageColorsClustered.vtp");
return EXIT_SUCCESS;
}
示例4: TestHasBracketOperator
bool TestHasBracketOperator()
{
{
typedef itk::CovariantVector<int, 3> IntVectorType;
static_assert(Helpers::HasBracketOperator<IntVectorType>::value,
"TestHasBracketOperator for CovariantVector<int, 3> failed!");
}
{
typedef itk::CovariantVector<unsigned char, 3> UCharVectorType;
static_assert(Helpers::HasBracketOperator<UCharVectorType>::value,
"TestHasBracketOperator for CovariantVector<unsigned char, 3> failed!");
}
{
typedef itk::CovariantVector<float, 3> FloatVectorType;
static_assert(Helpers::HasBracketOperator<FloatVectorType>::value,
"TestHasBracketOperator for CovariantVector<float, 3> failed!");
}
{
typedef itk::Image<itk::CovariantVector<float, 3>, 2> FloatVectorImageType;
static_assert(Helpers::HasBracketOperator<FloatVectorImageType::PixelType>::value,
"TestHasBracketOperator for CovariantVector<float, 3> failed!");
}
{
typedef itk::Image<itk::CovariantVector<float, 3>, 2> FloatVectorImageType;
FloatVectorImageType::Pointer image = FloatVectorImageType::New();
TestHasBracketOperator_Template(image.GetPointer());
}
{
typedef itk::Image<itk::CovariantVector<float, 3>, 2> FloatVectorImageType;
itk::SmartPointer<FloatVectorImageType> image = FloatVectorImageType::New();
TestHasBracketOperator_Template(image.GetPointer());
TestHasBracketOperator_ConstTemplate(image.GetPointer());
}
{
typedef itk::Image<itk::CovariantVector<float, 3>, 2> FloatVectorImageType;
TestHasBracketOperator_Template2<FloatVectorImageType>();
}
{
typedef itk::VariableLengthVector<int> VectorType;
static_assert(Helpers::HasBracketOperator<VectorType>::value,
"TestHasBracketOperator for VariableLengthVector failed!");
}
{
typedef std::vector<int> VectorType;
static_assert(Helpers::HasBracketOperator<VectorType>::value,
"TestHasBracketOperator for std::vector failed!");
}
// This (intentionally) fails
// {
// static_assert(Helpers::HasBracketOperator<float>::value,
// "TestHasBracketOperator for float failed!");
// }
return true;
}