1 /*=========================================================================
4 Module: $RCSfile: bbvtkImageDataToString.cxx,v $
6 Date: $Date: 2008/02/15 08:46:19 $
7 Version: $Revision: 1.1 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
26 #include "bbstdToString.h"
27 #include "vtkImageData.h"
28 #include "bbvtkPackage.h"
30 typedef vtkImageData* vtkImageDataPtr;
31 typedef const vtkImageData* vtkImageDataConstPtr;
35 // BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME(vtkImageDataPtr,"vtkImageDataPtr");
36 // BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME(vtkImageDataConstPtr,"vtkImageDataConstPtr");
41 //====================================================================
42 BBTK_USER_BLACK_BOX_TEMPLATE_IMPLEMENTATION(ToString,
43 bbtk::AtomicBlackBox);
44 //====================================================================
47 //====================================================================
48 template <> void ToString<vtkImageData*> ::DoIt()
50 vtkImageData* im = bbGetInputIn();
52 im->GetDimensions(dim);
54 std::ostringstream str;
55 str << "vtkImageData ["
60 bbSetOutputOut( str.str() ); //bbGetInputIn()->GetInfoString() );
62 //====================================================================
66 using namespace bbstd;
69 //====================================================================
70 // Add the specialized adaptors to the package
71 BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(vtk,ToString,vtkImageDataPtr);