[Insight-users] AND/OR cross-structing elements: Further questions

Luis Ibanez luis . ibanez at kitware . com
Sat, 06 Dec 2003 15:51:19 -0500


Hi Radhika,

Thanks for posting your code.

The problem is with the instantiation of the Mathematical
Morphology structuring element.  It should be instantiated
with PixelType and Dimension and you are using the *Image*
type and dimension.

Please look carefully at the example in the SoftwareGuide:

        http://www . itk . org/ItkSoftwareGuide . pdf

Section 6.4.3, pdf-page 161.

Note also that an OR boolean image filter has been added
to the CVS version of the toolkit

http://www . itk . org/Insight/Doxygen/html/classitk_1_1OrImageFilter . html

you can easily build an AND image filter from it too.



Regards,


   Luis


-----------------------------
Radhika Sivaramakrishna wrote:

> Hi Jim and Luis,
> 
> Thanks for your very prompt answers regarding AND, OR and 
> cross-structuring element. I put my little program together
> 
> with all this, but got multiple errors. I have enclosed a copy of the 
> program as well as the errors I am getting.
> 
> Can someone help me figure out what is happening? I basically copied 
> many of the commands from the Example
> 
> MathematicalMorphologyBinaryFilters.cxx and added in my own statements 
> for AND and OR.
> 
>  
> 
> Your help is really appreciated.
> 
>  
> 
> Radhika
> 
>  
> 
> -----------------------------------------------------
> 
> Confidentiality Notice.
> 
> This email message is for the sole use of the intended recipient(s) and 
> may contain confidential and privileged information. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not 
> the intended recipient, please contact the sender by reply email and 
> destroy all copies of the original message. If you are the intended 
> recipient, please be advised that the content of this message is subject 
> to access, review and disclosure by the sender's Email System Administrator.
> 
> 
> ------------------------------------------------------------------------
> 
> make[1]: *** Warning: File `/home/rsivaram/BSI/ITK-BSI/BSI.cxx' has modification time in the future (2003-12-05 09:33:52 > 2003-12-05 09:33:14.345473)
> Building dependencies cmake.check_depends...
> make[1]: warning:  Clock skew detected.  Your build may be incomplete.
> make[1]: *** Warning: File `cmake.check_depends' has modification time in the future (2003-12-05 09:35:43 > 2003-12-05 09:33:17.133847)
> make[2]: *** Warning: File `cmake.check_depends' has modification time in the future (2003-12-05 09:35:43 > 2003-12-05 09:33:17.162586)
> make[2]: warning:  Clock skew detected.  Your build may be incomplete.
> make[2]: *** Warning: File `cmake.check_depends' has modification time in the future (2003-12-05 09:35:43 > 2003-12-05 09:33:17.277135)
> make[2]: warning:  Clock skew detected.  Your build may be incomplete.
> make[1]: warning:  Clock skew detected.  Your build may be incomplete.
> make[1]: *** Warning: File `cmake.depends' has modification time in the future (2003-12-05 09:35:43 > 2003-12-05 09:33:17.385812)
> Building object file BSI.o...
> In file included from /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.h:107,
>                  from /home/rsivaram/BSI/ITK-BSI/BSI.cxx:7:
> /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.txx: In
>    member function `void itk::BinaryCrossStructuringElement<TPixel, VDimension,
>    TAllocator>::CreateStructuringElement()':
> /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.txx:51: warning: `
>    typename itk::BinaryCrossStructuringElement<TPixel, VDimension,
>    TAllocator>::OffsetType' is implicitly a typename
> /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.txx:51: warning: implicit
>    typename is deprecated, please see the documentation for details
> /home/rsivaram/Insight/Code/Common/itkImage.h: In member function `void
>    itk::BinaryCrossStructuringElement<TPixel, VDimension,
>    TAllocator>::CreateStructuringElement() [with TPixel = main(int,
>    char**)::InputImageType, unsigned int VDimension = 3, TAllocator =
>    itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]':
> /home/rsivaram/BSI/ITK-BSI/BSI.cxx:89:   instantiated from here
> /home/rsivaram/Insight/Code/Common/itkImage.h:349: `void itk::Image<TPixel,
>    VImageDimension>::operator=(const itk::Image<TPixel, VImageDimension>&)
>    [with TPixel = InputPixelType, unsigned int VImageDimension = 3]' is private
> /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.txx:43: within
>    this context
> /home/rsivaram/BSI/ITK-BSI/BSI.cxx:89:   instantiated from here
> /home/rsivaram/Insight/Code/Common/itkImage.h:349: `void itk::Image<TPixel,
>    VImageDimension>::operator=(const itk::Image<TPixel, VImageDimension>&)
>    [with TPixel = InputPixelType, unsigned int VImageDimension = 3]' is private
> /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.txx:53: within
>    this context
> /home/rsivaram/BSI/ITK-BSI/BSI.cxx:89:   instantiated from here
> /home/rsivaram/Insight/Code/Common/itkImage.h:349: `void itk::Image<TPixel,
>    VImageDimension>::operator=(const itk::Image<TPixel, VImageDimension>&)
>    [with TPixel = InputPixelType, unsigned int VImageDimension = 3]' is private
> /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.txx:59: within
>    this context
> /home/rsivaram/Insight/Code/Common/itkImage.h: In member function `const
>    itk::NeighborhoodAllocator<TPixel>&
>    itk::NeighborhoodAllocator<TPixel>::operator=(const
>    itk::NeighborhoodAllocator<TPixel>&) [with TPixel = main(int,
>    char**)::InputImageType]':
> /home/rsivaram/Insight/Code/Common/itkNeighborhood.txx:109:   instantiated from `itk::Neighborhood<TPixel, VDimension, TAllocator>::Neighborhood(const itk::Neighborhood<TPixel, VDimension, TAllocator>&) [with TPixel = main(int, char**)::InputImageType, unsigned int VDimension = 3, TAllocator = itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]'
> /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.h:85:   instantiated from `itk::BinaryCrossStructuringElement<TPixel, VDimension, TAllocator>::BinaryCrossStructuringElement(const itk::BinaryCrossStructuringElement<TPixel, VDimension, TAllocator>&) [with TPixel = main(int, char**)::InputImageType, unsigned int VDimension = 3, TAllocator =
> itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]'
> /home/rsivaram/BSI/ITK-BSI/BSI.cxx:93:   instantiated from here
> /home/rsivaram/Insight/Code/Common/itkImage.h:349: `void itk::Image<TPixel,
>    VImageDimension>::operator=(const itk::Image<TPixel, VImageDimension>&)
>    [with TPixel = InputPixelType, unsigned int VImageDimension = 3]' is private
> /home/rsivaram/Insight/Code/Common/itkNeighborhoodAllocator.h:83: within this
>    context
> /home/rsivaram/Insight/Code/Common/itkImage.h: In member function `void
>    itk::NeighborhoodAllocator<TPixel>::Deallocate() [with TPixel = main(int,
>    char**)::InputImageType]':
> /home/rsivaram/Insight/Code/Common/itkNeighborhoodAllocator.h:53:   instantiated from `void itk::NeighborhoodAllocator<TPixel>::NeighborhoodAllocator() [with TPixel = main(int, char**)::InputImageType]'
> /home/rsivaram/Insight/Code/Common/itkNeighborhood.h:89:   instantiated from `itk::Neighborhood<TPixel, VDimension, TAllocator>::Neighborhood() [with TPixel = main(int, char**)::InputImageType, unsigned int VDimension = 3, TAllocator = itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]'
> /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.h:77:   instantiated from `itk::BinaryCrossStructuringElement<TPixel, VDimension, TAllocator>::BinaryCrossStructuringElement() [with TPixel = main(int, char**)::InputImageType, unsigned int VDimension = 3, TAllocator = itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]'
> /home/rsivaram/BSI/ITK-BSI/BSI.cxx:85:   instantiated from here
> /home/rsivaram/Insight/Code/Common/itkImage.h:346: `void itk::Image<TPixel,
>    VImageDimension>::Image() [with TPixel = InputPixelType, unsigned int
>    VImageDimension = 3]' is protected
> /home/rsivaram/Insight/Code/Common/itkNeighborhoodAllocator.h:65: within this
>    context
> /home/rsivaram/Insight/Code/Common/itkImage.txx: In member function `void
>    itk::NeighborhoodAllocator<TPixel>::Allocate(unsigned int) [with TPixel =
>    main(int, char**)::InputImageType]':
> /home/rsivaram/Insight/Code/Common/itkNeighborhoodAllocator.h:122:   instantiated from `void itk::NeighborhoodAllocator<TPixel>::resize(unsigned int) [with TPixel = main(int, char**)::InputImageType]'
> /home/rsivaram/Insight/Code/Common/itkNeighborhood.h:223:   instantiated from `void itk::Neighborhood<TPixel, VDimension, TAllocator>::Allocate(unsigned int) [with TPixel = main(int, char**)::InputImageType, unsigned int VDimension = 3, TAllocator = itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]'
> /home/rsivaram/Insight/Code/Common/itkNeighborhood.txx:98:   instantiated from `void itk::Neighborhood<TPixel, VDimension, TAllocator>::SetRadius(const itk::Size<VImageDimension>&) [with TPixel = main(int, char**)::InputImageType, unsigned
> int VDimension = 3, TAllocator = itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]'
> /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.txx:35:   instantiated from `void itk::BinaryCrossStructuringElement<TPixel, VDimension, TAllocator>::CreateStructuringElement() [with TPixel = main(int, char**)::InputImageType, unsigned int VDimension = 3, TAllocator = itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]'
> /home/rsivaram/BSI/ITK-BSI/BSI.cxx:89:   instantiated from here
> /home/rsivaram/Insight/Code/Common/itkImage.txx:35: `itk::Image<TPixel,
>    VImageDimension>::Image() [with TPixel = InputPixelType, unsigned int
>    VImageDimension = 3]' is protected
> /home/rsivaram/Insight/Code/Common/itkNeighborhoodAllocator.h:58: within this
>    context
> /home/rsivaram/Insight/Code/Common/itkNeighborhoodAllocator.h:122:   instantiated from `void itk::NeighborhoodAllocator<TPixel>::resize(unsigned int) [with TPixel = main(int, char**)::InputImageType]'
> /home/rsivaram/Insight/Code/Common/itkNeighborhood.h:223:   instantiated from `void itk::Neighborhood<TPixel, VDimension, TAllocator>::Allocate(unsigned int) [with TPixel = main(int, char**)::InputImageType, unsigned int VDimension = 3, TAllocator = itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]'
> /home/rsivaram/Insight/Code/Common/itkNeighborhood.txx:98:   instantiated from `void itk::Neighborhood<TPixel, VDimension, TAllocator>::SetRadius(const itk::Size<VImageDimension>&) [with TPixel = main(int, char**)::InputImageType, unsigned
> int VDimension = 3, TAllocator = itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]'
> /home/rsivaram/Insight/Code/Common/itkBinaryCrossStructuringElement.txx:35:   instantiated from `void itk::BinaryCrossStructuringElement<TPixel, VDimension, TAllocator>::CreateStructuringElement() [with TPixel = main(int, char**)::InputImageType, unsigned int VDimension = 3, TAllocator = itk::NeighborhoodAllocator<main(int, char**)::InputImageType>]'
> /home/rsivaram/BSI/ITK-BSI/BSI.cxx:89:   instantiated from here
> /home/rsivaram/Insight/Code/Common/itkImage.h:346: `void itk::Image<TPixel,
>    VImageDimension>::Image() [with TPixel = InputPixelType, unsigned int
>    VImageDimension = 3]' is protected
> /home/rsivaram/Insight/Code/Common/itkNeighborhoodAllocator.h:58: within this
>    context
> make[1]: *** [BSI.o] Error 1
> make: *** [default_target] Error 2