vtkTclHelper.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: vtkTclHelper.h,v $
00010   Date:      $Date: 2006/01/06 17:58:01 $
00011   Version:   $Revision: 1.4 $
00012 
00013 =========================================================================auto=*/
00014 // .NAME vtkTclHelper - a bridge between tcl and vtk
00015 // -- this class allows binary data to be read from a tcl channel 
00016 //    and put into a vtk data structure (vtkImageData for now)
00017 
00018 // .SECTION Description
00019 
00020 // .SECTION See Also
00021 // vtkTkRenderWidget 
00022 
00023 
00024 #ifndef __vtkTclHelper_h
00025 #define __vtkTclHelper_h
00026 
00027 #include "vtkTcl.h"
00028 #include "vtkObject.h"
00029 #include "vtkImageData.h"
00030 #include "vtkMRMLVolumeNode.h"
00031 #include "vtkMatrix4x4.h"
00032 #include <vtkSlicerDaemonWin32Header.h>
00033 
00034 
00035 class VTK_SLICERDAEMON_EXPORT vtkTclHelper : public vtkObject
00036 {
00037 public:
00038     void PrintSelf(ostream& os, vtkIndent indent);
00039     vtkTypeRevisionMacro(vtkTclHelper, vtkObject);
00040 
00041     static vtkTclHelper *New();
00042 
00043     // Description
00044     // hook for script to tell this instance what interpreter to use
00045     // - call it with the tag returned from AddObserver on this instance
00046     void SetInterpFromCommand(unsigned long tag);
00047 
00048     vtkSetObjectMacro(ImageData, vtkImageData);
00049     vtkGetObjectMacro(ImageData, vtkImageData);
00050     vtkSetObjectMacro(VolumeNode, vtkMRMLVolumeNode);
00051     vtkGetObjectMacro(VolumeNode, vtkMRMLVolumeNode);
00052     vtkSetObjectMacro(MeasurementFrame, vtkMatrix4x4);
00053     vtkGetObjectMacro(MeasurementFrame, vtkMatrix4x4);
00054 
00055     void GetRASToVTKMatrix(vtkMatrix4x4 *RASToVTK);
00056     void SendImageDataScalars(char *sockname);
00057     void SendImageDataTensors(char *sockname);
00058     void SendImageDataTensors_UndoSlicerTransform(char *sockname);
00059     void ReceiveImageDataScalars(char *sockname);
00060     void ReceiveImageDataTensors(char *sockname);
00061     void ReceiveImageDataTensors_DoSlicerTransform(char *sockname);
00062     const char *Execute (char *Command);
00063 
00064 
00065 protected:
00066     vtkTclHelper();
00067     ~vtkTclHelper(); 
00068     
00069     vtkMRMLVolumeNode *VolumeNode;
00070     vtkImageData *ImageData;    
00071     vtkMatrix4x4 *MeasurementFrame;    
00072     Tcl_Interp *Interp;           /* Tcl interpreter */
00073 };
00074 
00075 
00076 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1