[Insight-users] itkListSampleToHistogramFilter problem

Benjamin King king . benjamin at mh-hannover . de
Wed, 20 Aug 2003 18:20:08 +0100


------------hcMZzNPhNh95cY1bwT8kR7
Content-Type: text/plain; charset=iso-8859-15; format=flowed

Sorry, forgot the attachment...
------------hcMZzNPhNh95cY1bwT8kR7
Content-Disposition: attachment;
	filename="DebugHistogramFilter.cpp"
Content-Type: application/octet-stream;
	name="DebugHistogramFilter.cpp"
Content-Transfer-Encoding: Base64

I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSAiaXRrSW1hZ2UuaCIKI2lu
Y2x1ZGUgIml0a0ltYWdlRmlsZVJlYWRlci5oIgojaW5jbHVkZSAiaXRrSW1h
Z2VUb0xpc3RBZGFwdG9yLmgiCiNpbmNsdWRlICJpdGtIaXN0b2dyYW0uaCIK
I2luY2x1ZGUgIml0a0xpc3RTYW1wbGVUb0hpc3RvZ3JhbUZpbHRlci5oIgoj
aW5jbHVkZSAiaXRrSW1hZ2VUb0xpc3RBZGFwdG9yLmgiCiNpbmNsdWRlICJp
dGtTY2FsYXJUb0FycmF5Q2FzdEltYWdlRmlsdGVyLmgiCgp1c2luZyBzdGQ6
OmNvdXQ7CnVzaW5nIHN0ZDo6ZW5kbDsKCmludCBtYWluKGludCBhcmdjLCBj
aGFyICphcmd2W10pIHsKICBpZiAoYXJnYyAhPSAyKSB7CiAgICBjb3V0IDw8
ICJDb21wdXRlIGEgaGlzdG9ncmFtIG9mIGEgdm9sdW1lLlxuIgogICAgICAi
VVNBR0U6ICIgPDwgYXJndlswXSA8PCAiIDx2b2x1bWUgZmlsZT5cbiIKICAg
ICAgIjx2b2x1bWUgZmlsZT4gRXh0ZW5zaW9uIGlzIG5lZWRlZCB0byBkZXRl
Y3QgdGhlIGZpbGV0eXBlLiBVc2UgLmhkciBmb3JcbiIKICAgICAgIkFuYWx5
emUgZmlsZXMuIgogICAgICA8PCBlbmRsOwogICAgcmV0dXJuIDE7CiAgfQoK
ICAvLyBSZWFk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