X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkgdcmViewer.cxx;h=95da0fa0faf98538d2882e3246124ffd01376156;hb=ca1e16227a30bd895c6acdc27244c838f0631c2e;hp=0c0029b7906242e9d03e20352aff78d374ee7985;hpb=c1a305b54c1a9dd1bfe2173940ba84ccd1b4bb27;p=gdcm.git diff --git a/vtk/vtkgdcmViewer.cxx b/vtk/vtkgdcmViewer.cxx index 0c0029b7..95da0fa0 100644 --- a/vtk/vtkgdcmViewer.cxx +++ b/vtk/vtkgdcmViewer.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: vtkgdcmViewer.cxx,v $ Language: C++ - Date: $Date: 2007/09/18 07:54:30 $ - Version: $Revision: 1.31 $ + Date: $Date: 2009/11/03 14:05:23 $ + Version: $Revision: 1.32 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -96,6 +96,18 @@ int main(int argc, char *argv[]) reader->SetLoadMode(GDCM_NAME_SPACE::LD_NOSHADOWSEQ); reader->Update(); + + +std::cout << "[0][0]==========" << +reader->GetOutput()->GetScalarComponentAsFloat(0,0,0,0) << +"====================" +<< std::endl; +std::cout << "[127][127]==========" << +reader->GetOutput()->GetScalarComponentAsFloat(0,127,0,0) << +"====================" +<< std::endl; + + //print debug info: reader->GetOutput()->Print( cout ); @@ -143,12 +155,22 @@ int main(int argc, char *argv[]) iren->Initialize(); iren->Start(); - //if you wish you can export dicom to a vtk file + //if you wish you can export dicom to a vtk file + vtkStructuredPointsWriter *writer = vtkStructuredPointsWriter::New(); writer->SetInput( reader->GetOutput()); writer->SetFileName( "foo.vtk" ); writer->SetFileTypeToBinary(); //writer->Write(); + +std::cout << "==========" << std::endl; + +std::cout << "==========" << +reader->GetOutput()->GetScalarComponentAsFloat(0,0,0,0) << +"====================" +<< std::endl; + + reader->Delete(); iren->Delete();