[Insight-users] Deformable Model on 2D Image
groucho
grouchospace at gmail.com
Thu Jul 21 08:54:19 EDT 2005
Hi all,
I have some problems using Deformable Model.
I want to use a Deformable Model on a 2D Image.
I tried to use a DeformableMesh3DFilter on a 2D Image and I had an
error at this line
deformableModelFilter->SetGradient(gradientMapFilter->GetOutput());
/home/pier/tesi/codeWork/toolTesi.cpp:1045: error: no matching
function for call to `itk::DeformableMesh3DFilter<main(int,
char**)::MeshType, main(int,
char**)::MeshType>::SetGradient(main(int, char**)::GradientImageType*)'
/usr/local/InsightToolkit-2.0.1/Code/Algorithms/itkDeformableMesh3DFilter.h:133:
error: candidates are: void
itk::DeformableMesh3DFilter<TInputMesh,TOutputMesh>::SetGradient(typename
itk::Image<itk::CovariantVector<typename
TInputMesh::PixelType, 3>, 3>::Pointer) [with TInputMesh =
main(int,char**)::MeshType, TOutputMesh = main(int,
I defined GradientPixelType and GradientImageType in this way because I work
with 2D Image: (ExtractImageType is a type of 2D image)
typedef itk::CovariantVector< double, 2> GradientPixelType;
typedef itk::Image< GradientPixelType, 2> GradientImageType;
typedef itk::GradientRecursiveGaussianImageFilter<ExtractImageType,GradientImageType>
GradientFilterType;
typedef itk::DeformableMesh3DFilter<MeshType,MeshType> DeformableFilterType;
Is it correct?
Is it possible to use DeformableMesh3DFilter on a 2D Image?
I tried also to execute the example DeformableModel1 with a 2D image
passing as InputImage BrainProtonDensitySlice.png, as BinaryImage the
output of the
ConfidenceConneted filter ConfidenceConnectedOutput1.png, as suggested
in the older version of the itkSoftwareGuide.
./DeformableModel1 /home/pier/BrainProtonDensitySlice.png
/home/pier/ConfidenceConnectedOutput1.png
/home/pier/DeformableModelOutput.png
Exception caught when updating gradientMapFilter
itk::ExceptionObject (0x83147d0)
Location: "Unknown"
File:/usr/InsightToolkit-2.0.1/Code/BasicFilters/itkRecursiveSeparableImageFilter.txx
Line: 244
Description: itk::ERROR: RecursiveGaussianImageFilter(0x83082a0): The number
of pixels along direction 2 is less than 4. This filter requires a minimum of
four pixels along the dimension to be processed.
Bye
Piergiorgio
More information about the Insight-users
mailing list