Naming the Cube Image files

95 views
Skip to first unread message

Bwanaq

unread,
Mar 26, 2010, 1:34:05 PM3/26/10
to PTGui Support
Is there an option to choose the File Names for the 6 separate Cube
Face files in PTGui?

It appears that PTGui writes out the Cube Image files as:
***.back.jpg
***.bottom.jpg
***.front.jpg
***.left.jpg
***.right.jpg
***.top.jpg
where *** is the same as the File Name for the Equirectangular image,
which is fine except for the . (dot) character between the *** and
back, bottom, etc.

The Leica Geosystems HDS (High Definition Survey) software, Cyclone,
can only import the Cube Face Images as:
*** _b.jpg
***_d.jpg
***_f.jpg
***_l.jpg
***_r.jpg
***_u.jpg
f = front, u = up, r = right, l = left, d = down and b = back

In the past we have used a DOS Batch File to rename the files, which
has worked fine, but the . (dot) between the *** and back, bottom,
etc. is causing a problem and the DOS Batch File ends up renaming the
files to:
***.back.jpg_b.jpg
***.bottom.jpg_d.jpg
***.front.jpg_f.jpg
***.left.jpg_l.jpg
***.right.jpg_r.jpg
***.top.jpg_u.jpg

If the . (dot) was replaced by an _ (underscore) the DOS Batch File
gives us the perfect answer, so I guess another question is “Is there
a reason for this .?

Best regards, Hugh.

Erik Krause

unread,
Mar 26, 2010, 4:11:59 PM3/26/10
to pt...@googlegroups.com
Am 26.03.2010 18:34, schrieb Bwanaq:
> If the . (dot) was replaced by an _ (underscore) the DOS Batch File
> gives us the perfect answer, so I guess another question is �Is there

> a reason for this .?

Try the following in a batch file, it will rename all cube face files
created by PTGui to your naming scheme:

for /F "usebackq tokens=1,2* delims=." %%a in (`dir /B *.front.jpg`) do
ren %%a.%%b.%%c %%a_f.jpg
for /F "usebackq tokens=1,2* delims=." %%a in (`dir /B *.top.jpg`) do
ren %%a.%%b.%%c %%a_u.jpg
for /F "usebackq tokens=1,2* delims=." %%a in (`dir /B *.right.jpg`) do
ren %%a.%%b.%%c %%a_r.jpg
for /F "usebackq tokens=1,2* delims=." %%a in (`dir /B *.left.jpg`) do
ren %%a.%%b.%%c %%a_l.jpg
for /F "usebackq tokens=1,2* delims=." %%a in (`dir /B *.bottom.jpg`) do
ren %%a.%%b.%%c %%a_d.jpg
for /F "usebackq tokens=1,2* delims=." %%a in (`dir /B *.back.jpg`) do
ren %%a.%%b.%%c %%a_b.jpg

This should be 6 lines only of course, the ren command must be in the
same line as the for command.

best regards
--
Erik Krause
http://www.erik-krause.de

mick crane

unread,
Mar 26, 2010, 4:49:34 PM3/26/10
to pt...@googlegroups.com

Erik Krause wrote:
> Am 26.03.2010 18:34, schrieb Bwanaq:
>> If the . (dot) was replaced by an _ (underscore) the DOS Batch File
>> gives us the perfect answer, so I guess another question is �Is

>> there
>> a reason for this .?
>
> Try the following in a batch file, it will rename all cube face files
> created by PTGui to your naming scheme:
>
> for /F "usebackq tokens=1,2* delims=." %%a in (`dir /B *.front.jpg`)
> do
the way explorer renames files is not very helpfull( select a few and
rename them) . using spaces and brackets. brackets in file names did
not seem to work with krpano at all.
It would be a handy improvement to windowsGUI to be able to rename
easily as you want.
as it is you have to spend ages searching through the notes for " now
how did I do that last time"
mick


Erik Krause

unread,
Mar 26, 2010, 5:02:24 PM3/26/10
to pt...@googlegroups.com
Am 26.03.2010 21:49, schrieb mick crane:
> the way explorer renames files is not very helpfull( select a few and
> rename them) . using spaces and brackets. brackets in file names did
> not seem to work with krpano at all.
> It would be a handy improvement to windowsGUI to be able to rename
> easily as you want.
> as it is you have to spend ages searching through the notes for " now
> how did I do that last time"

If you want to rename from explorer: There are very good bulk renaming
tools, many of them free, some stand alone some shell extensions...

mick crane

unread,
Mar 26, 2010, 5:05:21 PM3/26/10
to pt...@googlegroups.com

Erik Krause wrote:

> If you want to rename from explorer: There are very good bulk renaming
> tools, many of them free, some stand alone some shell extensions...

those perl guys seem to do it in 3 keystrokes.
I wish I was smart enough to learn perl.

mick

Bjørn K Nilssen

unread,
Mar 26, 2010, 6:01:56 PM3/26/10
to pt...@googlegroups.com

Take a look at Ant Renamer: http://www.antp.be/software/renamer
It's very easy to set up a multiple rename set that will fix the strange cube names while
we're waiting for Joost to get to that point on the wish list (it's already there).

If you're using Flashificator there's no need to rename, as it automatically translate
them to the FPP subfixes.

--
Bjørn K Nilssen - http://bknilssen.no - panoramas and 3D

Hans

unread,
Mar 26, 2010, 6:29:17 PM3/26/10
to PTGui Support

Joost promised to fix this long ago so that we can do proper naming
directly from Ptgui.
The current naming is not default in any viewer.

The best would be a choice of the 4 standard namings 123456 - 012345
- _f_r_b_l_u_d plus the current one.

Hans

Bjørn K Nilssen

unread,
Mar 26, 2010, 8:08:00 PM3/26/10
to pt...@googlegroups.com
On 26 Mar 2010 at 15:29, Hans wrote:

> > If the . (dot) was replaced by an _ (underscore) the DOS Batch File
> > gives us the perfect answer, so I guess another question is "Is there
> > a reason for this .?
>
> Joost promised to fix this long ago so that we can do proper naming
> directly from Ptgui.
> The current naming is not default in any viewer.
>
> The best would be a choice of the 4 standard namings 123456 - 012345
> - _f_r_b_l_u_d plus the current one.

There is really no reason why he shouldn't make this fully customizable?
Some day there will maybe appear a new viewer that requires some other naming scheme.
Actually I'm quite surprised that Joost didn't check what is in common use before making
those fixed subfixes. Or was it the other way around, that the viewer developers didn't
do any research?

Keith Martin

unread,
Mar 28, 2010, 11:12:20 AM3/28/10
to pt...@googlegroups.com
> those perl guys seem to do it in 3 keystrokes.
> I wish I was smart enough to learn perl.

Perl is awesome. You really *can* achieve incredible things in just a few characters. I once buckled down and learned enough of it to achieve a specific important text-processing/matching task. Then a month later I had to learn it again, from scratch, to figure out what on earth I'd done. And now I haven't a clue once more. If I need to do it again I'll be starting from scratch, yet again. And it will take me at least as long to grok it, yet again.

Perl. Not for mere mortals.

k
Reply all
Reply to author
Forward
0 new messages