<div>Hello. I want to write a very simple filter in order to get a better understanding of how i can write filters in ITK.</div>
<div>I have not been able to find any examples or guides on how a filter is written ie. what interfaces it should implement, which class it should inherit from etc.</div>
<div>So i was hoping someone could help me with some guidelines for how i can write my own filter that can accept an input image, access the data in this image, scale and translate it so that it is normalized ie. between 0 to 255.
</div>
<div>I have wild data which ranges from -300000 to 300000. </div>
<div>So basically what my filter should do is only</div>
<div> </div>
<div>newImg=(oldImg+min(oldImg))/max(oldImg+min(oldImg)); </div>
<div> </div>
<div>where min finds the pixel with smallest value and max finds the pixel with maximum value</div>
<div>newImg is the normalized image and oldImg is the input image that should be normalized.</div>
<div> </div>
<div>This a very simple procedure, probably the most simple at all. So how can i put this functionality in a filter that i can use in ITK?</div>
<div> </div>
<div>Guidelines would be great, links would be great and example would be fantastic.</div>
<div> </div>
<div>I really hope someone can help me a bit.</div>
<div> </div>
<div>Thank you very much in advance and many regards</div>