#include <DefOrgViewerAdapterBase.h>
Inheritance diagram for mial::DefOrgViewerAdapterBase:
Public Member Functions | |
DefOrgViewerAdapterBase (int maxNumImages) | |
virtual bool | IsAllInputFilesSet () |
virtual void | SetupOrganism ()=0 |
virtual void | UpdateOrganism ()=0 |
virtual void | PopulateVtkImage ()=0 |
virtual void | PopulateVtkUnstructuredGrid (vtkUnstructuredGrid *vtkGrid)=0 |
virtual void | PopulateItkScene ()=0 |
virtual void | HandleUserMouseInteraction (vtkTransform *userTransformation)=0 |
virtual int | MaxNumberOfOutputItkSpatialObjects ()=0 |
virtual unsigned int | MaxNumberOfOutputImages ()=0 |
virtual void | AddOutputItkSpatialObjects (itkScenePointer itkScene) |
virtual void | AddOutputImages (vtkImageImport *vtkImporter, int Offset) |
Public Attributes | |
std::map< std::string, DefOrgPropertyStruct > | m_PropertyBag |
std::vector< DefOrgLayerStruct > | m_LayerBag |
std::vector< SpatialObjectDescriptorStruct > | m_OutputItkSpatialObjects |
std::vector< OutputImageDescriptorStruct > | m_OutputImages |
std::ostringstream | theDefOrgTextOutput |
std::stringstream | theDefOrgTextInput |
Protected Member Functions | |
virtual void | AddOrganismProperty (const char *propertyName, double lowerBound, double upperBound, double defaultValue, double resolution=1.0, const char *helpString="") |
virtual double | GetOrganismProperty (const char *propertyName) |
virtual void | AddLayer (const char *layerName, const char **options, int numChoices) |
virtual const char * | GetLayer (const char *layerName) |
Protected Attributes | |
bool | m_Initialized |
std::string | m_ImageFileName |
std::string | m_ScheduleFileName |
std::string | m_MeshFileName |
Definition at line 137 of file DefOrgViewerAdapterBase.h.
void mial::DefOrgViewerAdapterBase::AddLayer | ( | const char * | layerName, | |
const char ** | options, | |||
int | numChoices | |||
) | [protected, virtual] |
Helper method to allow a combox to be displayed, allowing the user to choose which instance of a layer to attach
Definition at line 4 of file DefOrgViewerAdapterBase.cxx.
References mial::DefOrgLayerStruct::layerName, m_LayerBag, and mial::DefOrgLayerStruct::options.
virtual void mial::DefOrgViewerAdapterBase::AddOrganismProperty | ( | const char * | propertyName, | |
double | lowerBound, | |||
double | upperBound, | |||
double | defaultValue, | |||
double | resolution = 1.0 , |
|||
const char * | helpString = "" | |||
) | [inline, protected, virtual] |
Helper method to allow numeric properties to be added in derived adapter's constructor
propertyName | Name of the property | |
lowerBound | Lower bound of the numeric property | |
upperBound | Upper bound of the numeric property | |
defaultValue | Default Value of the numeric property | |
resolution | By what value will the current value be incremented when the slicer is adjusted | |
helpString | Optional help string describing this property |
Definition at line 223 of file DefOrgViewerAdapterBase.h.
References m_PropertyBag.
Referenced by mial::BasicDefOrg_DefOrgViewerAdapter::BasicDefOrg_DefOrgViewerAdapter(), and mial::DefOrgAdapter_VesselCrawler::DefOrgAdapter_VesselCrawler().
virtual void mial::DefOrgViewerAdapterBase::AddOutputImages | ( | vtkImageImport * | vtkImporter, | |
int | Offset | |||
) | [inline, virtual] |
For viewer. Derived class should not call this method
Definition at line 203 of file DefOrgViewerAdapterBase.h.
References m_OutputImages.
Referenced by vtkDefOrgViewerWithKW::InitializeState().
virtual void mial::DefOrgViewerAdapterBase::AddOutputItkSpatialObjects | ( | itkScenePointer | itkScene | ) | [inline, virtual] |
For viewer. Derived class should not call this method
Definition at line 198 of file DefOrgViewerAdapterBase.h.
References m_OutputItkSpatialObjects.
Referenced by vtkDefOrgViewerWithKW::InitializeState().
const char * mial::DefOrgViewerAdapterBase::GetLayer | ( | const char * | layerName | ) | [protected, virtual] |
Helper method to get the name of the layer assigned
Definition at line 13 of file DefOrgViewerAdapterBase.cxx.
References m_LayerBag.
virtual double mial::DefOrgViewerAdapterBase::GetOrganismProperty | ( | const char * | propertyName | ) | [inline, protected, virtual] |
Return the value of the property as obtained through the GUI
propertyName | Name of the property |
Definition at line 229 of file DefOrgViewerAdapterBase.h.
References m_PropertyBag.
Referenced by mial::BasicDefOrg_DefOrgViewerAdapter::SetupOrganism().
virtual void mial::DefOrgViewerAdapterBase::HandleUserMouseInteraction | ( | vtkTransform * | userTransformation | ) | [pure virtual] |
Derived class should override this method to make use of the supplied userTransformation matrix
Implemented in mial::BasicDefOrg_DefOrgViewerAdapter, mial::Blank_DefOrgViewerAdapter, and mial::DefOrgAdapter_VesselCrawler.
Referenced by vtkMyCallback::Execute().
virtual bool mial::DefOrgViewerAdapterBase::IsAllInputFilesSet | ( | ) | [inline, virtual] |
Viewer will query this method to see if all three required files are set. If they are, it means the DefOrg can now be initialized
Reimplemented in mial::DefOrgAdapter_VesselCrawler.
Definition at line 151 of file DefOrgViewerAdapterBase.h.
References m_ImageFileName, m_MeshFileName, and m_ScheduleFileName.
virtual unsigned int mial::DefOrgViewerAdapterBase::MaxNumberOfOutputImages | ( | ) | [pure virtual] |
Derived class should override this method to let DefOrgViewer know how many output Image Volumes this DefOrg wants
Implemented in BasicDefOrg_DefOrgViewerAdapter, mial::BasicDefOrg_DefOrgViewerAdapter, mial::Blank_DefOrgViewerAdapter, and mial::DefOrgAdapter_VesselCrawler.
Referenced by vtkDefOrgViewerWithKW::CreateVolumeRenderingFrame(), vtkDefOrgViewerWithKW::InitializeState(), vtkDefOrgViewerWithKW::SetVolumeRenderingControlBoxCallback(), and vtkDefOrgViewerWithKW::UpdateImageViewers().
virtual int mial::DefOrgViewerAdapterBase::MaxNumberOfOutputItkSpatialObjects | ( | ) | [pure virtual] |
Derived class should override this method to let DefOrgViewer know how many output Spatial Objects this DefOrg wants
Implemented in BasicDefOrg_DefOrgViewerAdapter, mial::BasicDefOrg_DefOrgViewerAdapter, mial::Blank_DefOrgViewerAdapter, and mial::DefOrgAdapter_VesselCrawler.
Referenced by vtkDefOrgViewerWithKW::AddActorsFromSOViewers(), vtkDefOrgViewerWithKW::InitializeState(), vtkDefOrgViewerWithKW::LoadMeshDialogCallback(), vtkDefOrgViewerWithKW::RemoveActorsFromSOViewers(), vtkDefOrgViewerWithKW::RenderSOViewers(), and vtkDefOrgViewerWithKW::SetScenesToSOViewers().
virtual void mial::DefOrgViewerAdapterBase::PopulateItkScene | ( | ) | [pure virtual] |
Derived class should provide a itkScene that it wants to display when the mesh is first loaded (optional)
Implemented in BasicDefOrg_DefOrgViewerAdapter, mial::BasicDefOrg_DefOrgViewerAdapter, mial::Blank_DefOrgViewerAdapter, mial::DefOrgViewerAdapterBaseTemplated< ITKPIXELTYPE, MESHDATATYPE >, mial::DefOrgAdapter_VesselCrawler, and mial::DefOrgViewerAdapterBaseTemplated< unsigned char, float >.
Referenced by vtkDefOrgViewerWithKW::LoadMeshDialogCallback().
virtual void mial::DefOrgViewerAdapterBase::PopulateVtkImage | ( | ) | [pure virtual] |
Derived class should provide a vtkImage that it wants to display when the Image Volumes is first loaded (optional)
Implemented in BasicDefOrg_DefOrgViewerAdapter, mial::BasicDefOrg_DefOrgViewerAdapter, mial::Blank_DefOrgViewerAdapter, mial::DefOrgViewerAdapterBaseTemplated< ITKPIXELTYPE, MESHDATATYPE >, mial::DefOrgAdapter_VesselCrawler, and mial::DefOrgViewerAdapterBaseTemplated< unsigned char, float >.
Referenced by vtkDefOrgViewerWithKW::LoadImageDialogCallback().
virtual void mial::DefOrgViewerAdapterBase::PopulateVtkUnstructuredGrid | ( | vtkUnstructuredGrid * | vtkGrid | ) | [pure virtual] |
Currently not used. Replaced with ItkScene and SOViewer
Implemented in BasicDefOrg_DefOrgViewerAdapter, mial::BasicDefOrg_DefOrgViewerAdapter, mial::Blank_DefOrgViewerAdapter, mial::DefOrgViewerAdapterBaseTemplated< ITKPIXELTYPE, MESHDATATYPE >, mial::DefOrgAdapter_VesselCrawler, and mial::DefOrgViewerAdapterBaseTemplated< unsigned char, float >.
virtual void mial::DefOrgViewerAdapterBase::SetupOrganism | ( | ) | [pure virtual] |
Viewer will call this method as instructed from GUI. Derived class should initialize the organism itself using the DefOrg properties (via GetOrganismProperty) supplied through the GUI
Implemented in BasicDefOrg_DefOrgViewerAdapter, mial::BasicDefOrg_DefOrgViewerAdapter, mial::Blank_DefOrgViewerAdapter, mial::DefOrgViewerAdapterBaseTemplated< ITKPIXELTYPE, MESHDATATYPE >, mial::DefOrgAdapter_VesselCrawler, and mial::DefOrgViewerAdapterBaseTemplated< unsigned char, float >.
Referenced by vtkDefOrgViewerWithKW::InitOrganismButtonCallback().
virtual void mial::DefOrgViewerAdapterBase::UpdateOrganism | ( | ) | [pure virtual] |
During each step of simulation, viewer will call this method. It is the derived class responsibility to update the OutputItkScenes and/or OutputImageVolumes using implemented helper methods
Implemented in BasicDefOrg_DefOrgViewerAdapter, mial::BasicDefOrg_DefOrgViewerAdapter, mial::Blank_DefOrgViewerAdapter, mial::DefOrgViewerAdapterBaseTemplated< ITKPIXELTYPE, MESHDATATYPE >, mial::DefOrgAdapter_VesselCrawler, and mial::DefOrgViewerAdapterBaseTemplated< unsigned char, float >.
Referenced by vtkDefOrgViewerWithKW::StepOrganismButtonCallback().
Number of vtkImageImport* will depend on MaxNumberOfOutputImages(). The derived class would then populate the imageVolumes as it finds appropriate
Definition at line 195 of file DefOrgViewerAdapterBase.h.
Referenced by AddOutputImages(), mial::DefOrgAdapter_VesselCrawler::DefOrgAdapter_VesselCrawler(), DefOrgViewerAdapterBase(), mial::vtkDefOrgViewerWithKWState::GetCurrentImageViewer(), mial::vtkDefOrgViewerWithKWState::GetCurrentImageViewerRenderWidget(), vtkDefOrgViewerWithKW::LoadImageDialogCallback(), mial::DefOrgAdapter_VesselCrawler::PopulateVtkImage(), mial::Blank_DefOrgViewerAdapter::PopulateVtkImage(), mial::BasicDefOrg_DefOrgViewerAdapter::PopulateVtkImage(), vtkDefOrgViewerWithKW::SetupImageViewerPipeline(), and vtkDefOrgViewerWithKW::UpdateImageViewers().
std::vector< SpatialObjectDescriptorStruct > mial::DefOrgViewerAdapterBase::m_OutputItkSpatialObjects |
Number of itkScenePointer will depend on MaxNumberOfOutputItkSpatialObjects(). The derived class would then populate the Scenes as it finds appropriate
Definition at line 191 of file DefOrgViewerAdapterBase.h.
Referenced by vtkDefOrgViewerWithKW::AddActorsFromSOViewers(), AddOutputItkSpatialObjects(), mial::vtkDefOrgViewerWithKWState::GetCurrentSOViewer(), mial::vtkDefOrgViewerWithKWState::GetCurrentSOViewerRenderWidget(), mial::DefOrgAdapter_VesselCrawler::PopulateItkScene(), mial::Blank_DefOrgViewerAdapter::PopulateItkScene(), mial::BasicDefOrg_DefOrgViewerAdapter::PopulateItkScene(), vtkDefOrgViewerWithKW::RemoveActorsFromSOViewers(), vtkDefOrgViewerWithKW::RenderSOViewers(), vtkDefOrgViewerWithKW::SetScenesToSOViewers(), mial::DefOrgAdapter_VesselCrawler::UpdateOrganism(), mial::Blank_DefOrgViewerAdapter::UpdateOrganism(), and mial::BasicDefOrg_DefOrgViewerAdapter::UpdateOrganism().
std::map<std::string,DefOrgPropertyStruct> mial::DefOrgViewerAdapterBase::m_PropertyBag |
Property Bag storing initialization properties (changeable by user from the GUI)
Definition at line 185 of file DefOrgViewerAdapterBase.h.
Referenced by AddOrganismProperty(), vtkDefOrgViewerWithKW::CreateOrganismDataFrame(), GetOrganismProperty(), and vtkDefOrgViewerWithKW::InitOrganismButtonCallback().
std::stringstream mial::DefOrgViewerAdapterBase::theDefOrgTextInput |
Derived class can read from this stream for text input collected from the viewer
Definition at line 211 of file DefOrgViewerAdapterBase.h.
Referenced by vtkDefOrgViewerWithKW::SendOrganismMessageCallback().
std::ostringstream mial::DefOrgViewerAdapterBase::theDefOrgTextOutput |
For viewer. Derived class should not access this variable. To produce text output to be displayed, use std::cout
Definition at line 209 of file DefOrgViewerAdapterBase.h.
Referenced by DefOrgViewerAdapterBase(), and vtkDefOrgViewerWithKW::UpdateOrganismTextOutputCallback().