#include <QTreeWidgetItem>
#include <vtkRendererCollection.h>
+double cpPlugins::Interface::BaseMPRWidget::
+cm_Colors[ 8 ][ 3 ] =
+{
+ { 1.0, 0.0, 0.0 },
+ { 0.0, 1.0, 0.0 },
+ { 0.0, 0.0, 1.0 },
+ { 0.0, 1.0, 1.0 },
+ { 1.0, 0.0, 1.0 },
+ { 1.0, 1.0, 0.0 },
+ { 1.0, 0.5, 0.0 },
+ { 1.0, 0.0, 0.5 }
+};
+
// -------------------------------------------------------------------------
cpPlugins::Interface::BaseMPRWidget::
BaseMPRWidget( QWidget* parent )
if( name == this->m_MainImage )
this->m_MPRObjects->SetInputImage( iIt->second.Image );
else
- this->m_MPRObjects->AddBinaryImage( iIt->second.Image, 1, 0, 0 );
+ {
+ unsigned int i = ( this->m_MPRObjects->GetNumberOfImages( ) - 1 ) % 8;
+ this->m_MPRObjects->AddBinaryImage(
+ iIt->second.Image,
+ Self::cm_Colors[ i ][ 0 ],
+ Self::cm_Colors[ i ][ 1 ],
+ Self::cm_Colors[ i ][ 2 ]
+ );
+ }
this->m_MPRObjects->Show( );
}
else if( iIt->second.Tag == Data::MESH )
_FindItemInTree( const std::string& name ) const
{
QList< QTreeWidgetItem* > items =
- this->m_UI->LoadedData->findItems( name.c_str( ), Qt::MatchExactly );
+ this->m_UI->LoadedData->findItems(
+ name.c_str( ), Qt::MatchExactly | Qt::MatchRecursive
+ );
if( items.size( ) > 0 )
return( items[ 0 ] );
else