ISODATA clustering algorithm, is very good, you can refer to source code integrity, and can be used directly.
File list:
Debug
....\ISODATA.exe
ISODATA.cpp
ISODATA.h
ISODATA.sln
ISODATA.vcproj
ISODATA.vcproj.PLA-ZRF.zrf.user
MAIN.cpp
Pattern.cpp
Pattern.h
ReadMe.txt
Sort.cpp
Sort.h
stdafx.cpp
stdafx.h