@@ -269,7 +269,7 @@ pcl::ImageGrabberBase::ImageGrabberImpl::loadDepthAndRGBFiles (const std::string
269
269
{
270
270
extension = boost::algorithm::to_upper_copy (boost::filesystem::extension (itr->path ()));
271
271
pathname = itr->path ().string ();
272
- basename = boost::filesystem::basename ( itr->path ());
272
+ basename = itr->path (). stem (). string ( );
273
273
if (!boost::filesystem::is_directory (itr->status ())
274
274
&& isValidExtension (extension))
275
275
{
@@ -312,7 +312,7 @@ pcl::ImageGrabberBase::ImageGrabberImpl::loadDepthAndRGBFiles (const std::string
312
312
{
313
313
extension = boost::algorithm::to_upper_copy (boost::filesystem::extension (itr->path ()));
314
314
pathname = itr->path ().string ();
315
- basename = boost::filesystem::basename ( itr->path ());
315
+ basename = itr->path (). stem (). string ( );
316
316
if (!boost::filesystem::is_directory (itr->status ())
317
317
&& isValidExtension (extension))
318
318
{
@@ -327,7 +327,7 @@ pcl::ImageGrabberBase::ImageGrabberImpl::loadDepthAndRGBFiles (const std::string
327
327
{
328
328
extension = boost::algorithm::to_upper_copy (boost::filesystem::extension (itr->path ()));
329
329
pathname = itr->path ().string ();
330
- basename = boost::filesystem::basename ( itr->path ());
330
+ basename = itr->path (). stem (). string ( );
331
331
if (!boost::filesystem::is_directory (itr->status ())
332
332
&& isValidExtension (extension))
333
333
{
@@ -368,7 +368,7 @@ pcl::ImageGrabberBase::ImageGrabberImpl::loadPCLZFFiles (const std::string &dir)
368
368
{
369
369
extension = boost::algorithm::to_upper_copy (boost::filesystem::extension (itr->path ()));
370
370
pathname = itr->path ().string ();
371
- basename = boost::filesystem::basename ( itr->path ());
371
+ basename = itr->path (). stem (). string ( );
372
372
if (!boost::filesystem::is_directory (itr->status ())
373
373
&& isValidExtension (extension))
374
374
{
@@ -429,7 +429,7 @@ pcl::ImageGrabberBase::ImageGrabberImpl::getTimestampFromFilepath (
429
429
{
430
430
// For now, we assume the file is of the form frame_[22-char POSIX timestamp]_*
431
431
char timestamp_str[256 ];
432
- int result = std::sscanf (boost::filesystem::basename (filepath).c_str (),
432
+ int result = std::sscanf (boost::filesystem::path (filepath). stem (). string ( ).c_str (),
433
433
" frame_%22s_%*s" ,
434
434
timestamp_str);
435
435
if (result > 0 )
@@ -971,7 +971,7 @@ pcl::ImageGrabberBase::getCurrentDepthFileName () const
971
971
pathname = impl_->depth_pclzf_files_ [impl_->cur_frame_ ];
972
972
else
973
973
pathname = impl_->depth_image_files_ [impl_->cur_frame_ ];
974
- std::string basename = boost::filesystem::basename (pathname);
974
+ std::string basename = boost::filesystem::path (pathname). stem (). string ( );
975
975
return (basename);
976
976
}
977
977
// ////////////////////////////////////////////////////////////////////////////////////////
@@ -983,7 +983,7 @@ pcl::ImageGrabberBase::getPrevDepthFileName () const
983
983
pathname = impl_->depth_pclzf_files_ [impl_->cur_frame_ -1 ];
984
984
else
985
985
pathname = impl_->depth_image_files_ [impl_->cur_frame_ -1 ];
986
- std::string basename = boost::filesystem::basename (pathname);
986
+ std::string basename = boost::filesystem::path (pathname). stem (). string ( );
987
987
return (basename);
988
988
}
989
989
@@ -996,7 +996,7 @@ pcl::ImageGrabberBase::getDepthFileNameAtIndex (std::size_t idx) const
996
996
pathname = impl_->depth_pclzf_files_ [idx];
997
997
else
998
998
pathname = impl_->depth_image_files_ [idx];
999
- std::string basename = boost::filesystem::basename (pathname);
999
+ std::string basename = boost::filesystem::path (pathname). stem (). string ( );
1000
1000
return (basename);
1001
1001
}
1002
1002
0 commit comments