Assignment:1) Download skeleton code proj7.vtk2) Download data file noise.vtk3) Compile and run and make sure it runs correctlyYou will do a series of seven tasks to learn VTK. Each time you complete a task, youshould make a copy of your source. You will be handing in your source code foreach task. They should be named proj7A.cxx, proj7B.cxx, proj7C.cxx, proj7G.cxx.What to upload? A tarball with 8 files: proj7A.cxx-proj7G.cxx + one screenshotshowing proj7F.cxx working.What are the seven tasks?:A) Make the visualization window be 768768 when the program is first invoked.B) Add a contour filter to the pipeline, with isovalues at 2.4 & 4.C) Remove the contour filter and instead slice by Z=0D) Modify the vtkLookupTable so that it smoothly interpolates from blue at theminimum to red at the maximum, with purple in between.E) Modify your program to have both a contour and a slice filter. You will need tohave two networks.F) Add two renderers. Place the slice in the left renderer and the contour in theright.G) Modify your program to iterate over isovalues. Start with 1.0 and add 0.01 all theway up to 6 (a total of 500 isovalues). Render each new value. This will make ananimation.Hints:First, the execution model appears to have changed in the last year. I found I neededto add many Update() calls to make modules update. My advice is to callUpdate() whenever you feel you have a filter that is ready to execute. (This isdifferent than how I lectured.)=== 7C ===There is no module for slicing. Instead, you use the module vtkCutter and then setup a vtkPlane and assign it as the vtkCutters CutFunction.=== 7D ===The vtkLookupTable has 256 entries. You want to set the color for each of these 256entries, manually interpolating from blue to red.=== 7E ===The output from the slice and the output from the cutter will each need to have itsown mapper and actor (so two mappers and two actors).=== 7F ===You will need two vtkRenderers and to add them to the vtkRenderWindow. Also,youll need a SetViewport command.=== 7G ===Never call vtkRenderWindowInteractor::Start().Your program should just end after the 500 iterations.I found that the camera wasnt setting itself correctly. Each time I updated theisovalue, I did:cf->Update();ren2->GetActiveCamera()->ShallowCopy(ren->GetActiveCamera());Note: this screenshot refers to the parts as 1A, 1B, etc., instead of 7A, 7B, etc.
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.