Stewart Dickson | 3 Feb 20:12
Picon
Favicon

Unpacking the multiView attribute?

Dumb question?

When reading the MultiView/* image files in the OpenEXR Sample Images source:
http://download.savannah.nongnu.org/releases/openexr/openexr-images-1.7.0.tar.gz
openexr-images-1.7.0/MultiView/*

One encounters the attribute of type StringVector, which I don't see hooks in the
OpenEXR API to unpack.

Can anyone explain how to do it?

Thanks,

-Stewart Dickson

From: 	Peter Hillman
Subject: 	Re: [Openexr-devel] Camera matrices in sxr files
Date: 	Wed, 04 Feb 2009 10:24:09 +1300
User-agent: 	Thunderbird 2.0.0.19 (X11/20090105)

This came up on the renderman forum last year:
https://renderman.pixar.com/forum/showthread.php?s=&threadid=10209

Florian's suggestion was to use <view>.worldToCamera and <view>.worldToNDC as the attribute names,
except the Default View (the first view listed in the multiView attribute), which remain worldToCamera
and worldToNDC, so that non-sxr aware software (which only loads the default view) would pick up the
corresponding worldToCamera/worldToNDC So if you have left-eye as hero eye you'd have worldToCamera
for the left and right.worldToCamera for the right
Paul Miller | 3 Feb 20:21
Gravatar

Re: Unpacking the multiView attribute?

On 2/3/2012 1:12 PM, Stewart Dickson wrote:
> Dumb question?
>
> When reading the MultiView/* image files in the OpenEXR Sample Images source:
> http://download.savannah.nongnu.org/releases/openexr/openexr-images-1.7.0.tar.gz
> openexr-images-1.7.0/MultiView/*
>
> One encounters the attribute of type StringVector, which I don't see hooks in the
> OpenEXR API to unpack.
>
> Can anyone explain how to do it?

Here is how I do it:

const StringVectorAttribute *multiView = 
file->header().findTypedAttribute<StringVectorAttribute>("multiView");
if (multiView)
{
    const StringVector &value = multiView->value();
    std::string def_view = defaultViewName(value);
    ...
}
Stewart Dickson | 3 Feb 21:22
Picon
Favicon

Re: Unpacking the multiView attribute?

Thanks, Paul,

Is this in OpenEXR version 1.7.0?

In openexr-1.6.1, I get:
 error: ISO C++ forbids declaration of ‘StringVectorAttribute’ with no type

I'll try version 1.7.0

Thanks again,

-Stewart

----- Original Message -----
From: "Paul Miller" <paul <at> fxtech.com>
To: openexr-devel <at> nongnu.org
Sent: Friday, February 3, 2012 1:21:50 PM
Subject: Re: [Openexr-devel] Unpacking the multiView attribute?

On 2/3/2012 1:12 PM, Stewart Dickson wrote:
> Dumb question?
>
> When reading the MultiView/* image files in the OpenEXR Sample Images source:
> http://download.savannah.nongnu.org/releases/openexr/openexr-images-1.7.0.tar.gz
> openexr-images-1.7.0/MultiView/*
>
> One encounters the attribute of type StringVector, which I don't see hooks in the
> OpenEXR API to unpack.
>
> Can anyone explain how to do it?
(Continue reading)

Paul Miller | 3 Feb 22:05
Gravatar

Re: Unpacking the multiView attribute?

On 2/3/2012 2:22 PM, Stewart Dickson wrote:
> Thanks, Paul,
>
> Is this in OpenEXR version 1.7.0?
>
> In openexr-1.6.1, I get:
>   error: ISO C++ forbids declaration of ‘StringVectorAttribute’ with no type

It's probably in the Imf namespace. I have a

using namespace Imf;
using namespace Imath;

at the top of my code. I'm pretty sure it was in 1.6.

_______________________________________________
Openexr-devel mailing list
Openexr-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/openexr-devel
Stewart Dickson | 3 Feb 22:14
Picon
Favicon

Re: Unpacking the multiView attribute?

Nope,

In openexr-1.7.0/IlmImf there exists:
ImfStringVectorAttribute.h
In openexr-1.6.1/IlmImf
no such beast.

Which brings up my next question.

Is there a way to switch
#if defined(OPENEXR_VERSION > 1.6.1)
To turn off reference to StringVectorAttribute
when building against openexr-1.6.1 version of the code?

Thanks,

-Stewart

----- Original Message -----
From: "Paul Miller" <paul <at> fxtech.com>
To: "Stewart Dickson" <sdickson <at> wolfram.com>
Cc: openexr-devel <at> nongnu.org
Sent: Friday, February 3, 2012 3:05:20 PM
Subject: Re: [Openexr-devel] Unpacking the multiView attribute?

On 2/3/2012 2:22 PM, Stewart Dickson wrote:
> Thanks, Paul,
>
> Is this in OpenEXR version 1.7.0?
>
(Continue reading)

Peter Hillman | 4 Feb 00:43
Picon

Re: Unpacking the multiView attribute?

1.7.0 was indeed the first version to ship with that header, although it was in the CVS for some time before 1.7 was released.

Weta back-ported  support for the attribute into our 1.6 build, as did quite a few others. An autoconf type mechanism might be the most robust way of detecting support for that attribute





-------- Original message --------
Subject: Re: [Openexr-devel] Unpacking the multiView attribute?
From: Stewart Dickson <sdickson <at> wolfram.com>
To: Paul Miller <paul <at> fxtech.com>
CC: openexr-devel <at> nongnu.org


 Nope,

In openexr-1.7.0/IlmImf there exists:
ImfStringVectorAttribute.h
In openexr-1.6.1/IlmImf
no such beast.

Which brings up my next question.

Is there a way to switch
#if defined(OPENEXR_VERSION > 1.6.1)
To turn off reference to StringVectorAttribute
when building against openexr-1.6.1 version of the code?

Thanks,

-Stewart

----- Original Message -----
From: "Paul Miller" <paul <at> fxtech.com>
To: "Stewart Dickson" <sdickson <at> wolfram.com>
Cc: openexr-devel <at> nongnu.org
Sent: Friday, February 3, 2012 3:05:20 PM
Subject: Re: [Openexr-devel] Unpacking the multiView attribute?

On 2/3/2012 2:22 PM, Stewart Dickson wrote:
> Thanks, Paul,
>
> Is this in OpenEXR version 1.7.0?
>
> In openexr-1.6.1, I get:
>   error: ISO C++ forbids declaration of ‘StringVectorAttribute’ with no type

It's probably in the Imf namespace. I have a

using namespace Imf;
using namespace Imath;

at the top of my code. I'm pretty sure it was in 1.6.

_______________________________________________
Openexr-devel mailing list
Openexr-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/openexr-devel
_______________________________________________
Openexr-devel mailing list
Openexr-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/openexr-devel

Gmane