[vtkusers] upgrade vtk from vtk 5.0 to 5.8
Gishara Indeewarie
gish.777 at gmail.com
Fri Jun 22 12:23:33 EDT 2012
Thanks David. This error never occured in vtk 5.0, could you explain why?
Thanks a lot again.
On Fri, Jun 22, 2012 at 5:29 PM, David E DeMarle
<dave.demarle at kitware.com>wrote:
> vtkSmartPointer<vtkScalarBarWidget> AddPBFEABar(vtkLookupTable&
> lut,const char* label, int x, double y)
> {
> vtkSmartPointer<vtkScalarBarActor> barActor;
> barActor.TakeReference(vtkScalarBarActor::New());
> ...
> return barActor;
> }
>
> The function is declared to return a vtkScalarBarWidget, but returns
> barActor, a vtkScalarBarActor instead.
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
> On Fri, Jun 22, 2012 at 7:49 AM, Gishara Indeewarie <gish.777 at gmail.com>
> wrote:
> > 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;
> > }
>
--
Gish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120622/fa29b62a/attachment.htm>
More information about the vtkusers
mailing list