bool mitk::EnumerationProperty::AddEnum( const std::string& name, const IdType& id )
{
  if ( ( ! IsValidEnumerationValue( name ) ) && ( ! IsValidEnumerationValue( id ) ) )
  {
    GetEnumIds().insert( std::make_pair( id, name ) );
    GetEnumStrings().insert( std::make_pair( name, id ) );
    return true;
  }
  else
  {
    return false;
  }
}
void mitk::ShaderProperty::SetShader( const std::string& value )
{
  if ( IsValidEnumerationValue( value ) )
    SetValue( value );
  else
    SetValue( (IdType)0 );
}
mitk::VtkVolumeRenderingProperty::VtkVolumeRenderingProperty( const std::string& value )
{
  this->AddRenderingTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    this->SetValue( value );
  }
  else
    MITK_INFO << "Warning: invalid rendering configuration" << std::endl;
}
mitk::PointSetShapeProperty::PointSetShapeProperty(const IdType &value)
{
  this->AddPointSetShapes();
  if (IsValidEnumerationValue(value))
  {
    this->SetValue(value);
  }
  else
    MITK_WARN << "Warning: invalid point set shape";
}
mitk::PointSetShapeProperty::PointSetShapeProperty(const std::string &value)
{
  this->AddPointSetShapes();
  if (IsValidEnumerationValue(value))
  {
    this->SetValue(value);
  }
  else
    MITK_WARN << "Invalid point set shape";
}
mitk::RenderingModeProperty::RenderingModeProperty( const std::string& value )
{
  this->AddRenderingModes();
  if ( IsValidEnumerationValue( value ) )
  {
    this->SetValue( value );
  }
  else
    MITK_WARN << "Invalid image rendering mode";
}
mitk::RenderingModeProperty::RenderingModeProperty( const IdType& value )
{
  this->AddRenderingModes();
  if ( IsValidEnumerationValue( value ) )
  {
    this->SetValue( value ) ;
  }
  else
    MITK_WARN << "Warning: invalid image rendering mode";
}
mitk::EnumerationProperty::IdType mitk::EnumerationProperty::GetEnumId( const std::string& name ) const
{
  if ( IsValidEnumerationValue( name ) )
  {
    return  GetEnumStrings().find( name )->second;
  }
  else
  {
    return 0;
  }
}
std::string mitk::EnumerationProperty::GetEnumString( const IdType& id ) const
{
  if ( IsValidEnumerationValue( id ) )
  {
    return GetEnumIds().find( id )->second;
  }
  else
  {
    return "invalid enum id or enums empty";
  }
}
mitk::GridVolumeMapperProperty::GridVolumeMapperProperty( const std::string& value )
{
  AddRepresentationTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value );
  }
  else
  {
    SetValue( PT );
  }
}
Example #11
0
mitk::OrganTypeProperty::OrganTypeProperty( const std::string& value )
{
  AddEnumerationTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value );
  }
  else
  {
    SetValue( "undefined" );
  }
}
Example #12
0
mitk::OrganTypeProperty::OrganTypeProperty( const IdType& value )
{
  AddEnumerationTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value ) ;
  }
  else
  {
    SetValue( 0 );
  }
}
mitk::RegVisColorStyleProperty::RegVisColorStyleProperty( const IdType& value )
{
  AddTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value ) ;
  }
  else
  {
    SetValue( 0 );
  }
}
Example #14
0
mitk::VtkScalarModeProperty::VtkScalarModeProperty( const std::string& value )
{
  AddInterpolationTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value );
  }
  else
  {
    SetScalarModeToDefault();
  }
}
mitk::ConnectomicsRenderingNodeRadiusParameterProperty::ConnectomicsRenderingNodeRadiusParameterProperty( const std::string& value )
{
  AddRenderingNodeRadiusParameters();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value );
  }
  else
  {
    SetValue( NODE_RADIUS_CONSTANT );
  }
}
mitk::ConnectomicsRenderingEdgeThresholdParameterProperty::ConnectomicsRenderingEdgeThresholdParameterProperty( const std::string& value )
{
  AddRenderingEdgeThresholdParameters();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value );
  }
  else
  {
    SetValue( EDGE_THRESHOLD_WEIGHT );
  }
}
mitk::VtkResliceInterpolationProperty::VtkResliceInterpolationProperty( const std::string& value )
{
  this->AddInterpolationTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    this->SetValue( value );
  }
  else
  {
    this->SetValue( static_cast<IdType>( VTK_RESLICE_NEAREST ) );
  }
}
mitk::VtkRepresentationProperty::VtkRepresentationProperty( const std::string& value )
{
  AddRepresentationTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value );
  }
  else
  {
    SetValue( static_cast<IdType>( VTK_SURFACE ) );
  }
}
Example #19
0
mitk::RegEvalStyleProperty::RegEvalStyleProperty( const std::string& value )
{
  AddTypes();
  if ( IsValidEnumerationValue( value ) )
  {
    SetValue( value );
  }
  else
  {
    SetValue( 0 );
  }
}
Example #20
0
bool mitk::EnumerationProperty::SetValue( const std::string& name )
{
  if ( IsValidEnumerationValue( name ) )
  {
    m_CurrentValue = GetEnumId( name );
    Modified();
    return true;
  }
  else
  {
    return false;
  }
}
Example #21
0
bool mitk::EnumerationProperty::SetValue( const IdType& id )
{
  if ( IsValidEnumerationValue( id ) )
  {
    m_CurrentValue = id;
    Modified();
    return true;
  }
  else
  {
    return false;
  }
}
mitk::ResliceMethodProperty::ResliceMethodProperty( const std::string& value )
{
  AddThickSlicesTypes();
  if ( IsValidEnumerationValue( value ) )
    SetValue( value );
}