X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FMesh.cxx;h=2866967ae73376e7a4a508aa911ab5a1274e3f0b;hb=dba64a6906e88d6023b2e6c9632da9fd41bfeb53;hp=e179c8ed61e4b0e34b7fcd391b6c92d2cf73309c;hpb=d1d816d1eaf980d5cd266798b8f7a0bbb089a383;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Mesh.cxx b/lib/cpPlugins/Interface/Mesh.cxx index e179c8e..2866967 100644 --- a/lib/cpPlugins/Interface/Mesh.cxx +++ b/lib/cpPlugins/Interface/Mesh.cxx @@ -28,9 +28,16 @@ CreateVTKActor( ) ) ) { + double range[ 2 ]; + pd->GetScalarRange( range ); + this->m_Mapper = vtkSmartPointer< vtkPolyDataMapper >::New( ); this->m_Actor = vtkSmartPointer< vtkActor >::New( ); this->m_Mapper->SetInputData( pd ); + this->m_Mapper->UseLookupTableScalarRangeOff( ); + this->m_Mapper->SetScalarRange( + range[ 0 ], ( ( range[ 1 ] - range[ 0 ] ) * 0.75 ) + range[ 0 ] + ); this->m_Actor->SetMapper( this->m_Mapper ); this->Modified( ); @@ -58,8 +65,6 @@ Mesh( ) m_Mapper( NULL ), m_Actor( NULL ) { - this->m_ClassName = "cpPlugins::Interface::Mesh"; - this->m_ClassCategory = "BasicObject"; } // -------------------------------------------------------------------------