#ifndef __Blank_DefOrgViewerAdapter_h #define __Blank_DefOrgViewerAdapter_h #include "itkImageFileReader.h" #include "itkImageFileWriter.h" //#include "itkMeanImageFilter.h" //#include "itkBinaryThresholdImageFilter.h" //#include "itkCovariantVector.h" #include //#include "itkOrganism.h" //#include "Phys_Euler.h" //#include "Ctrl_ScheduleDriven.h" //#include "Beh_TranslateAll.h" //#include "Def_Translation.h" //#include "Sense_Gradient.h" //#include "Geom_MeshSpatialObject.h" //#include "Phys_LevelSet.h" #include "DefOrgViewerAdapterBaseTemplated.h" #include #include namespace mial{ #define N_DIMS 3 typedef unsigned char PixelType; typedef float DataType; /*!This is the template for generating new DefOrg skeleton code*/ class Blank_DefOrgViewerAdapter:public DefOrgViewerAdapterBaseTemplated{ public: // typedefs for the defOrg: /*typedef Geom_MeshSpatialObject< DataType, N_DIMS > GeometricType; typedef itk::CovariantVector< DataType, N_DIMS > GradientPixelType; typedef itk::Image< GradientPixelType, N_DIMS > GradientImageType; typedef Phys_LevelSet< DataType, ImageType, N_DIMS > LevelSetPhysicsType; typedef Phys_Euler< DataType, GradientImageType, N_DIMS > EulerPhysicsType; typedef Sense_Gradient< DataType, ImageType, GradientImageType, N_DIMS > GradientSensorType; typedef Ctrl_ScheduleDriven CognitiveType; typedef Beh_TranslateAll Beh_TranslateAllType; typedef Def_Translation Def_TranslateAllType; typedef itk::ItkOrganism < ImageType, ImageType, GradientImageType, DataType, N_DIMS > OrganismType; typedef itk::DefaultDynamicMeshTraits< DataType, N_DIMS, N_DIMS > MeshTrait; typedef itk::Mesh< DataType, N_DIMS, MeshTrait > MeshType; typedef MeshType::Pointer MeshTypePointer;*/ /*!Constructor should define the property the organism exposes at run-time using AddOrganismProperty helper method*/ Blank_DefOrgViewerAdapter(); /*!This method is called when the user presses "Initialize/Setup organism from the GUI. The adapter should initialize the organism appropriately.*/ virtual void SetupOrganism(); /*!This method is called during each organism step. In this method, the adapter should indicate which outputs are modified, and call run on the organism.*/ virtual void UpdateOrganism(); /*!This method is called when the user presses Load Image*/ virtual void PopulateVtkImage(); /*!This method is currently not used. This method is originally for displaying meshes when SOViewer was not used*/ virtual void PopulateVtkUnstructuredGrid(vtkUnstructuredGrid* vtkGrid /*in/out*/); /*!This method is called when the user presses Load Mesh*/ virtual void PopulateItkScene(); /*!This method is called when the user changes the DefOrg. It is the responsibility of the adapter to update the internal data structure of the DefOrg. The user transformation argument supplies the transformation that is specified visually by the user*/ virtual void HandleUserMouseInteraction(vtkTransform* userTransformation); /*!Should return n, the number of ItkSpatialObjects this organism exports. The viewer would create n-1 secondary windows for Spatial objects. The output of the spatialoutputs are usually assigned to during PopulateItkScene() and UpdateOrganism() The primary output will be displayed in the primary window*/ virtual int MaxNumberOfOutputItkSpatialObjects(); /*!Should return n, the number of Image volumes this organism exports. The viewer would create n-1 secondary windows for images. The output of the image volumes are usually assigned to during PopulateVtkImage() and UpdateOrganism() The primary output will be displayed in the primary window*/ virtual int MaxNumberOfOutputImages(); private: /*OrganismType::Pointer testOrg; LevelSetPhysicsType levelSetPhysLayer; EulerPhysicsType* eulerPhysLayerPointer; GradientSensorType::sensorIn sensorInput; GradientSensorType gradientSensor; GeometricType* geomLayerPointer; CognitiveType* cognitiveLayerPointer; Beh_TranslateAllType* beh1; Def_TranslateAllType* def1; */ }; } #endif