vtkMRMLFiniteElementBuildingBlockNode.h

Go to the documentation of this file.
00001 /*=auto=========================================================================
00002 
00003   Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
00004 
00005   See Doc/copyright/copyright.txt
00006   or http://www.slicer.org/copyright/copyright.txt for details.
00007 
00008   Program:   3D Slicer
00009   Module:    $RCSfile: vtkMRMLFiniteElementBuildingBlockNode.h,v $
00010   Date:      $Date: 2006/03/19 17:12:29 $
00011   Version:   $Revision: 1.3 $
00012 
00013 =========================================================================auto=*/
00014 #ifndef __vtkMRMLFiniteElementBuildingBlockNode_h
00015 #define __vtkMRMLFiniteElementBuildingBlockNode_h
00016 
00017 //#include "vtkMRML.h"
00018 #include "vtkMRMLUnstructuredGridNode.h"
00019 
00020 // keep a pointer to the Mimx actor object because we are storing a direct reference
00021 // to the actor so the application code doesn't have to be rearranged with all attributes
00022 // added to the node before the commit is done.  If the same actor is used, in the local and MRML
00023 // lists, then we know that all the values will be good in the actor.  Use the names in the actors
00024 // instead of the separate fields for matching / searching. 
00025 
00026 // searching the MRML-backed lists is needed because as surface,bblock, and mesh objects are created,
00027 // they are stored in separate lists, according to their MRML type.  However, the application believes
00028 // there is only one polymorphic list, so when objects are returned or removed by ID, a search is required
00029 // to find the matching object. 
00030 
00031 #include  "vtkMimxUnstructuredGridActor.h"
00032 #include "vtkMimxCommonWin32Header.h"
00033 
00034 class VTK_MIMXCOMMON_EXPORT vtkMRMLFiniteElementBuildingBlockNode : public vtkMRMLUnstructuredGridNode
00035 {
00036   public:
00037   static vtkMRMLFiniteElementBuildingBlockNode *New();
00038   vtkTypeMacro(vtkMRMLFiniteElementBuildingBlockNode,vtkMRMLUnstructuredGridNode);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040 
00041   virtual vtkMRMLFiniteElementBuildingBlockNode* CreateNodeInstance();
00042 
00043   // Description:
00044   // Set node attributes
00045   virtual void ReadXMLAttributes( const char** atts);
00046 
00047   // Description:
00048   // Write this node's information to a MRML file in XML format.
00049   virtual void WriteXML(ostream& of, int indent);
00050 
00051   // Description:
00052   // Copy the node's attributes to this object
00053   virtual void Copy(vtkMRMLNode *node);
00054 
00055   // Description:
00056   // Get node XML tag name (like Volume, Model)
00057   virtual const char* GetNodeTagName() {return "FiniteElementBuildingBlock";};
00058   
00059   // Description:
00060   // Set pointer to the Mimx actor that contains the state variables
00061   vtkSetObjectMacro(MimxUnstructuredGridActor, vtkMimxUnstructuredGridActor);
00062   vtkGetObjectMacro(MimxUnstructuredGridActor, vtkMimxUnstructuredGridActor);
00063 
00064   // don't use VTK macros  because the values are stored in an actor instance
00065   void   SetDataType(int value) {this->MimxUnstructuredGridActor->SetDataType(value);}   
00066   int    GetDataType(void)      {return this->MimxUnstructuredGridActor->GetDataType();} 
00067   // *** svoid   SetFileName(char* value) {this->MimxUnstructuredGridActor->SetFileName(value);}   
00068   char*  GetFileName(void)      {return this->MimxUnstructuredGridActor->GetFileName();} 
00069   void   SetFilePath(char* value) {this->MimxUnstructuredGridActor->SetFilePath(value);}   
00070   char*  GetFilePath(void)      {return this->MimxUnstructuredGridActor->GetFilePath();}
00071   
00072   void SetSavedVisibilityState(bool state) {this->savedVisibilityState = state;}
00073   bool GetSavedVisibilityState(void) {return this->savedVisibilityState;}  
00074 
00075  
00076 protected:
00077   vtkMRMLFiniteElementBuildingBlockNode();
00078   ~vtkMRMLFiniteElementBuildingBlockNode();
00079   vtkMRMLFiniteElementBuildingBlockNode(const vtkMRMLFiniteElementBuildingBlockNode&);
00080   void operator=(const vtkMRMLFiniteElementBuildingBlockNode&);
00081 
00082   
00083   vtkMimxUnstructuredGridActor *MimxUnstructuredGridActor;
00084   
00085   // remember whether this node was on or off when IA_FEMesh was onscreen.  The state is stored here
00086   // during module exit and checked during module entry. 
00087   bool savedVisibilityState;
00088 };
00089 
00090 #endif
00091 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1