X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkgdcmViewer.cxx;h=ff1e6099b46f63a0a0b4b3b1dc0e1447ad4c7367;hb=993abd8da219c4c06ebef8d92bfeb17f5e41f9d5;hp=e80aa55c9df02aa5953b6c28dce4ff52b365f2d5;hpb=b91a9ede272affb7e7f8211b59ee407f46590bdc;p=gdcm.git diff --git a/vtk/vtkgdcmViewer.cxx b/vtk/vtkgdcmViewer.cxx index e80aa55c..ff1e6099 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,15 +58,16 @@ 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: - reader->GetOutput()->Print( std::cout ); + reader->GetOutput()->Print( cout ); 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() ); }