Содержание
- 2. What’s a pipeline? You may recall that ITK is organized around data objects and process objects
- 3. The pipeline idea The pipeline consists of data objects, and things that create data objects (i.e.
- 4. Image sources itk::ImageSource The base class for all process objects that produce images without an input
- 5. Image to image filters itk::ImageToImageFilter The base class for all process objects that produce images when
- 6. Input and output ImageSource’s do not require input, so they have only a GetOutput() function ImageToImageFilter’s
- 7. Ignoring intermediate images Source Image Filter Image Filter Image Start here End here Source Filter Image
- 8. How this looks in code SrcType::Pointer src = SrcType::New(); FilAType::Pointer filterA = FilAType::New(); FilBType::Pointer filterB =
- 9. When execution occurs The previous page of code only sets up the pipeline - i.e., what
- 10. Propagation of Update() When Update() is called on a filter, the update propagates back “up” the
- 11. When are process objects updated? If the input to the process object has changed If the
- 12. Detecting process object modification The easy way is to use itkSetMacro(MemberName, type); which produces the function
- 13. Process object modification, cont. The other way is to call Modified() from within a process object
- 14. Running the pipeline - Step 1 Not sure Modified Source Filter Image Filter Start here End
- 15. Running the pipeline - Step 2 Not sure Modified Source Filter Image Filter Start here End
- 16. Not sure Updated Modified Source Filter Image Filter Start here End here Running the pipeline -
- 17. Not sure Updated Modified Source Filter Image Filter Start here End here Running the pipeline -
- 18. Not sure Updated Modified Source Filter Image Filter Start here End here Change a filter parameter
- 19. Not sure Updated Modified Source Filter Image Filter Start here End here We detect that the
- 20. Not sure Updated Modified Source Filter Image Filter Start here End here This executes Modifying the
- 21. Thoughts on pipeline modification Note that in the previous example the source never re-executed; it had
- 22. It’s easy in practice Build a pipeline Call Update() on the last filter - get the
- 23. Reading & writing You will often begin and end pipelines with readers and writers Fortunately, ITK
- 24. Reading and writing images Use itk::ImageFileReader to read images Use itk::ImageFileWriter to write images Both classes
- 25. Reading an image (4.1.2) Create a reader Create an instance of an ImageIOBase derived class (e.g.
- 26. Reader notes The ImageType template parameter is the type of image you want to convert the
- 27. Writing an image Almost identical to the reader case, but you use an ImageFileWriter instead of
- 29. Скачать презентацию