/*============================================================================= NOTE: THIS FILE IS A HANDMADE WRAPPER FOR THE ManagedITK PROJECT. Project: ManagedITK Program: Insight Segmentation & Registration Toolkit Module: itkManagedSpatialObjectBase.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 __itkManagedSpatialObject_cxx #define __itkManagedSpatialObject_cxx // Include some useful ManagedITK files #include "itkManagedObject.cxx" #include "itkManagedDataObject.cxx" #include "itkManagedArray.cxx" #include "itkManagedPoint.cxx" #include "itkManagedVector.cxx" #include "itkManagedSpacing.cxx" #include "itkManagedTransform.cxx" #include "itkManagedImageRegion.cxx" // Use some managed namespaces #using #using using namespace System; using namespace System::IO; using namespace System::Reflection; using namespace System::Diagnostics; using namespace System::Collections::Generic; namespace itk { /// ///This abstract class is a managed replacement for itk::SpatialObject. /// public ref class itkSpatialObjectBase abstract : itkDataObject { public: ///Get the object dimensions. property unsigned int ObjectDimension { virtual unsigned int get() = 0; } ///Get the SpatialObject type string. property String^ TypeName { virtual String^ get() = 0; } ///Get the SpatialObject type string. property String^ SpatialObjectTypeAsString { virtual String^ get() = 0; } ///Get/set the ObjectToWorldTransform (a ScalableAffineTransform). property itkTransform^ ObjectToWorldTransform { virtual itkTransform^ get() = 0; virtual void set(itkTransform^ transform) = 0; } ///Get/set the ObjectToParentTransform (a ScalableAffineTransform). property itkTransform^ ObjectToParentTransform { virtual itkTransform^ get() = 0; virtual void set(itkTransform^ transform) = 0; } /// ///Get/set the region object that defines the size and starting index ///for the largest possible region this SpatialObject could represent. /// property itkImageRegion^ LargestPossibleRegion { virtual itkImageRegion^ get() = 0; virtual void set ( itkImageRegion^ region ) = 0; } /// ///Get/set the region object that defines the size and starting index ///for the region of the SpatialObject requested (i.e., the region of the ///image to be operated on by a filter). Setting the RequestedRegion ///does not cause the object to be modified. /// property itkImageRegion^ RequestedRegion { virtual itkImageRegion^ get() = 0; virtual void set ( itkImageRegion^ region ) = 0; } /// ///Get/set the region object that defines the size and starting index ///of the region of the SpatialObject currently loaded in memory. /// property itkImageRegion^ BufferedRegion { virtual itkImageRegion^ get() = 0; virtual void set ( itkImageRegion^ region ) = 0; } ///Get/set the spacing. property itkSpacing^ Spacing { virtual itkSpacing^ get() = 0; virtual void set( itkSpacing^ spacing ) = 0; } /// ///Compute the World transform when the local transform is set ///This function should be called each time the local transform ///has been modified. /// virtual void ComputeObjectToWorldTransform ( ) = 0; /// ///Compute the Local transform when the global transform is set. /// virtual void ComputeObjectToParentTransform ( ) = 0; /// ///Returns the value at a point. /// virtual bool ValueAt ( itkPoint^ point, double & value ) = 0; /// ///Returns true if the object can provide a "meaningful" value at ///a point. Often defaults to returning same answer as IsInside, but ///certain objects influence space beyond their spatial extent. /// virtual bool IsEvaluableAt ( itkPoint^ point ) = 0; /// ///Returns true if a point is inside the object. /// virtual bool IsInside ( itkPoint^ point ) = 0; /// ///Add an object to the list of children. /// virtual void AddSpatialObject ( itkSpatialObjectBase^ object ) = 0; /// ///Remove the object passed as arguments from the list of children. /// virtual void RemoveSpatialObject ( itkSpatialObjectBase^ object ) = 0; /// ///Set the native pointer of the given object to the parent object in the hierarchy tree. /// virtual void GetParent ( itkSpatialObjectBase^ parent ) = 0; /// ///Clear the spatial object by deleting all lists of children and subchildren. /// virtual void Clear ( ) = 0; /// ///Return the number of children directly under this SpatialObject. /// virtual unsigned int GetNumberOfChildren ( ) = 0; /// ///Return the number of children under this SpatialObject to the given depth. /// virtual unsigned int GetNumberOfChildren ( unsigned int depth ) = 0; /// ///Returns a list of pointer to the children affiliated to this object. ///A depth of 0 returns the immediate childred. A depth of 1 returns the ///children and those children's children. /// virtual array^ GetChildren ( unsigned int depth ) = 0; }; // end ref class } // end namespace itk #endif