MCPcopy Create free account
hub / github.com/Kitware/VTK / SetDisplayExtent

Method SetDisplayExtent

Rendering/Core/vtkImageActor.cxx:187–219  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

185
186//------------------------------------------------------------------------------
187void vtkImageActor::SetDisplayExtent(const int extent[6])
188{
189 int idx, modified = 0;
190
191 for (idx = 0; idx < 6; ++idx)
192 {
193 if (this->DisplayExtent[idx] != extent[idx])
194 {
195 this->DisplayExtent[idx] = extent[idx];
196 modified = 1;
197 }
198 }
199
200 if (modified)
201 {
202 if (this->Mapper && this->Mapper->IsA("vtkImageSliceMapper"))
203 {
204 if (this->DisplayExtent[0] <= this->DisplayExtent[1])
205 {
206 static_cast<vtkImageSliceMapper*>(this->Mapper)->CroppingOn();
207 static_cast<vtkImageSliceMapper*>(this->Mapper)->SetCroppingRegion(this->DisplayExtent);
208 static_cast<vtkImageSliceMapper*>(this->Mapper)
209 ->SetOrientation(vtkImageActor::GetOrientationFromExtent(this->DisplayExtent));
210 }
211 else
212 {
213 static_cast<vtkImageSliceMapper*>(this->Mapper)->CroppingOff();
214 static_cast<vtkImageSliceMapper*>(this->Mapper)->SetOrientationToZ();
215 }
216 }
217 this->Modified();
218 }
219}
220//------------------------------------------------------------------------------
221void vtkImageActor::SetDisplayExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ)
222{

Callers 15

mainFunction · 0.80
BuildRepresentationMethod · 0.80
TestAffineWidgetFunction · 0.80
TestSeedWidget2Function · 0.80
TestBiDimensionalWidgetFunction · 0.80
TestImageTracerWidgetFunction · 0.80
TestOrientedGlyphContourFunction · 0.80
TestFocalPlaneContourFunction · 0.80
UpdateDisplayExtentMethod · 0.80
RenderMethod · 0.80

Calls 3

IsAMethod · 0.80
SetOrientationMethod · 0.45
ModifiedMethod · 0.45

Tested by 8

TestAffineWidgetFunction · 0.64
TestSeedWidget2Function · 0.64
TestBiDimensionalWidgetFunction · 0.64
TestImageTracerWidgetFunction · 0.64
TestOrientedGlyphContourFunction · 0.64
TestFocalPlaneContourFunction · 0.64