From: Eduardo Davila Date: Wed, 30 May 2012 17:21:37 +0000 (+0000) Subject: - new version X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=702369fa1f89a638331e43543d83eb5db4c180ab;p=creaImageIO.git - new version - flip --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 075d091..852b0d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ PROJECT(creaImageIO) # The project version SET(PROJECT_MAJOR_VERSION 0) SET(PROJECT_MINOR_VERSION 2) -SET(PROJECT_BUILD_VERSION 5) +SET(PROJECT_BUILD_VERSION 6) SET(CREA_VERBOSE_CMAKE TRUE) # JPR 4 mars 2011 diff --git a/src/creaImageIODicomImageReader.cpp b/src/creaImageIODicomImageReader.cpp index 0d6a753..bfc4089 100644 --- a/src/creaImageIODicomImageReader.cpp +++ b/src/creaImageIODicomImageReader.cpp @@ -20,7 +20,10 @@ namespace creaImageIO DicomImageReader::DicomImageReader() { mReader = vtkGdcmReader::New(); -//EED mReader->SetFlipY(false); + +//EED 21 mars 2012 FLIP probleme ..PLOP.. + mReader->SetFlipY(false); + SetName ( "Dicom" ); }; diff --git a/src/creaImageIOImageReader.cpp b/src/creaImageIOImageReader.cpp index d93b186..6f59000 100644 --- a/src/creaImageIOImageReader.cpp +++ b/src/creaImageIOImageReader.cpp @@ -31,8 +31,9 @@ namespace creaImageIO { // std::cout << "#### ImageReader::ImageReader()"<(new VtkImageReader(vtkPNGReader::New(), "PNG", ".png"))); + + + Register( boost::shared_ptr(new VtkImageReader(vtkPNGReader::New() , "PNG", ".png"))); Register(boost::shared_ptr(new VtkImageReader(vtkTIFFReader::New(), "JPEG", ".jpeg"))); Register(boost::shared_ptr(new VtkImageReader(vtkJPEGReader::New()))); Register(boost::shared_ptr(new VtkImageReader(vtkBMPReader::New()))); diff --git a/src/creaImageIOVtkImageReader.cpp b/src/creaImageIOVtkImageReader.cpp index 4c70cbd..89dc183 100644 --- a/src/creaImageIOVtkImageReader.cpp +++ b/src/creaImageIOVtkImageReader.cpp @@ -10,6 +10,10 @@ namespace creaImageIO{ const std::string& extensions) : mReader(r), mExtensions(extensions) { + + //EED 21 mars 2012 FLIP probleme ..PLOP.. + mReader->FileLowerLeftOn(); + if (name.size() == 0) { const char *test =mReader->GetDescriptiveName(); diff --git a/src/creaImageIOWxViewer.cpp b/src/creaImageIOWxViewer.cpp index 065c686..ab13490 100644 --- a/src/creaImageIOWxViewer.cpp +++ b/src/creaImageIOWxViewer.cpp @@ -232,6 +232,15 @@ std::cout << std::endl; mViewer->SetColorLevel(0.5 * (range[1] + range[0])); mViewer->GetRenderer()->ResetCamera(); + + //EED 21 mars 2012 FLIP problem ..PLOP.. + vtkCamera *camera =mViewer->GetRenderer()->GetActiveCamera(); + camera->SetViewUp ( 0 , -1 , 0 ); + camera->SetPosition ((x1+x2)/2 , (y1+y2)/2 , -10000); + camera->SetFocalPoint ((x1+x2)/2 , (y1+y2)/2 , 0 ); + camera->SetParallelScale( (x2-x1)/3.0 ); + + double bounds[6]; mViewer->GetRenderer()->ComputeVisiblePropBounds(bounds);