]> Creatis software - gdcm.git/blobdiff - vtk/vtkgdcmViewer.cxx
* FIX : on X, the python part is correctly installed. All files are
[gdcm.git] / vtk / vtkgdcmViewer.cxx
index c5bb70d7473c92751391e84b485eff55f1d8c744..6526c1753482d7afafc3bccfd37eda4ab7476788 100644 (file)
@@ -1,3 +1,20 @@
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: vtkgdcmViewer.cxx,v $
+  Language:  C++
+  Date:      $Date: 2005/02/02 20:10:50 $
+  Version:   $Revision: 1.24 $
+                                                                                
+  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+  l'Image). All rights reserved. See Doc/License.txt or
+  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*/
 // This example illustrates how the vtkGdcmReader vtk class can be
 // used in order to:
 //  * produce a simple (vtk based) Dicom image STACK VIEWER.
 #include <vtkImageViewer.h>
 #include <vtkStructuredPoints.h>
 #include <vtkStructuredPointsWriter.h>
-#include <vtkPNGWriter.h>
 #include <vtkCommand.h>
 #include <vtkRenderer.h>
 #include <vtkImageMapToColors.h>
 #include <vtkLookupTable.h>
 
 #include "vtkGdcmReader.h"
-#include "gdcmDebug.h"
-
-#include <iostream>
 
 #ifndef vtkFloatingPointType
 #define vtkFloatingPointType float
@@ -71,7 +84,6 @@ int main(int argc, char *argv[])
    if( argc < 2 )
       return 0;
   
-   gdcm::Debug::SetDebugOff();
    vtkGdcmReader *reader = vtkGdcmReader::New();
    reader->AllowLookupTableOff();
 
@@ -120,17 +132,16 @@ int main(int argc, char *argv[])
    iren->AddObserver(vtkCommand::CharEvent,obs);
    obs->Delete();
 
+   //viewer->Render();
    iren->Initialize();
    iren->Start();
 
    //if you wish you can export dicom to a vtk file  
-   //vtkStructuredPointsWriter *writer = vtkStructuredPointsWriter::New();
-   vtkPNGWriter *writer = vtkPNGWriter::New();
+   vtkStructuredPointsWriter *writer = vtkStructuredPointsWriter::New();
    writer->SetInput( reader->GetOutput());
-   writer->SetFileName( "foo.png" );
-   //writer->SetFileTypeToBinary();
-   writer->Write();
-
+   writer->SetFileName( "foo.vtk" );
+   writer->SetFileTypeToBinary();
+   //writer->Write();
 
    reader->Delete();
    iren->Delete();