/*============================================================================= NOTE: THIS FILE IS A HANDMADE WRAPPER FOR THE ManagedITK PROJECT. Project: ManagedITK Program: Insight Segmentation & Registration Toolkit Module: itkManagedNeighborhood.cxx Language: C++/CLI Author: Dan Mueller Date: $Date: 2007-09-01 06:17:25 +1000 (Sat, 01 Sep 2007) $ Revision: $Revision: 2 $ Copyright (c) Queensland University of Technology (QUT) 2007. All rights reserved. Portions of this code are covered under the ITK and VTK copyright. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =============================================================================*/ #pragma once #pragma warning( disable : 4635 ) // Disable warnings about XML doc comments #ifndef __itkManagedNeighborhood_cxx #define __itkManagedNeighborhood_cxx // Include some useful ManagedITK files #include "itkManagedSize.cxx" #include "itkManagedOffset.cxx" #include "itkManagedPixelType.cxx" #include "itkManagedPixel.cxx" // Use some managed namespaces #using #using using namespace System; using namespace System::IO; using namespace System::Reflection; using namespace System::Diagnostics; namespace itk { /// ///This class is a managed wrapper for itk::Neighborhood. /// public ref class itkNeighborhood abstract : System::Collections::IEnumerable, itk::INativePointer { protected: String^ m_MangledTypeString; public: ///Default constructor. itkNeighborhood(){} /// ///Get/set the pointer to the native ITK object associated with ///this wrapper instance. /// ///The pointer to the native ITK object. property void* NativePointer{ virtual void* get()=0; virtual void set ( void* value )=0; } ///Get a string representing the type instance of this INativePointer. ///"IUC2", "IF3", "IUC2IUC2". property String^ MangledTypeString { virtual String^ get() { return this->m_MangledTypeString; } } ///Get the size (the total length of the sides) of the neighborhood. property itkSize^ Size { virtual itkSize^ get()=0; } ///Get/set the radius of the neighborhood. property itkSize^ Radius { virtual itkSize^ get()=0; virtual void set(itkSize^ value)=0; } ///Returns the radius of the neighborhood along a specified dimension. virtual unsigned long GetRadius(const unsigned long n) = 0; ///Returns the size (total length) of the neighborhood along a specified dimension. virtual unsigned long GetSize(const unsigned long n) = 0; ///Returns the element at the center of the neighborhood. virtual itkPixel^ GetCenterValue() = 0; ///Returns the array index of the element at the given offset. virtual unsigned int GetNeighborhoodIndex(itkOffset^ offset) = 0; ///Returns the array index of the center element. virtual unsigned int GetCenterNeighborhoodIndex() = 0; ///Returns pixel value in the buffer at the given index. virtual itkPixel^ GetElement(unsigned int i) = 0; ///Allow index access to the buffer. virtual itkPixel^ operator[] (unsigned int i) = 0; ///Implement the IEnumerable interface. virtual System::Collections::IEnumerator^ GetEnumerator() = 0; }; // end ref class } // end namespace itk #endif