return( -1 );
this->m_Blender->AddInputConnection( aout );
this->_ConfigureBinaryImage( r, g, b );
- return( this->m_Blender->GetNumberOfInputPorts( ) - 1 );
+ return( this->m_Blender->GetNumberOfInputs( ) - 1 );
}
// -------------------------------------------------------------------------
return( -1 );
this->m_Blender->AddInputData( data );
this->_ConfigureBinaryImage( r, g, b );
- return( this->m_Blender->GetNumberOfInputPorts( ) - 1 );
+ return( this->m_Blender->GetNumberOfInputs( ) - 1 );
}
// -------------------------------------------------------------------------
}
else // if( axis == 2 )
{
- camera->SetPosition( double( 0 ), double( 0 ), double( 1 ) );
- camera->SetViewUp ( double( 0 ), double( -1 ), double( 0 ) );
+ camera->SetPosition( double( 0 ), double( 0 ), double( -1 ) );
+ camera->SetViewUp ( double( 0 ), double( -1 ), double( 0 ) );
} // fi
unsigned int cpExtensions::Visualization::ImageSliceActors::
GetNumberOfImages( ) const
{
- return( this->m_Blender->GetNumberOfInputPorts( ) );
+ return( this->m_Blender->GetNumberOfInputs( ) );
}
// -------------------------------------------------------------------------
// Update text
this->UpdateText( );
- // Update lines from associated slices
- /* TODO
- auto sIt = this->m_AssociatedSlices.begin( );
- for( ; sIt != this->m_AssociatedSlices.end( ); ++sIt )
- {
- Self* slice = *sIt;
- for( unsigned int id = 0; id < slice->m_AssociatedSlices.size( ); ++id )
- {
- std::cout << id << std::endl;
- if( slice->m_AssociatedSlices[ id ] != this )
- continue;
-
- std::cout << "id : " << id << std::endl;
-
- } // rof
-
- } // rof
- */
-
// Update camera position
if( this->m_Window == NULL )
return;
else if( axId == 1 ) axis = 'Y';
else if( axId == 2 ) axis = 'Z';
+#if defined(WIN32)
+ sprintf_s(
+ this->m_TextBuffer, 1024, "Axis: %c (%d)",
+ axis, this->m_ImageMapper->GetSliceNumber( )
+ );
+#else // defined(WIN32)
std::sprintf(
this->m_TextBuffer, "Axis: %c (%d)",
axis, this->m_ImageMapper->GetSliceNumber( )
);
+#endif // defined(WIN32)
}
else
this->m_TextBuffer[ 0 ] = '\0';
ijk[ 0 ], ijk[ 1 ], ijk[ 2 ], n
);
str << ")";
+
+#if defined(WIN32)
+ sprintf_s(
+ this->m_TextBuffer, 1024, "Axis: %c (%d)\nPixel %s",
+ axis, slice, str.str( ).c_str( )
+ );
+#else // defined(WIN32)
std::sprintf(
this->m_TextBuffer, "Axis: %c (%d)\nPixel %s",
axis, slice, str.str( ).c_str( )
);
-
+#endif // defined(WIN32)
} // fi
}
else
else if( axId == 1 ) axis = 'Y';
else if( axId == 2 ) axis = 'Z';
+#if defined(WIN32)
+ sprintf_s(
+ this->m_TextBuffer, 1024, "Axis: %c (%d)\nW/L (%.2f/%.2f)",
+ axis, this->m_ImageMapper->GetSliceNumber( ), w, l
+ );
+#else // defined(WIN32)
std::sprintf(
this->m_TextBuffer, "Axis: %c (%d)\nW/L (%.2f/%.2f)",
axis, this->m_ImageMapper->GetSliceNumber( ), w, l
);
+#endif // defined(WIN32)
}
else
this->m_TextBuffer[ 0 ] = '\0';
{
// Connect this view with a controller
this->m_Style = vtkSmartPointer< TStyle >::New( );
+ this->m_Style->SetAssociatedObject( this );
this->m_Style->AddMouseMoveCommand( Self::_MouseMoveCommand, this );
this->m_Style->AddMouseClickCommand( Self::_MouseClickCommand, this );
this->m_Style->AddMouseWheelCommand( Self::_MouseWheelCommand, this );