X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkgdcmViewer.cxx;h=b9caec87947b68c0ffdcc00c532a9ed525e23b12;hb=ac6281627c9571b711bd4d6e55a4adabc8b91afb;hp=e80aa55c9df02aa5953b6c28dce4ff52b365f2d5;hpb=b91a9ede272affb7e7f8211b59ee407f46590bdc;p=gdcm.git diff --git a/vtk/vtkgdcmViewer.cxx b/vtk/vtkgdcmViewer.cxx index e80aa55c..b9caec87 100644 --- a/vtk/vtkgdcmViewer.cxx +++ b/vtk/vtkgdcmViewer.cxx @@ -11,6 +11,10 @@ #include "vtkGdcmReader.h" +#ifndef vtkFloatingPointType +#define vtkFloatingPointType float +#endif + //---------------------------------------------------------------------------- // Callback for the interaction class vtkgdcmObserver : public vtkCommand @@ -54,7 +58,7 @@ int main(int argc, char *argv[]) for(int i=1; i< argc; i++) reader->AddFileName( argv[i] ); - //reader->DebugOn(); + reader->DebugOn(); reader->Update(); //print debug info: @@ -63,6 +67,7 @@ int main(int argc, char *argv[]) vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); vtkImageViewer2 *viewer = vtkImageViewer2::New(); + if( reader->GetLookupTable() ) { //convert to color: @@ -74,6 +79,7 @@ int main(int argc, char *argv[]) map->Delete(); } else + { viewer->SetInput ( reader->GetOutput() ); }