Re: opening a PLY file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: opening a PLY file

aichim
Administrator
Hi,

Actually VTK is not finding the file (we use VTK to parse PLY files). Make sure that the path is correct (and try not to hardcode paths).

Cheers,
Alex


On Mon, Jun 3, 2013 at 3:52 PM, Ramiz <[hidden email]> wrote:
Dear all,

I was using the simple visualization example as a basis for my application.
I am able to plot the cloud and color code. Everything is working fine so
far, except one thing:
I am tryin to import a CAD data from a PLY file and to visualize in the same
3D viewer window, using the this line

viewer-> addModelFromPLYFile(''test2.ply")

but i get an error :
ERROR: In
C:\Projets\PCL\SuperBuild_2010_x64_vtk_qvtk\CMakeExternal\Source\VTK\IO\vtkPLYReader.cxx,
line 117
vtkPLYReader (0000000002C96DA0): Could not open PLY file

ERROR: In
C:\Projets\PCL\SuperBuild_2010_x64_vtk_qvtk\CMakeExternal\Source\VTK\Filtering\vtkExecutive.cxx,
line 756
vtkStreamingDemandDrivenPipeline (0000000002CE8600): Algorithm
vtkPLYReader(0000000002C96DA0) returned failure for request: vtkInformation
(0000000002CF0C90)
  Debug: Off
  Modified Time: 6227
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA
  FROM_OUTPUT_PORT: 0
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0

here is the main part of my code :
//
pcl::PointCloud<pcl::PointXYZRGB>::Ptr point_cloud_ptr (new
pcl::PointCloud<pcl::PointXYZRGB>);
  pcl::PointXYZRGB point;
  point_cloud_ptr->width = (int) point_cloud_ptr->points.size ();
  point_cloud_ptr->height = 1;

  pcl::visualization::PointCloudColorHandlerRGBField<pcl::PointXYZRGB>
rgb(point_cloud_ptr);
  boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer (new
pcl::visualization::PCLVisualizer ("3D Viewer"));
  viewer->setBackgroundColor (0, 0, 0);
  viewer->addPointCloud<pcl::PointXYZRGB> (point_cloud_ptr, rgb,"sample
cloud");
  viewer->setPointCloudRenderingProperties
(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 3, "sample cloud");
  viewer->addCoordinateSystem (1.0);
  viewer->addModelFromPLYFile("test2.ply");
...

//

The rest of my code executes normally. I was wondering if I need to create a
separate vector and a pointer to store this PLY and its data before I can
insert in into the Viewer window directly, like we do for a point cloud.
Since I have found no examples with PLY files and the method
addModuleFromPLY, and everything compiled without errors, I was hoping
someone could give me a hint.

Best regards,
Ramiz
p.s. here is a screenshot
<http://www.pcl-users.org/file/n4028087/Unbenannt.png>





--
View this message in context: http://www.pcl-users.org/opening-a-PLY-file-tp4028087.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Antwort: Re: opening a PLY file

Ramiz
Thank you,
yes, and I have also learned that the path must be entered with "\" and not "/"
Best regards,
Ramiz
__________________________________________

Fraunhofer-Institut für Produktionstechnologie IPT
Ramiz Azadaliyev


Steinbachstraße 17
52074 Aachen

[hidden email]

http://www.ipt.fraunhofer.de
__________________________________________





Von:        Alexandru-Eugen Ichim <[hidden email]>
An:        "Point Cloud Library (PCL) users" <[hidden email]>,
Datum:        03.06.2013 16:55
Betreff:        Re: [PCL-users] opening a PLY file
Gesendet von:        [hidden email]




Hi,

Actually VTK is not finding the file (we use VTK to parse PLY files). Make sure that the path is correct (and try not to hardcode paths).

Cheers,
Alex


On Mon, Jun 3, 2013 at 3:52 PM, Ramiz <ramiz.azadaliyev@...> wrote:
Dear all,

I was using the simple visualization example as a basis for my application.
I am able to plot the cloud and color code. Everything is working fine so
far, except one thing:
I am tryin to import a CAD data from a PLY file and to visualize in the same
3D viewer window, using the this line

viewer-> addModelFromPLYFile(''test2.ply")

but i get an error :
ERROR: In
C:\Projets\PCL\SuperBuild_2010_x64_vtk_qvtk\CMakeExternal\Source\VTK\IO\vtkPLYReader.cxx,
line 117
vtkPLYReader (0000000002C96DA0): Could not open PLY file

ERROR: In
C:\Projets\PCL\SuperBuild_2010_x64_vtk_qvtk\CMakeExternal\Source\VTK\Filtering\vtkExecutive.cxx,
line 756
vtkStreamingDemandDrivenPipeline (0000000002CE8600): Algorithm
vtkPLYReader(0000000002C96DA0) returned failure for request: vtkInformation
(0000000002CF0C90)
  Debug: Off
  Modified Time: 6227
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA
  FROM_OUTPUT_PORT: 0
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0

here is the main part of my code :
//
pcl::PointCloud<pcl::PointXYZRGB>::Ptr point_cloud_ptr (new
pcl::PointCloud<pcl::PointXYZRGB>);
  pcl::PointXYZRGB point;
  point_cloud_ptr->width = (int) point_cloud_ptr->points.size ();
  point_cloud_ptr->height = 1;

  pcl::visualization::PointCloudColorHandlerRGBField<pcl::PointXYZRGB>
rgb(point_cloud_ptr);
  boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer (new
pcl::visualization::PCLVisualizer ("3D Viewer"));
  viewer->setBackgroundColor (0, 0, 0);
  viewer->addPointCloud<pcl::PointXYZRGB> (point_cloud_ptr, rgb,"sample
cloud");
  viewer->setPointCloudRenderingProperties
(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 3, "sample cloud");
  viewer->addCoordinateSystem (1.0);
  viewer->addModelFromPLYFile("test2.ply");
...

//

The rest of my code executes normally. I was wondering if I need to create a
separate vector and a pointer to store this PLY and its data before I can
insert in into the Viewer window directly, like we do for a point cloud.
Since I have found no examples with PLY files and the method
addModuleFromPLY, and everything compiled without errors, I was hoping
someone could give me a hint.

Best regards,
Ramiz
p.s. here is a screenshot
<
http://www.pcl-users.org/file/n4028087/Unbenannt.png>





--
View this message in context:
http://www.pcl-users.org/opening-a-PLY-file-tp4028087.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________

[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] /
http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: opening a PLY file

Sinara
This post has NOT been accepted by the mailing list yet.
In reply to this post by aichim
Dear administrator,

Does this path means the path the error sentence told us?

Thanks.

Best regards