HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IMG_AddMetaData.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: IMG_DataWindow.h (IMG Library, C++)
7  *
8  * COMMENTS: Functions for finding and recording window of non-zero
9  * data in existing images.
10  */
11 
12 #pragma once
13 
14 #ifndef __IMG_DataWindow__
15 #define __IMG_DataWindow__
16 
17 #include "IMG_API.h"
18 #include <SYS/SYS_Types.h>
19 #include <iosfwd>
20 
21 class IMG_File;
22 class UT_DimRectImpl;
23 template <typename T> class UT_Rect;
25 class UT_Options;
26 
27 /// Finds the window of data above the thresholdvalue in the specified file.
28 /// Returns true if the window is less than the full image rectangle.
29 /// NOTE: The only reason the IMG_File is non-const is because of
30 /// IMG_File::read being non-const.
32  IMG_File *file,
33  UT_DimRect &datawindow,
34  fpreal thresholdvalue = 0.0,
35  std::ostream *error_stream = NULL
36 );
37 
38 /// Returns true if it succeeded and false otherwise.
40  const char *input_filename,
41  const char *output_filename = NULL,
42  fpreal render_time = -1,
43  int64 render_memory = 0,
44  bool compute_data_window = true,
45  int pad = 0,
46  bool crop_to_window = false,
47  bool crop_to_window_if_unsupported = false,
48  const char *src_planes = "C A",
49  fpreal threshold_value = 0.0,
50  bool skip_if_window_not_needed = false,
51  std::ostream *error_stream = NULL,
52  std::ostream *output_stream = NULL,
53  bool info_only = false,
54  UT_Options *extra_opt = NULL
55 );
56 
57 #endif
UT_Rect< UT_DimRectImpl > UT_DimRect
Integer rectangle class which stores its data as (x, y, width, height).
void pad(T &out, int n)
Definition: ImfXdr.h:490
#define IMG_API
Definition: IMG_API.h:10
long long int64
Definition: SYS_Types.h:116
A map of string to various well defined value types.
Definition: UT_Options.h:84
bool IMG_API IMGfindDataWindow(IMG_File *file, UT_DimRect &datawindow, fpreal thresholdvalue=0.0, std::ostream *error_stream=NULL)
Base Integer Rectangle class.
fpreal64 fpreal
Definition: SYS_Types.h:277
bool IMG_API IMGfindAndSetDataWindow(const char *input_filename, const char *output_filename=NULL, fpreal render_time=-1, int64 render_memory=0, bool compute_data_window=true, int pad=0, bool crop_to_window=false, bool crop_to_window_if_unsupported=false, const char *src_planes="C A", fpreal threshold_value=0.0, bool skip_if_window_not_needed=false, std::ostream *error_stream=NULL, std::ostream *output_stream=NULL, bool info_only=false, UT_Options *extra_opt=NULL)
Returns true if it succeeded and false otherwise.