# I3DImageDocument Struct Reference
[Shell Interfaces]

Inheritance diagram for I3DImageDocument:

List of all members.

## Public Member Functions
virtual MCCOMErr MCCOMAPI | InitializeRasterLayer (uint32 width, uint32 height, ELayerColorType colorType, real32 dpi=72.0f)=0
virtual MCCOMErr MCCOMAPI | LoadFromDisk (IMCFile *aFile, IDType format, TPSIOParameter *param=nil)=0
virtual MCCOMErr MCCOMAPI | SaveToDisk (IMCFile *aFile, IDType format, boolean displayOptions=true, TPSOptions *pluginOptions=nil, TPSIOParameter *param=nil)=0
virtual MCCOMErr MCCOMAPI | GetRasterLayer (IShRasterLayer **rasterLayer)=0
virtual MCCOMErr MCCOMAPI | SetRasterLayer (IShRasterLayer *rasterLayer)=0
virtual MCCOMErr MCCOMAPI | CreateNewRasterLayer (IShRasterLayer **rasterLayer)=0
virtual void MCCOMAPI | SetGBuffers32 (const TGBuffer32List &GBufferList)=0
virtual void MCCOMAPI | SetLayerList (IShLayerList *layerList)=0
virtual MCCOMErr MCCOMAPI | UpdateRect (const TMCRect &rect)=0
virtual MCCOMErr MCCOMAPI | CloseWindow ()=0
virtual void MCCOMAPI | SetWarnWhenClosing (TWarnWhenClosingCallback warnWhenClosing, void *closeInfo)=0
virtual void MCCOMAPI | SetScratchDocFullPathName (const TMCString &fullPathName)=0
virtual void MCCOMAPI | SetFrameNumber (boolean displayFrame, uint curFrame, uint maxFrame)=0
virtual void MCCOMAPI | SetIsPreview (boolean trueOrFalse)=0
virtual boolean MCCOMAPI | IsPreview ()=0
virtual void MCCOMAPI | ShowWindow ()=0
virtual void MCCOMAPI | AdjustWindowSize ()=0

## Detailed Description

This interface is used to access an image document in Carrara. It can be used to access the image after the rendering.

## Member Function Documentation

virtual void MCCOMAPI I3DImageDocument::AdjustWindowSize | ( |  | ) | `[pure virtual]`

Resize the document window to the raster layer size

virtual MCCOMErr MCCOMAPI I3DImageDocument::CloseWindow | ( |  | ) | `[pure virtual]`

Close the document window.

virtual MCCOMErr MCCOMAPI I3DImageDocument::CreateNewRasterLayer | ( | IShRasterLayer ** | rasterLayer | ) | `[pure virtual]`

Creates a new empty image in the document.

Parameters:

  | rasterLayer | A pointer to the rasterlayer that is created.

virtual MCCOMErr MCCOMAPI I3DImageDocument::GetRasterLayer | ( | IShRasterLayer ** | rasterLayer | ) | `[pure virtual]`

Returns a pointer to the rasterlayer that contains the image.

Parameters:

  | rasterLayer | The rasterlayer that is returned.

virtual MCCOMErr MCCOMAPI I3DImageDocument::InitializeRasterLayer | ( | uint32 | width,
|  | uint32 | height,
|  | ELayerColorType | colorType,
|  | real32 | dpi = `72.0f` |
| ) |  |  | `[pure virtual]`

Creates a raster layer for the image document and the default channels

Parameters:

  | width | width of the layer
  | height | height of the layer
  | colorType | type of the layer (RGB or RGBA)
  | dpi | resolution of the layer in dot per inch

virtual boolean MCCOMAPI I3DImageDocument::IsPreview | ( |  | ) | `[pure virtual]`

Returns true if the document is a preview window

virtual MCCOMErr MCCOMAPI I3DImageDocument::LoadFromDisk | ( | IMCFile * | aFile,
|  | IDType | format,
|  | TPSIOParameter * | param = `nil` |
| ) |  |  | `[pure virtual]`

Loads the image from a file on the disc.

Parameters:

  | aFile | The file that contains the image.
  | format | The ID of the file format
  | param | Optional parameters.

virtual MCCOMErr MCCOMAPI I3DImageDocument::SaveToDisk | ( | IMCFile * | aFile,
|  | IDType | format,
|  | boolean | displayOptions = `true`,
|  | TPSOptions * | pluginOptions = `nil`,
|  | TPSIOParameter * | param = `nil` |
| ) |  |  | `[pure virtual]`

Saves the image into a file on the disc

Parameters:

  | aFile | A pointer to the file where the image should be saved.
  | format | The file format.
  | displayOptions | True if the option dialog box should be displayed
  | pluginOptions |
  | param | Optional parameters

virtual void MCCOMAPI I3DImageDocument::SetFrameNumber | ( | boolean | displayFrame,
|  | uint | curFrame,
|  | uint | maxFrame |
| ) |  |  | `[pure virtual]`

Used for title display (curFrame/maxFrame).

Parameters:

  | displayFrame | True if the frame count should be displayed
  | curFrame | The current frame
  | maxFrame | The total number of frame.

virtual void MCCOMAPI I3DImageDocument::SetGBuffers32 | ( | const TGBuffer32List & | GBufferList | ) | `[pure virtual]`

Sets the GBuffers associated with the current image.

Parameters:

  | GBufferList | A list of GBuffers.

virtual void MCCOMAPI I3DImageDocument::SetIsPreview | ( | boolean | trueOrFalse | ) | `[pure virtual]`

Called when this image document is used as a preview Window. The preview window is only hidden when the close button is clicked on. It's title is always preview.

Parameters:

  | trueOrFalse | True if it is a preview window (as used for rendering).

virtual void MCCOMAPI I3DImageDocument::SetLayerList | ( | IShLayerList * | layerList | ) | `[pure virtual]`

Sets the layer list to use.

virtual MCCOMErr MCCOMAPI I3DImageDocument::SetRasterLayer | ( | IShRasterLayer * | rasterLayer | ) | `[pure virtual]`

Sets the rasterlayer that contains the image of the document.

Parameters:

  | rasterLayer | The image.

virtual void MCCOMAPI I3DImageDocument::SetScratchDocFullPathName | ( | const TMCString & | fullPathName | ) | `[pure virtual]`

Sets the path of a file temporary file where the image can be stored.

Parameters:

  | fullPathName | The full pathname of the temporary document.

virtual void MCCOMAPI I3DImageDocument::SetWarnWhenClosing | ( | TWarnWhenClosingCallback | warnWhenClosing,
|  | void * | closeInfo |
| ) |  |  | `[pure virtual]`

Set the callback if you need to authorize the image closing (You don't want the image to be closed when you render it) closeInfo is deleted in the destructor of image3DDocument.

Parameters:

  | warnWhenClosing | The callback that should be called if the user tries to close the document window.
  | closeInfo | Some private data that are passed to the callback.

virtual void MCCOMAPI I3DImageDocument::ShowWindow | ( |  | ) | `[pure virtual]`

Makes the document window visible and put it in front of the other windows

virtual MCCOMErr MCCOMAPI I3DImageDocument::UpdateRect | ( | const TMCRect & | rect | ) | `[pure virtual]`

Updates a rectangle of the image on the screen.

Parameters:

  | rect | The rectangle that should be updated.

The documentation for this struct was generated from the following file:

- I3DImageDocument.h