[vtkusers] upgrade vtk from vtk 5.0 to 5.8
Gishara Indeewarie
gish.777 at gmail.com
Fri Jun 22 07:49:05 EDT 2012
Hi David,
Thanks for your answer. Below is the function that includes line 313 of
vtkPBFEAView.cpp.
vtkSmartPointer<vtkScalarBarWidget> AddPBFEABar(vtkLookupTable& lut,const
char* label, int x, double y)
{
vtkSmartPointer<vtkScalarBarActor> barActor;
barActor.TakeReference(vtkScalarBarActor::New());
barActor->SetLookupTable(&lut);
barActor->SetTitle(label);
barActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
if(false)
{
barActor->SetOrientationToVertical();
barActor->GetPositionCoordinate()->SetValue(0.02,0.3);
barActor->GetPosition2Coordinate()->SetValue(0.08,0.7);
}
else
{
barActor->SetOrientationToHorizontal();
barActor->GetPositionCoordinate()->SetValue(0.2,0.1);
barActor->GetPosition2Coordinate()->SetValue(0.6,0.08);
}
barActor->GetTitleTextProperty()->SetColor(0,0,0);
barActor->GetTitleTextProperty()->ShadowOff();
barActor->GetTitleTextProperty()->ItalicOff();
barActor->GetTitleTextProperty()->SetFontFamilyToArial();
barActor->GetLabelTextProperty()->SetFontFamilyToArial();
barActor->GetLabelTextProperty()->ItalicOff();
barActor->GetLabelTextProperty()->ShadowOff();
barActor->GetLabelTextProperty()->BoldOff();
//barActor->GetLabelTextProperty()->SetFontSize(8);
barActor->GetLabelTextProperty()->SetColor(0,0,0);
barActor->SetLabelFormat("%-#10.3f");
return barActor;
}
return barActor is the line 313.
On Fri, Jun 22, 2012 at 5:12 PM, David E DeMarle
<dave.demarle at kitware.com>wrote:
> > What I want to know is do we need to make code changes like these at
> every
> > time we upgrade our vtk version?
>
> It depends. Things change in every release, especially in major
> releases (5.10->6.0).
> vtkScalarBarWidget for example moved to a new class hierarchy when the
> widgets were restructured to give them more capabilities.
> Compare:
> http://www.vtk.org/doc/release/5.0/html/a01987.html
> and
> http://www.vtk.org/doc/release/5.8/html/a01855.html
> The bigger the version gap, the more likely it is that you will run
> into incompatibilities.
>
> We are getting better at documenting what the changes are to make
> upgrading easier, but could stand improvement in this regard.
> See:
> http://www.vtk.org/Wiki/VTK#Summary_of_Changes
>
> Back to the code:
> Can you post .\vtk\vtkPBFEAView.cpp(313) and a few lines arounds it,
> as well as the declaration of bar_actor_?
>
--
Gish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120622/d89e443b/attachment.htm>
More information about the vtkusers
mailing list