120 |
|
|
121 |
self._setupPlane(self._getTransform()) |
self._setupPlane(self._getTransform()) |
122 |
|
|
123 |
|
# Get the bounds of the object in the form of |
124 |
|
# (xmin, xmax, ymin, ymax, zmin, zmax). |
125 |
|
bounds = self.__data_collector._getDataCollectorOutput().GetBounds() |
126 |
|
# Length of the z-axis (max - min). Assumption is made that if the |
127 |
|
# length of the z-axis is equal to zero, the the data set is 2D. |
128 |
|
# Otherwise, the data set is 3D. However, there are exceptions to this |
129 |
|
# rule as some 2D data sets may have a z-axis length of non-zero, but |
130 |
|
# such exceptions are not taken into account here. |
131 |
|
z_axis_length = bounds[5] - bounds[4] |
132 |
|
|
133 |
if(self.__cell_to_point == True): # Converts cell data to point data. |
if(self.__cell_to_point == True): # Converts cell data to point data. |
134 |
c2p = CellDataToPointData(\ |
c2p = CellDataToPointData(\ |
135 |
self.__data_collector._getDataCollectorOutput()) |
self.__data_collector._getDataCollectorOutput()) |
136 |
self._setupCutter(c2p._getCellToPointOutput(), self._getPlane()) |
if(z_axis_length != 0): # A cutter is used for 3D data. |
137 |
|
self._setupCutter(c2p._getCellToPointOutput(), \ |
138 |
|
self._getPlane()) |
139 |
|
self._setupWarp(self._getCutterOutput()) |
140 |
|
elif(z_axis_length == 0): # A cutter is not used for 2D data. |
141 |
|
self._setupWarp(c2p._getCellToPointOutput()) |
142 |
elif(self.__cell_to_point == False): # No conversion happens. |
elif(self.__cell_to_point == False): # No conversion happens. |
143 |
self._setupCutter(self.__data_collector._getDataCollectorOutput(), |
if(z_axis_length != 0): # A cutter is used for 3D data. |
144 |
self._getPlane()) |
self._setupCutter(\ |
145 |
|
self.__data_collector._getDataCollectorOutput(), \ |
146 |
|
self._getPlane()) |
147 |
|
self._setupWarp(self._getCutterOutput()) |
148 |
|
elif(z_axis_length == 0): # A cutter is not used for 2D data. |
149 |
|
self._setupWarp( |
150 |
|
self.__data_collector._getDataCollectorOutput()) |
151 |
|
|
|
self._setupWarp(self._getCutterOutput()) |
|
152 |
self._setupDataSetMapper(self._getWarpOutput(), |
self._setupDataSetMapper(self._getWarpOutput(), |
153 |
lookup_table._getLookupTable()) |
lookup_table._getLookupTable()) |
154 |
|
|