I think you desire to change photometricintepretation property programmatically.
If so, in my experience I was trying all sorts of ways to change this property - a) set extrafields on parameter (TIFFField) b) customized ColorModel, SampleModel, etc. c) creating own TIFFImageWriter. None of these worked for me.
The only thing that changed this property from MinIsBlack to MinIsWhite was to use the JAI.create("invert"...) command.
This is the method I used returning an inverted BufferedImage. You can change this to return an object less memory intensive.
private BufferedImage invertImage(
String fileName) {
RenderedOp src = JAI.create("fileload", fileName);
RenderedOp op1 = JAI.create("invert", src);
return op1.getAsBufferedImage();
}
Hope this helps.