- if( this->m_ImageMaps.size( ) > 0 )
- {
- if( this->m_ImageMaps[ 0 ].GetPointer( ) != NULL )
- {
- vtkWindowLevelLookupTable* lut =
- dynamic_cast< vtkWindowLevelLookupTable* >(
- this->m_ImageMaps[ 0 ]->GetLookupTable( )
- );
- if( lut != NULL )
- {
- /* TODO: Min and Max values are assigned 0!!!
- std::cout << this->MinWindow << " " << this->MaxWindow << std::endl;
- std::cout << this->MinLevel << " " << this->MaxLevel << std::endl;
- std::cout << w << " " << l << " <-> " << std::ends;
- if( w < this->MinWindow )
- w = this->MinWindow;
- if( w > this->MaxWindow )
- w = this->MaxWindow;
- if( l < this->MinLevel )
- l = this->MinLevel;
- if( l > this->MaxLevel )
- l = this->MaxLevel;
- std::cout << w << " " << l << std::endl;
- */
- lut->SetWindow( w );
- lut->SetLevel( l );
- lut->Build( );
- this->m_ImageMaps[ 0 ]->Modified( );
- this->Modified( );
-
- } // fi
-
- } // fi
+ if( this->m_ImageMaps.size( ) == 0 )
+ return;
+ if( this->m_ImageMaps[ 0 ].GetPointer( ) == NULL )
+ return;
+ vtkWindowLevelLookupTable* lut =
+ dynamic_cast< vtkWindowLevelLookupTable* >(
+ this->m_ImageMaps[ 0 ]->GetLookupTable( )
+ );
+ if( lut == NULL )
+ return;