[ITK-users] Composite Filter with variable stdvector of filters inside

Matt McCormick matt.mccormick at kitware.com
Tue Aug 26 11:38:34 EDT 2014


Hi Ignacio,

GenerateInputRequestedRegion() may be a good place, too.

When an Update() is called, GenerateInputRequestedRegion() will get
called during the pipeline update if the filter's Modified time
indicates this is necessary.  If the filter needs to be updated, the
GenerateData will also get called as appropriate.

The best manual I am aware of is the ITK Software Guide [1].  More
information on this subject comes in Section 8.3.2 Details of Pipeline
Execution and section 8.3 Streaming Large Data.

HTH,
Matt

[1] http://sourceforge.net/projects/itk/files/itk/4.6/InsightSoftwareGuide-Book1-4.6.0.pdf/download

On Tue, Aug 26, 2014 at 9:38 AM, Jose Ignacio Prieto
<joseignacio.prieto at gmail.com> wrote:
> Thanks Matt, my problem was that I didn't know when to call this methods. I
> finally put them into GenerateInputRequestedRegion and this way seems to be
> called before Update(). I don't know under what conditions
> GenerateInputRequestedRegion is called, for example if a parameter is
> changed after an update call, will it be called again or only GenerateData
> would be called. Is there a good developer manual? The ITK user manual seems
> a little short on this.
>
> Thanks
>
> Ignacio Prieto
>
>
> On Mon, Aug 25, 2014 at 11:46 PM, Matt McCormick
> <matt.mccormick at kitware.com> wrote:
>>
>> Hi Ignacio,
>>
>> If I understand corrections, this may do want is desired:
>>
>> void SetNumberOfZSlices( int slices )
>> {
>> if( m_NumberOfZSlices != slices )
>>   {
>>   this->m_NumberOfZSlices = slices;
>>   this->UpdateNumberOfFilters();
>>   this->Modified();
>>   }
>> }
>>
>> and a similar implementation for SetNumberOfTimeFrames().
>>
>> Hope this helps,
>> Matt
>>
>> On Wed, Aug 20, 2014 at 11:00 AM, Jose Ignacio Prieto
>> <joseignacio.prieto at gmail.com> wrote:
>> > Hi all,
>> > I am trying to create a composite filter for a 4D dataset that will use
>> > different cascaded 2D filters on the inside. For this, I have created a
>> > double std vector that holds all the 2D filters. I have also set some
>> > param
>> > setters for this filters (that perform a double for inside, setting the
>> > param to each filter and then calling modified() on the outside one). I
>> > have
>> > another method called UpdateNumberofFilters, that depending on 2 ints
>> > (num
>> > of Z slices, num of T timeframes) will push back more filters to the 2D
>> > array of filters.
>> > My problem is that I dont know which function should call the
>> > UpdateNumofFilters. It should be done before the setters but after the
>> > constructor and after setting those two ints. I want to design it so
>> > that if
>> > I change a param after calling update I dont have to run the whole
>> > filter
>> > again, so I dont want it to be under the GenerateData() method.
>> >
>> > Thank you very much for your insights.
>> >
>> > Ignacio Prieto
>> >
>> >  --
>> > Ignacio Prieto
>> > Research Assistant
>> > Biomedical Imaging Center
>> > Pontificia Universida Catolica de Chile
>> >
>> >
>> >
>> > _____________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://www.kitware.com/products/protraining.php
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://public.kitware.com/mailman/listinfo/insight-users
>> >
>
>
>
>
> --
> José Ignacio Prieto
> celular(nuevo): 94348182


More information about the Insight-users mailing list