#if defined (_MSC_VER) && (_MSC_VER >= 1000) #pragma once #endif #ifndef _INC_SENSOR_422B62DD00AB_INCLUDED #define _INC_SENSOR_422B62DD00AB_INCLUDED #include "itkSmartPointer.h" #include #include "itkObjectFactory.h" namespace mial { //! Sensors provide the organism with its view of the world /*! Sensors provide the deformable organisms with their view of the world. They provide a means by which to gather statistics and characteristics of its own geometry and the world in which it resides. In order to run a sensor one must use its publicly defined sensorIn and sensorOut types to create the input arguments and receive the output. This allows maximum flexibility in the parameters a sensor can have, while still enabling any sensor to be ran abstractly. */ class Sensor:public itk::LightObject { public: //Smartpointers typedef Sensor Self; typedef itk::SmartPointer Pointer; typedef itk::SmartPointer ConstPointer; //typedef itk::WeakPointer ConstWeakPointer; //itkNewMacro(Self); //! A structure defining the inputs of a sensor. /*! Since structures support public inheritance derived class must inherit from this class in their definitions of sensorIn. */ struct sensorIn:public itk::LightObject{ //Define all common sensory outputs here typedef sensorIn Self; typedef itk::SmartPointer Pointer; itkNewMacro(Self); sensorIn(const sensorIn &){}; protected: sensorIn(){}; }; //! A structure defining the output of a sensor. /*! Since structures support public inheritance derived class must inherit from this class in their definitions of sensorOut. */ struct sensorOut:public itk::LightObject{ //Define all common sensory outputs here typedef sensorOut Self; typedef itk::SmartPointer Pointer; typedef itk::SmartPointer ConstPointer; //typedef itk::WeakPointer ConstWeakPointer; itkNewMacro(Self); protected: sensorOut(){}; }; //! Pure virtual public member function. New sensors operations are defined and run by implementing this method in a derived class. virtual void run(sensorIn* const i) =0; //! virtual sensorOut::Pointer getOutput(){ return sensorOutput;}; protected: sensorOut::Pointer sensorOutput; Sensor(){}; }; } // end namespace mial #include "Sensor.cxx" #endif /* _INC_SENSOR_422B62DD00AB_INCLUDED */