+ // Get input image
+ vtkInformation* inInfo = inputVector[ 0 ]->GetInformationObject( 0 );
+ if( inInfo == NULL )
+ return( 0 );
+ vtkImageData* inData = vtkImageData::SafeDownCast(
+ inInfo->Get( vtkDataObject::DATA_OBJECT( ) )
+ );
+ if( inData == NULL )
+ return( 0 );
+
+ // Configure buffer extent
+ inData->GetExtent( this->m_Extent );
+ this->m_Extent[ 1 ] -= this->m_Extent[ 0 ];
+ this->m_Extent[ 3 ] -= this->m_Extent[ 2 ];
+ this->m_Extent[ 5 ] -= this->m_Extent[ 4 ];
+ this->m_Extent[ 1 ] += 1;
+ this->m_Extent[ 3 ] += 1;
+ this->m_Extent[ 5 ] += 1;
+
+ // Configure window/level
+ double range[ 2 ];
+ inData->GetScalarRange( range );
+ this->m_MaxWindow = range[ 1 ] - range[ 0 ];
+ this->m_MinWindow = this->m_MaxWindow * double( 1e-2 );
+ this->m_MinLevel = range[ 0 ];
+ this->m_MaxLevel = range[ 1 ];
+ if( this->m_Window < this->m_MinWindow )
+ this->m_Window = this->m_MinWindow;
+ if( this->m_Window > this->m_MaxWindow )
+ this->m_Window = this->m_MaxWindow;
+ if( this->m_Level < this->m_MinLevel )
+ this->m_Level = this->m_MinLevel;
+ if( this->m_Level > this->m_MaxLevel )
+ this->m_Level = this->m_MaxLevel;
+ this->m_WLSlope = double( 1 ) / this->m_Window;
+ this->m_WLOffset = double( 0.5 ) - ( this->m_Level / this->m_Window );
+
+ // Configure output type