@CMAKE_INSTALL_PREFIX@/lib
)
+FIND_LIBRARY(
+ cpPlugins_Extensions_LIBRARY_NAME
+ cpPlugins_Extensions
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ @PROJECT_BINARY_DIR@
+ @CMAKE_INSTALL_PREFIX@/lib
+ )
+
FIND_LIBRARY(
cpPlugins_LIBRARY_NAME
cpPlugins
SET(
cpPlugins_Interface_LIBRARIES
${cpPlugins_Interface_LIBRARY_NAME}
+ ${cpPlugins_Extensions_LIBRARY_NAME}
)
SET(
cpPlugins_LIBRARIES
#include <cpPlugins/Extensions/Visualization/MPRActors.h>
#include <vtkImageData.h>
+#include <vtkLookupTable.h>
#include <vtkOutlineSource.h>
#include <vtkPolyDataMapper.h>
#include <vtkProperty.h>
for( int i = 0; i < 3; ++i )
{
- Slices[ i ]->SetInputConnection(
+ this->Slices[ i ]->SetInputConnection(
this->ImageToWindowLevel->GetOutputPort( ), i
);
- Slices[ i ]->UpdateText( this->GetWindow( ), this->GetLevel( ) );
+ this->Slices[ i ]->UpdateText( this->GetWindow( ), this->GetLevel( ) );
} // rof
void cpPlugins::Extensions::Visualization::MPRActors::
SetSegmentationData( vtkImageData* segmentation )
{
+ double range[ 2 ];
+ this->Segmentation = segmentation;
+ this->Segmentation->GetScalarRange( range );
+
+ vtkSmartPointer< vtkLookupTable > lut =
+ vtkSmartPointer< vtkLookupTable >::New( );
+ lut->SetNumberOfTableValues( 2 );
+ lut->SetTableRange( range );
+ lut->SetTableValue( 0, 0, 0, 0, 0 );
+ lut->SetTableValue( 1, 1, 0, 0, 0.4 );
+
+ this->SegmentationToColors->SetInputData( this->Segmentation );
+ this->SegmentationToColors->SetLookupTable( lut );
+ this->SegmentationToColors->Update( );
+
+ for( int i = 0; i < 3; ++i )
+ this->Slices[ i ]->SetSegmentationConnection(
+ this->SegmentationToColors->GetOutputPort( )
+ );
}
// -------------------------------------------------------------------------
this->RenderAll( );
}
+// -------------------------------------------------------------------------
+void cpPlugins::Extensions::Visualization::MPRWithDifferentWindows::
+SetSegmentation( vtkImageData* image )
+{
+ this->m_MPRActors->SetSegmentationData( image );
+ this->m_MPRActors->PushDataInto(
+ this->m_Renderers[ 0 ],
+ this->m_Renderers[ 1 ],
+ this->m_Renderers[ 2 ],
+ this->m_Renderers[ 3 ]
+ );
+
+ this->Render( 0 );
+ this->Render( 1 );
+ this->Render( 2 );
+}
+
// -------------------------------------------------------------------------
void cpPlugins::Extensions::Visualization::MPRWithDifferentWindows::
ResetCamera( const int& id )