Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageViewer "Error vtkTrivialProducer: This data object does not contain the requested extend #910

Closed
norminu opened this issue Sep 15, 2014 · 17 comments · Fixed by #1017
Closed

Comments

@norminu
Copy link

norminu commented Sep 15, 2014

Creating an instance of pcl::visualization::ImageViewer

pcl::visualization::ImageViewer::Ptr m_viewer = pcl::visualization::ImageViewer::Ptr(new pcl::visualization::ImageViewer("PCL Image Viewer"));

I got the following error:

ERROR: In VTK-6_1_0\src\Common\ExecutionModel\vtkTrivialProducer.cxx, line 268
vtkTrivialProducer (00000010A7774E50): This data object does not contain the requested extent.

I don't know if is a VTK issue or is pcl integration.

http://www.pcl-users.org/PCL-Visualizer-Error-vtkTrivialProducer-td4035513.html

@norminu
Copy link
Author

norminu commented Sep 15, 2014

Hi,

PCL trunk 11/09
VTK 6.1 with Qt5
Boost 1:56
Visual Studio 2013

CordialementNorman Acosta

2014-09-15 12:03 GMT+02:00 Victor Lamoine notifications@github.com:

I cannot reproduce this issue, please provide the exact version you are
using:

  • VTK 6.1
  • gcc 4.8.2
  • PCL latest trunk


Reply to this email directly or view it on GitHub
#910 (comment)
.

@rickytan
Copy link

I faced the same issue when I run the sample code pcl_kinfu_app

@lgleim
Copy link

lgleim commented Sep 30, 2014

I have the same issue. Might be something that occurs only on Windows. However the capture still works. Hit 'h' to see the available commands and take either a cloud or a mesh with the appropriate commands. The preview will work as well afterwards.

@aecins
Copy link
Contributor

aecins commented Oct 1, 2014

I have the same issue on Ununtu:

PCL trunk 30/09
VTK 6.0
gcc 4.8.2

@aecins
Copy link
Contributor

aecins commented Oct 2, 2014

Here is a link to a minimal example of the bug. The error is thrown when spinOnce() method of pcl::visualization::ImageViewer is called. In particular this line is the culprit.

@taketwo
Copy link
Member

taketwo commented Oct 2, 2014

Just in case, this does not apply to vtk5, it works well for me.

@Ndrey
Copy link

Ndrey commented Oct 13, 2014

Hey guys,
any progress/fixes so far?

I got the same error with the PCL example "Range Image Visualization" (http://pointclouds.org/documentation/tutorials/range_image_visualization.php)

ERROR: In C:\VTK-master\Common\ExecutionModel\vtkTrivialProducer.cxx, line 279
vtkTrivialProducer (0000000007D63120): This data object does not contain the requested extent.

Windows 7 64bit
current VTK master (6.2) and current PCL (1.7.2) both compiled with Visual Studio 2013 64 bit

@rickytan
Copy link

Attached is my CMake options for compiling from source, did I get anything wrong?
I'm using vs2010, 32 bit
default

@VictorLamoine
Copy link
Contributor

I think the migration to VTK6 is incomplete in image_viewer.cpp.

I'm gonna take a look at this.

@Ndrey
Copy link

Ndrey commented Nov 12, 2014

Thanks in advance, Victor. It would be nice to have this ;)

@VictorLamoine
Copy link
Contributor

Problems happens precisely in vtkRenderer.cxx (line 552)

  for ( i = 0; i < this->PropArrayCount; i++ )
    {
    this->NumberOfPropsRendered +=
      this->PropArray[i]->RenderOpaqueGeometry(this);
    }

I can't find a solution to this. I am able to write a working VTK renderer using VTK6 but I can't find the problem in PCL implementation.

@mdkus
Copy link
Contributor

mdkus commented Nov 20, 2014

Hi,
during several tests with ImageViewer and VTK6.2 I did some code changes #1009 to make it run fine. Perhaps it helps even with this issue.

@VictorLamoine
Copy link
Contributor

I tested and unfortunately it doesn't solve this issue!

@mdkus
Copy link
Contributor

mdkus commented Nov 21, 2014

Hi Victor,
ok, perhaps one more try (add the first or the second line in front of 'algo_->Update ()', image_viewer.cpp:

ImageViewer::addRGBImage (...
...
algo_->SetUpdateExtentToWholeExtent (); // first try
//algo_->SetUpdateExtent (image->GetExtent ()); // second try
algo_->Update ();

@VictorLamoine
Copy link
Contributor

Thanks for helping!
It doesn't solve the problem (that doesn't mean it's useless); the error happens without adding any image:

#include <pcl/visualization/image_viewer.h>

int
main (int argc, char** argv)
{
  pcl::visualization::ImageViewer image_viewer;
  image_viewer.spinOnce();
  return (0);
}
ERROR: In /home/victor/VTK-6.1.0/Common/ExecutionModel/vtkTrivialProducer.cxx, line 268
vtkTrivialProducer (0xee7a40): This data object does not contain the requested extent.

@mdkus
Copy link
Contributor

mdkus commented Nov 22, 2014

Hi Victor,

I could reproduce the error. I think its on side of vtk and was fixed on 21.5.14 in the vtk trunk:

http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=1a0b4e9dde815f84e48ee9912d19be9687c97399

@@ -249,24 +269,21 @@ vtkTrivialProducer::ProcessRequest

So I think vtk6 versions after this commit should work with the code as is, for others with older vtk6 versions this might help:

Replace (image_viewer.cpp, line 129):

                     map->SetInputData (empty_image);         

With:

                     empty_image->AllocateScalars (VTK_UNSIGNED_CHAR, 3);
                     algo_->SetInputData (empty_image);
                     map->SetInputConnection (algo_->GetOutputPort ()); 

@janeyuhui
Copy link

The SetInputData() does not set a pipeline connection. When you use it, you need to make sure that the pipeline that produce the data is manually updated. So adding a
color->Update(); or colorMap->Update() ....
before rendering happens will fix the issue.

If your intention is to setup a pipeline connection such that any change in filter parameters are automatically reflected in the viewer, use this instead:
imageViewer->SetInputConnection(color->GetOutputPort());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants