[vtk-developers] Spline effort and tests

David Thompson david.thompson at kitware.com
Sat Sep 5 08:08:14 EDT 2015


Hi Lin,

The header test is telling you to add an export macro defined in vtkFiltersBezierModule.h to each class in the module. It means that you should declare the classes like this:
class VTKFILTERSBEZIER_EXPORT vtkXXX { ... };
On Windows, the macro is turned into a declspec that tells the compiler the class is part of the library's public API (instead of for internal use only).
The test also complains that your header file includes more than one other header. We have had problems with compilation times for VTK growing very large because developers would add many include statements to the headers (instead of putting them in the implementation file, where they belong). To keep that from happening again, the header test complains when there is more than one include file. When the include file is necessary, simply add a comment explaining why it is needed to the right of the include statement, like
#include "vtkFiltersBezierModule.h" // for export macro
The only mandatory header file is the one for the declared class's parent.
You should not implement the copy constructor and assignment operators. Instead, you should declare them as private methods and provide no implementation. Classes derived from vtkObject (which should be the default) should have instances created by calling a static New() method, should always be referenced by pointer instead of by value, and should not be copied unless ShallowCopy or DeepCopy methods are implemented. This is a design pattern used throughout VTK to make memory management safer.
The failing image tests can be fixed by adding images that are correct but drawn with a few different pixels. Each test can have multiple valid baseline images. Just download the image from the dashboard web page, name it baseline_1.png (assuming the original was baseline.png), and add its MD5 checksum to the Data directory. There should be mention of how to do this on the wiki.
    David

> On Sep 4, 2015, at 21:47, Lin M <majcjc at gmail.com> wrote:
> 
> Hi Dr. Thompson,
> 
> Some of the tests are still failing.
> 
> 1. The header test output that 
> Use export macro: VTKFILTERSBEZIER_EXPORT
> 
> File: c:/Dashboards/buildbot/eec47309/source/Filters/Bezier/vtkBezierPatchAdaptor.h has 2 includes: 
>    23: #include "vtkObject.h"
>    24: #include "vtkFiltersBezierModule.h"
> where I have no clue the problem is, and also
> File: c:/Dashboards/buildbot/eec47309/source/Filters/Bezier/vtkBREPReader.h has 2 includes: 
>    28: #include "vtkAlgorithm.h"
>    29: #include "vtkFiltersBezierModule.h"
> File: c:/Dashboards/buildbot/eec47309/source/Filters/Bezier/vtkBREPReader.h does not define copy constructor
> Should be:
> vtkBREPReader(const vtkBREPReader&); // Not implemented
> File: c:/Dashboards/buildbot/eec47309/source/Filters/Bezier/vtkBREPReader.h does not define assignment operator
> Should be:
> void operator=(const vtkBREPReader&); // Not implemented
> where I really have implemented them.
> 
> 2. The image tests seems to fail because of there are some slightly differences between the test image and the valid image.
> The lines in the valid image have different line width the rendered test image in different platforms.
> Could you give me some suggestions about how to fix that? Thank you!
> 
> Best,
> Lin
> 
>> On Sat, Sep 5, 2015 at 9:35 AM, Lin M <majcjc at gmail.com> wrote:
>> Hi Derek,
>> 
>> I put it in my public folder with the name Moto.brep (http://midas3.kitware.com/midas/folder/13193).
>> Please let me know if you have any other questions. :-)
>> 
>> Best,
>> Lin
>> 
>> 
>> 
>> 
>>> On Fri, Sep 4, 2015 at 10:55 PM, David Thompson <david.thompson at kitware.com> wrote:
>>> Hi Derek,
>>> 
>>> Lin should be able to point you at the test data. It should be on Midas, so he may just send the URL (hint hint).
>>> 
>>> > I also have a question regarding the implementation.  Would it be possible to use this work to generate a nonlinear cell type to represent an unstructured grid of Bezier patches?
>>> 
>>> Yes. The idea is that you would write an adaptor like the one Lin has written for NURBS to convert your non-linear data into Bézier patches. The patches can either be tessellated directly or operations performed on the patches.
>>> 
>>> I am working on a contouring algorithm that would take patches in and output more Bézier patches of just the ioscontours/isovolumes, but it will be some time before it is ready.
>>> 
>>>         David
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150905/3e754e7c/attachment.html>


More information about the vtk-developers mailing list