Hi all,<br><br>I am fighting again against these extent problems.<br>see threads:<br> <a href="http://www.paraview.org/pipermail/paraview/2009-January/010903.html">http://www.paraview.org/pipermail/paraview/2009-January/010903.html</a><br>
<a href="http://www.paraview.org/pipermail/paraview/2009-April/011674.html">http://www.paraview.org/pipermail/paraview/2009-April/011674.html</a> (for the last mail, indeed)<br> <a href="http://www.paraview.org/pipermail/paraview/2009-March/011334.html">http://www.paraview.org/pipermail/paraview/2009-March/011334.html</a><br>
<br>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. <br>
<br>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.<br>
<br>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!<br><br>In debug mode, the pipeline execution shows these function calls when change current slice:<br>
<br>(I edited the debug output for a more friendly reading)<br>##########################################################################""<br><span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);"></span><p style="margin: 0px; text-indent: 0px;">
<span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);">vtkStraightenedCurvedPlanarReformation (1EBFB850): RequestUpdateExtent</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);"><br></span></p><p style="margin: 0px; text-indent: 0px;"><span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);">(vtkAlgorithm.h ) vtkStraightenedCurvedPlanarReformation (1EBFB850): <br>
</span></p><p style="margin: 0px; text-indent: 0px;"><span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);"> setting AbortExecute to 0</span></p><p style="margin: 0px; text-indent: 0px;">
<span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);"> returning ProgressText of (null)</span></p><p style="margin: 0px; text-indent: 0px;"><span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);"><br>
</span></p><p style="margin: 0px; text-indent: 0px;"><span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);">vtkStraightenedCurvedPlanarReformation (1EBFB850): RequestData</span></p><br><p style="margin: 0px; text-indent: 0px;">
<span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);">(vtkAlgorithm.h ) vtkStraightenedCurvedPlanarReformation (1EBFB850): <br>
</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);"> setting AbortExecute to 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-family: 'Courier'; font-size: 8.25pt; color: rgb(0, 128, 0);"> returning ProgressText of (null)</span></p>
<p style="margin: 0px; text-indent: 0px;">##########################################################################""</p>
<br><br>Here is my RequestUpdateExtent function:<br><br>########################################################################<br>int vtkStraightenedCurvedPlanarReformation::RequestUpdateExtent (<br> vtkInformation * vtkNotUsed(request),<br>
vtkInformationVector** inputVector,<br> vtkInformationVector *outputVector)<br>{<br> vtkDebugMacro( <<"RequestUpdateExtent"<<endl);<br> //! \bug RequestUpdateExtent set the filter to Modified each time it is <br>
//! called. One effect is to call RequestData when slicing through the<br> //! output.<br> <br> // get the info objects<br> vtkInformation* outInfo = outputVector->GetInformationObject(0);<br> vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);<br>
<br> int outExtent[6], inExtent[6], uExtent[6]; // uExtent is no more used...<br><br> outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), outExtent);<br> outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), uExtent);<br>
inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), inExtent);<br><br> // clip the inExtent to the outExtent. Is it normal to do that???<br> for( int i=0; i < 6; i+=2 )<br> {<br> if( inExtent[i] > outExtent[i] )<br>
inExtent[i] = outExtent[i];<br> if( inExtent[i+1] < outExtent[i+1] )<br> inExtent[i+1] = outExtent[i+1];<br> }<br><br> outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), inExtent, 6);<br>
<br> return( 1 );<br>}<br><br>####################################################################<br><br>I have very big difficulties to understand the 'extent' concept in VTK. Is there a detailed chapter on that in VTK books?<br>
Or do I have to parse the code, step-by-step?<br><br>Thanks for your help. <br>Best regards,<br><br>Jerome<br><br><br><div class="gmail_quote">2009/3/10 Jérôme <span dir="ltr"><<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi, <br><br>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.<br>
<br>Best regards,<br><br>Jerome<br><br><div class="gmail_quote">2009/3/10 Bryn Lloyd <span dir="ltr"><<a href="mailto:blloyd@vision.ee.ethz.ch" target="_blank">blloyd@vision.ee.ethz.ch</a>></span><div><div></div><div class="h5">
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Still no progress on this.<br>
<br>
<br>
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.<br>
<br>
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.<br>
<br>
<br>
I have modified vtkImageConstantPad and tried different parent classes<br>
- vtkImageToImageFilter<br>
- vtkImageAlgorithm<br>
- vtkDataSetAlgorithm<br>
- vtkTrivialProducer<br>
<br>
... 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.<br>
<br>
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.<br>
<br>
<br>
I have seen similar reports by John Biddiscombe, from around 2005 and more recent. Was there any solution to this?<div><div></div><div><br>
<br>
<br>
Thanks<br>
<br>
<br>
Bryn<br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>