Thanks for your reply.

Unfortunately i cannot share the dataset. However, the input data only relates 
to the output data in a way that it provides an upper bound for the output 
bounds. The actual dimensions and bounds are input by the user and are then 
processed to extent and spacing which are used for the output properties.

I am constructing the grid in the following way:

    this->seedGrid =    vtkSmartPointer<vtkImageData>::New();

    int extentSeedGrid[6];
    extentSeedGrid[0] = 0;
    extentSeedGrid[1] = static_cast<int>(this->dimensionSeedGrid[0])-1;
    extentSeedGrid[2] = 0;
    extentSeedGrid[3] = static_cast<int>(this->dimensionSeedGrid[1])-1;
    extentSeedGrid[4] = 0;
    extentSeedGrid[5] = static_cast<int>(this->dimensionSeedGrid[2])-1;

    ///Set Size and extent of the seedng grid
    seedGrid->SetExtent(extentSeedGrid);
    seedGrid->SetOrigin(this->originSeedGrid);
    ///Calculate and set spacing of the seeding grid


    this->spacingSeedGrid[0] = 
this->boundsSeedGrid[0]/static_cast<double>(extentSeedGrid[1]);
    this->spacingSeedGrid[1] = 
this->boundsSeedGrid[1]/static_cast<double>(extentSeedGrid[3]);
    this->spacingSeedGrid[2] = 
this->boundsSeedGrid[2]/static_cast<double>(extentSeedGrid[5]);
    this->seedGrid->SetSpacing(this->spacingSeedGrid);



#if VTK_MAJOR_VERSION <= 5

    this->seedGrid->SetNumberOfScalarComponents(1);
    this->seedGrid->SetScalarTypeToDouble();
    this->seedGrid->AllocateScalars();

#else
    this->seedGrid->AllocateScalars(VTK_DOUBLE,1);
#endif


Where dimensionsSeedGrid and boundsSeedGrid are input by the user.
Paraview does show the correct bounds and dimensions within the  information 
tab.

I hope this provides useful information to find the solution of my problem


Best regards

Philipp Jung


On 25.04.2017 16:22, Utkarsh Ayachit wrote:
If you can share the dataset, it may be easier to point out what could be going 
wrong.

Thanks
Utkarsh

On Tue, Apr 25, 2017 at 4:47 AM, philipp jung 
<philippjung2...@live.de<mailto:philippjung2...@live.de>> wrote:

Dear all,

Within one of my custom filters i am trying to return an uniform grid, i.e. 
vtkImageData.

When using the filter within paraview the bounds, extent and spacing are 
detected correctly, meaning they are the same as the input, as intended. 
However, the outline representation greatly differs from the outline of the 
input data. I have included pictures of the surface and point representation of 
the output. Notice that the "volume" is open on the one side. The outline image 
shows the outline of the original image, which would be the correct size, while 
the actual outline is larger than intended. I appreciate any indication what 
might be causing this behavior.

Best regards

Philipp Jung




[cid:part2.ADD96D4C.ECBA6183@live.de][cid:part3.5E9C7764.F8D25B20@live.de][cid:part4.6587D9B7.212D99A3@live.de]

_______________________________________________
Powered by www.kitware.com<http://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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview



_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to