[vtkusers] vtkButtonSource- smart pointer error

alex Dowson alexdowson at hotmail.com
Thu Oct 18 02:14:51 EDT 2012


Kiran

You can not create vtkButtonSource directly because I think it is designed as interface class. There is no New() function exist in class.

Instead try this class 
vtkRectangularButtonSource 
vtkEllipticalButtonSource 




 

From: Kiran Gachchi 
Sent: Thursday, October 18, 2012 10:55 AM
To: vtkusers at vtk.org 
Subject: [vtkusers] vtkButtonSource- smart pointer error

Hi All,

 

I am creating GUI with a button in VTK.

I tried with the following code.

 

vtkSmartPointer<vtkButtonSource>abc = vtkSmartPointer<vtkButtonSource>::New();

  abc->GetTextureStyle();

  abc->SetTextureDimensions(10, 10);

 

 

And I am getting the error: 

 

 

error C2665: 'vtkSmartPointer<T>::vtkSmartPointer' : none of the 4 overloads could convert all the argument types

1>        with

1>        [

1>            T=vtkButtonSource

1>        ]

1>        d:\programfiles\vtk\include\vtk-5.2\vtksmartpointer.h(176): could be 'vtkSmartPointer<T>::vtkSmartPointer(T *,const vtkSmartPointerBase::NoReference &)'

1>        with

1>        [

1>            T=vtkButtonSource

1>        ]

1>        while trying to match the argument list '(vtkPolyDataAlgorithm *, vtkSmartPointerBase::NoReference)'

1>        d:\programfiles\vtk\include\vtk-5.2\vtksmartpointer.h(125) : while compiling class template member function 'vtkSmartPointer<T> vtkSmartPointer<T>::New(void)'

1>        with

1>        [

1>            T=vtkButtonSource

1>        ]

1>        d:\assinments\vtk_programs\buttons\buttons\buttons.cpp(58) : see reference to class template instantiation 'vtkSmartPointer<T>' being compiled

1>        with

1>        [

1>            T=vtkButtonSource

1>        ]

 

 

Please let me know where should I do correction in the above code.

 

Thanks in advance

 

Regards,

Kiran 

 



::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, 
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents 
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. 
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the 
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of this message without the prior written consent of authorized representative of 
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. 
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------



--------------------------------------------------------------------------------
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121018/00c5e501/attachment.htm>


More information about the vtkusers mailing list