00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkBranchExtentTranslator.h,v $ 00005 Language: C++ 00006 00007 00008 00009 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 00010 All rights reserved. 00011 00012 Redistribution and use in source and binary forms, with or without 00013 modification, are permitted provided that the following conditions are met: 00014 00015 * Redistributions of source code must retain the above copyright notice, 00016 this list of conditions and the following disclaimer. 00017 00018 * Redistributions in binary form must reproduce the above copyright notice, 00019 this list of conditions and the following disclaimer in the documentation 00020 and/or other materials provided with the distribution. 00021 00022 * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names 00023 of any contributors may be used to endorse or promote products derived 00024 from this software without specific prior written permission. 00025 00026 * Modified source versions must be plainly marked as such, and must not be 00027 misrepresented as being the original software. 00028 00029 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' 00030 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00031 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00032 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR 00033 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00034 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00035 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00036 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00037 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00038 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00039 00040 =========================================================================*/ 00061 #ifndef __vtkBranchExtentTranslator_h 00062 #define __vtkBranchExtentTranslator_h 00063 00064 #include "vtkExtentTranslator.h" 00065 #include "vtkImageData.h" 00066 00067 00068 class VTK_PARALLEL_EXPORT vtkBranchExtentTranslator : public vtkExtentTranslator 00069 { 00070 public: 00071 static vtkBranchExtentTranslator *New(); 00072 00073 vtkTypeMacro(vtkBranchExtentTranslator,vtkExtentTranslator); 00074 void PrintSelf(ostream& os, vtkIndent indent); 00075 00077 00078 vtkSetObjectMacro(OriginalSource,vtkImageData); 00079 vtkGetObjectMacro(OriginalSource,vtkImageData); 00081 00083 int PieceToExtent(); 00084 00086 00092 vtkSetMacro(AssignedPiece, int); 00093 vtkGetMacro(AssignedPiece, int); 00094 vtkSetMacro(AssignedNumberOfPieces, int); 00095 vtkGetMacro(AssignedNumberOfPieces, int); 00097 00098 protected: 00099 vtkBranchExtentTranslator(); 00100 ~vtkBranchExtentTranslator(); 00101 00102 vtkImageData *OriginalSource; 00103 int AssignedPiece; 00104 int AssignedNumberOfPieces; 00105 private: 00106 vtkBranchExtentTranslator(const vtkBranchExtentTranslator&); // Not implemented. 00107 void operator=(const vtkBranchExtentTranslator&); // Not implemented. 00108 }; 00109 00110 #endif 00111