Hi all,

I am fighting again against these extent problems.
see threads:
   http://www.paraview.org/pipermail/paraview/2009-January/010903.html
   http://www.paraview.org/pipermail/paraview/2009-April/011674.html (for
the last mail, indeed)
   http://www.paraview.org/pipermail/paraview/2009-March/011334.html

I have an input volume with extent (0,511,0,511,0,109). I wrote a filter
that reslices this volume orthogonally along a spline curve
(Straightened-CPR). Thus the output extent does not depend on input extent
at all. If I want to see the structures around the spline, I can use, say,
about 15 voxels in the output x and y dimensions. The output's z dimension
will depend on the number of points of the spline.

My first problem was related to the outline that shows a different bounding
box than the information panel. In my case, having more than 110 points in
the curve made my output volume extent clip at 110 on z extent! I managed to
solve it by implementing the RequestUpdateExtent function. Now, the output
extent can be different than the input with -almost- no problem.

Now that I have a reliable output extent, I wish to slice the volume with a
"Slice" representation. Problem is: each time I change slice, the filter
updates!

In debug mode, the pipeline execution shows these function calls when change
current slice:

(I edited the debug output  for a more friendly reading)
##########################################################################""

vtkStraightenedCurvedPlanarReformation (1EBFB850): RequestUpdateExtent


(vtkAlgorithm.h ) vtkStraightenedCurvedPlanarReformation (1EBFB850):

                              setting AbortExecute to 0

                              returning ProgressText of (null)


vtkStraightenedCurvedPlanarReformation (1EBFB850): RequestData

(vtkAlgorithm.h ) vtkStraightenedCurvedPlanarReformation (1EBFB850):

                              setting AbortExecute to 0

                              returning ProgressText of (null)

##########################################################################""


Here is my RequestUpdateExtent function:

########################################################################
int vtkStraightenedCurvedPlanarReformation::RequestUpdateExtent (
  vtkInformation * vtkNotUsed(request),
  vtkInformationVector** inputVector,
  vtkInformationVector *outputVector)
{
  vtkDebugMacro( <<"RequestUpdateExtent"<<endl);
  //! \bug RequestUpdateExtent set the filter to Modified each time it is
  //! called. One effect is to call RequestData when slicing through the
  //! output.

  // get the info objects
  vtkInformation* outInfo = outputVector->GetInformationObject(0);
  vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);

  int outExtent[6], inExtent[6], uExtent[6]; // uExtent is no more used...

  outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), outExtent);
  outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), uExtent);
  inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), inExtent);

  // clip the inExtent to the outExtent. Is it normal to do that???
  for( int i=0; i < 6; i+=2 )
  {
     if( inExtent[i] > outExtent[i] )
        inExtent[i] = outExtent[i];
     if( inExtent[i+1] < outExtent[i+1] )
        inExtent[i+1] = outExtent[i+1];
  }

  outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), inExtent,
6);

   return( 1 );
}

####################################################################

I have very big difficulties to understand the 'extent' concept in VTK. Is
there a detailed chapter on that in VTK books?
Or do I have to parse the code, step-by-step?

Thanks for your help.
Best regards,

Jerome


2009/3/10 Jérôme <jerome.ve...@gmail.com>

> Hi,
>
> I noticed such a problem for other filters. In fact, it seems that
> vtkImageReslice and inherited filters are not ParaView compliant. I was
> forced to write external executable to process my volumes (making isotropic
> an anisotropic DICOM volume), then I open it in Paraview.
>
> Best regards,
>
> Jerome
>
> 2009/3/10 Bryn Lloyd <bll...@vision.ee.ethz.ch>
>
> Still no progress on this.
>>
>>
>> I have tried to integrate vtkImageConstantPad as a plugin. The displayed
>> outline of the image (in paraview) suggests that the extent of the enlarged
>> image is correct, but the information printed in the information tab shows
>> the same extent as the input, rather than the one I expect at the output of
>> vtkImageConstantPad.
>>
>> say the input is an 10x10x10 image. I set the output extent to be 12x12x12
>> in the vtkImageConstantPad. However, Paraview tells me the output still has
>> dimensions 10x10x10.
>>
>>
>> I have modified vtkImageConstantPad and tried different parent classes
>>  - vtkImageToImageFilter
>>  - vtkImageAlgorithm
>>  - vtkDataSetAlgorithm
>>  - vtkTrivialProducer
>>
>> ... hoping to break up the pipeline somehow, i.e. simply producing a new
>> image, which is displayed and can be used subsequently for other operations.
>>
>> Sofar with no success. I have written a test, which runs as a separate
>> program. The test proves to me that the filter DOES work as expected. But in
>> Paraview the extent is screwed-up for some reason.
>>
>>
>> I have seen similar reports by John Biddiscombe, from around 2005 and more
>> recent. Was there any solution to this?
>>
>>
>>
>> Thanks
>>
>>
>> Bryn
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to