[Insight-users] Problems with SetBoundaryCondition
Joshua Cates
cates at sci.utah.edu
Wed, 10 Mar 2004 12:53:09 -0700 (MST)
Hello,
If you create your own boundary condition object to manage and use in a
neighborhood iterator, you should pass a pointer to that boundary
condition object to the neighborhood iterator using
OverrideBoundaryCondition.
i.e.
itInput.OverrideBoundaryCondition(&boundaryCondition);
Just make sure that boundaryCondition is not destroyed before itInput.
Josh.
On Wed, 10 Mar 2004 475126 at unizar.es wrote:
> Hi all!
>
> I compile this:
>
> typedef itk::ConstantBoundaryCondition< ImageType > boundaryConditionType;
> typedef itk::ConstNeighborhoodIterator< ImageType, boundaryConditionType >
> NeighborhoodIteratorType;
>
> // Condicion de bordes
> boundaryConditionType boundaryCondition;
> boundaryCondition.SetConstant( 0 );
>
> // Definiciones de los iteradores
> // en la cara
> NeighborhoodIteratorType::RadiusType radius;
> radius.Fill(15);
> NeighborhoodIteratorType itInput( radius,readerInput->GetOutput(),
> readerInput->GetOutput()->GetLargestPossibleRegion() );
> itInput.SetBoundaryCondition( boundaryCondition );
>
> And I have this problem:
>
> Compiling...
> TemplateMatching.cpp
> C:dgnavarroInsightToolkit-1.4.0CodeCommonitkConstNeighborhoodIterator.h
> (356) : error C2248: '=' : cannot access private member declared in
> class 'itk::ConstantBoundaryCondition<class itk::Image<float,2> >'
> C:dgnavarroInsightToolkit-1.4.0
> CodeCommonitkConstantBoundaryCondition.h(96) : see declaration of '='
> C:dgnavarroInsightToolkit-1.4.0
> CodeCommonitkConstNeighborhoodIterator.h(356) : while compiling class-
> template member function 'void __thiscall itk::ConstNeighborhoodIterator<class
> itk::Image<float,2>,class itk::ConstantBoundaryCondition
> <class itk::Image<float,2> > >::SetBoundaryCondition(const class
> itk::ConstantBoundaryCondition<class itk::Image<float,2> > &)'
> Error executing cl.exe.
>
> TemplateMatching.exe - 1 error(s), 0 warning(s)
>
> Could someone help me? I think that, is for the overloaded of the operator =
> But I am not sure.
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>