Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Common/vtkDataObject.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00050 #ifndef __vtkDataObject_h
00051 #define __vtkDataObject_h
00052
00053 #include "vtkObject.h"
00054
00055 class vtkFieldData;
00056 class vtkProcessObject;
00057 class vtkSource;
00058 class vtkExtentTranslator;
00059
00060 #define VTK_PIECES_EXTENT 0
00061 #define VTK_3D_EXTENT 1
00062
00063 class VTK_COMMON_EXPORT vtkDataObject : public vtkObject
00064 {
00065 public:
00066 static vtkDataObject *New();
00067
00068 vtkTypeRevisionMacro(vtkDataObject,vtkObject);
00069 void PrintSelf(ostream& os, vtkIndent indent);
00070
00071 #ifndef VTK_REMOVE_LEGACY_CODE
00072
00073 virtual vtkDataObject* MakeObject();
00074 #endif
00075
00077
00078 vtkGetObjectMacro(Source,vtkSource);
00079 void SetSource(vtkSource *s);
00081
00084 unsigned long int GetMTime();
00085
00086
00087
00088 virtual void Initialize();
00089
00094 void ReleaseData();
00095
00098 int ShouldIReleaseData();
00099
00101
00102 vtkGetMacro(DataReleased,int);
00104
00106
00108 vtkSetMacro(ReleaseDataFlag,int);
00109 vtkGetMacro(ReleaseDataFlag,int);
00110 vtkBooleanMacro(ReleaseDataFlag,int);
00112
00114
00116 static void SetGlobalReleaseDataFlag(int val);
00117 void GlobalReleaseDataFlagOn() {this->SetGlobalReleaseDataFlag(1);};
00118 void GlobalReleaseDataFlagOff() {this->SetGlobalReleaseDataFlag(0);};
00119 static int GetGlobalReleaseDataFlag();
00121
00123
00124 virtual void SetFieldData(vtkFieldData*);
00125 vtkGetObjectMacro(FieldData,vtkFieldData);
00127
00128
00129 virtual void UnRegister(vtkObjectBase *o);
00130
00134 virtual int GetNetReferenceCount() {return this->ReferenceCount;};
00135
00141 virtual void Update();
00142
00148 virtual void UpdateInformation();
00149
00154 virtual void PropagateUpdateExtent();
00155
00161 virtual void TriggerAsynchronousUpdate();
00162
00169 virtual void UpdateData();
00170
00176 virtual unsigned long GetEstimatedMemorySize();
00177
00179
00182 virtual void SetUpdateExtent(int vtkNotUsed(piece),int vtkNotUsed(numPieces),
00183 int vtkNotUsed(ghostLevel))
00184 {vtkErrorMacro("Subclass did not implement 'SetUpdateExtent'");}
00185 void SetUpdateExtent(int piece, int numPieces)
00186 {this->SetUpdateExtent(piece, numPieces, 0);}
00188
00190
00197 virtual void SetUpdateExtent(int x1, int x2, int y1, int y2, int z1, int z2);
00198 virtual void SetUpdateExtent( int ext[6] );
00199 vtkGetVector6Macro( UpdateExtent, int );
00201
00206 virtual int GetDataObjectType() {return VTK_DATA_OBJECT;}
00207
00210 unsigned long GetUpdateTime();
00211
00216 void SetUpdateExtentToWholeExtent();
00217
00218 void SetPipelineMTime(unsigned long time) {this->PipelineMTime = time; }
00219 vtkGetMacro(PipelineMTime, unsigned long);
00220
00226 virtual unsigned long GetActualMemorySize();
00227
00229 void CopyInformation( vtkDataObject *data );
00230
00232
00233 virtual void CopyTypeSpecificInformation( vtkDataObject *data )
00234 {this->CopyInformation( data );};
00236
00238
00240 void SetUpdatePiece(int piece);
00241 void SetUpdateNumberOfPieces(int num);
00242 vtkGetMacro( UpdatePiece, int );
00243 vtkGetMacro( UpdateNumberOfPieces, int );
00245
00247
00249 void SetUpdateGhostLevel(int level);
00250 vtkGetMacro(UpdateGhostLevel, int);
00252
00254
00259 void SetRequestExactExtent(int v);
00260 vtkGetMacro(RequestExactExtent, int);
00261 vtkBooleanMacro(RequestExactExtent, int);
00263
00265
00268 vtkSetVector6Macro( WholeExtent, int );
00269 vtkGetVector6Macro( WholeExtent, int );
00271
00273
00277 vtkSetMacro( MaximumNumberOfPieces, int );
00278 vtkGetMacro( MaximumNumberOfPieces, int );
00280
00284 void DataHasBeenGenerated();
00285
00289 virtual void PrepareForNewData() {this->Initialize();};
00290
00292
00294 virtual void ShallowCopy(vtkDataObject *src);
00295 virtual void DeepCopy(vtkDataObject *src);
00297
00299
00302 vtkSetMacro(Locality, float);
00303 vtkGetMacro(Locality, float);
00305
00307
00308 void SetExtentTranslator(vtkExtentTranslator *translator);
00309 vtkExtentTranslator *GetExtentTranslator();
00311
00313
00314 vtkGetMacro(NumberOfConsumers,int);
00316
00318
00319 void AddConsumer(vtkObject *c);
00320 void RemoveConsumer(vtkObject *c);
00321 vtkObject *GetConsumer(int i);
00322 int IsConsumer(vtkObject *c);
00324
00325
00326 protected:
00327
00328 vtkDataObject();
00329 ~vtkDataObject();
00330
00331
00332 vtkFieldData *FieldData;
00333
00334
00335 vtkSource *Source;
00336
00337
00338 int DataReleased;
00339
00340
00341 int NumberOfConsumers;
00342 vtkObject **Consumers;
00343
00345 int UpdateExtentIsOutsideOfTheExtent();
00346
00351 int UpdateExtentIsEmpty();
00352
00360 virtual int VerifyUpdateExtent();
00361
00362
00363
00364
00365
00366
00367
00368 virtual int GetExtentType() { return VTK_PIECES_EXTENT; };
00369
00370
00371
00372
00373 int WholeExtent[6];
00374 int Extent[6];
00375 int UpdateExtent[6];
00376
00377 unsigned char UpdateExtentInitialized;
00378
00379 vtkExtentTranslator *ExtentTranslator;
00380
00381
00382 int NumberOfPieces;
00383 int Piece;
00384 int MaximumNumberOfPieces;
00385 int UpdateNumberOfPieces;
00386 int UpdatePiece;
00387
00388
00389
00390
00391
00392
00393
00394 int RequestExactExtent;
00395
00396
00397
00398 virtual void Crop();
00399
00400 int GhostLevel;
00401 int UpdateGhostLevel;
00402
00403
00404 int ReleaseDataFlag;
00405
00406
00407 vtkTimeStamp UpdateTime;
00408
00409
00410
00411 unsigned long PipelineMTime;
00412
00413
00414 int LastUpdateExtentWasOutsideOfTheExtent;
00415
00416
00417
00418
00419
00420
00421 float Locality;
00422
00423 private:
00424
00425 void InternalDataObjectCopy(vtkDataObject *src);
00426 private:
00427 vtkDataObject(const vtkDataObject&);
00428 void operator=(const vtkDataObject&);
00429 };
00430
00431 #endif
00432