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_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 vtkSetObjectMacro(OriginalSource,vtkImageData); 00078 vtkGetObjectMacro(OriginalSource,vtkImageData); 00079 00081 int PieceToExtent(); 00082 00089 vtkSetMacro(AssignedPiece, int); 00090 vtkGetMacro(AssignedPiece, int); 00091 vtkSetMacro(AssignedNumberOfPieces, int); 00092 vtkGetMacro(AssignedNumberOfPieces, int); 00093 00094 protected: 00095 vtkBranchExtentTranslator(); 00096 ~vtkBranchExtentTranslator(); 00097 vtkBranchExtentTranslator(const vtkBranchExtentTranslator&) {}; 00098 void operator=(const vtkBranchExtentTranslator&) {}; 00099 00100 vtkImageData *OriginalSource; 00101 int AssignedPiece; 00102 int AssignedNumberOfPieces; 00103 }; 00104 00105 #endif 00106