<div dir="ltr">Hello world.<div><br></div><div>I want to use a gaussianSpatialObject and a SpatialObjectToImageStatisticsCalculator to filter an image and make a gaussian convolution. Why not using a DiscreteGaussianImageFilter? easy, I need a gaussian with different radii in each dimension and I need to be able to set the size, the maximum value and the sigma, which only a gaussianSpatialObject can offer me.</div><div><br></div><div>I managed to make a sort of filter ussing the SpatialObject offset, the problem is I have to instantiate the SpatialObject for each voxel, or else it will not update the StatisticsCalculator.</div><div><br></div><div>For instance a loop through the image looks like this.</div><div><br></div><div><div>for(int i=0;i<50;i++){</div><div>    for(int j=0;j<50;j++){</div><div>      GaussianType::Pointer gaussian = GaussianType::New();</div><div>      gaussian->SetRadius(5); //I can set radius for each dimension</div><div>      gaussian->SetMaximum(1);</div><div>      gaussian->SetSigma(2);</div><div>      offset[0]=i;</div><div>      offset[1]=j;</div><div>      gaussian->GetIndexToObjectTransform()->SetOffset(offset);</div><div>      gaussian->ComputeObjectToParentTransform();</div><div><br></div><div>      calculator->SetImage(image);</div><div>      calculator->SetSpatialObject(gaussian);</div><div>      calculator->Update();</div><div><br></div><div>      //save this to new image or just cout it</div><div>      std::cout<<calculator->GetMean()<<" "; </div><div>    }</div><div>  }</div></div><div><br></div><div>but I wish I could just update the offset. I am using ITK 4.7 and I just found that Some spatial functions exist in 4.8 but there are no examples on how to use them anyway.</div><div><br></div><div>update: I found out I just needed to update the gaussian object as well</div><div><br></div><div>is there anyway I can use DiscreteGaussianImageFilter with different radii? can I set the maximum value?</div><div><br></div><div>Thankyou for your attention</div><div><br></div><div><br></div></div>