<div dir="ltr"><div>Hi all.</div><div><br></div><div>I´m making a filter in ITK for surface enhancement. This filter is an itkImageToImageFilter.</div><div><br></div><div>Sometimes I will use this filter with 2D images an sometimes with 3D images. The thing is that inside this filter I have to use some other itk components and I need to specify the number of dimensions I´m using. So this is a problem since itk does not let me use variables to specify this.</div>
<div><br></div><div>I´m using the next for 3D:</div><div><br></div><div>typedef itk::Vector< PixelType, 3 > VectorPixelType;</div><div>typedef itk::Vector< VectorPixelType, 3 > MatrixPixelType;</div><div>typedef itk::SymmetricSecondRankTensor< PixelType, 3 > TensorPixelType; </div>
<div><br></div><div>typedef itk::Image< TensorPixelType, 3 > TensorImageType;<br></div><div><br></div><div>but I also need to work with 2D and use the same filter.</div><div><br></div><div>Is there a way to know the number of dimensions of the filter input image, and declare the typedefs using this value? </div>
<div><br></div><br clear="all"><div><br></div>-- <br>Fabián Torres Robles<br>Maestria en Ciencias en Ingeniería Electrónica<br>Ingeniería en Sistemas Electrónicos<br>tel. 58081280, 0445534661338<br>e-mail <a href="mailto:fabian.trobles@gmail.com" target="_blank">fabian.trobles@gmail.com</a>, <a href="mailto:dae.wong@gmail.com" target="_blank">dae.wong@gmail.com</a> <div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">
</div><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%"></div>
</div>