Hi all,I reply to my own question!Actually I managed to find what I was looking 
for. Look my first point below to understand what I was talking about. My 
problem didn't really come from the IKFilterUIView but more from the way I was 
applying the CIKernel in the CIFilter !
here is what I wrote :  cikernel : kernel vec4 MyProcessingKernel(sampler src, 
float k)
        so I thought I should call it like that :       CIImage * outputImage = 
[self apply:_MyProcessingFilterKernel , src, [inputK floatValue], 
                         kCIApplyOptionDefinition, [currIterationImage 
definition],
                          kCIApplyOptionExtent, [currIterationImage extent], 
nil];// I thought "[inputK floatValue]" would be ok to call the kernel because 
I never found something in the documentation saying I shoudln't do that!! 


Finally I figured out that I should do that :           CIVector * input = 
[[CIVector alloc] initWithX:[inputK floatValue]];    CIImage * outputImage =   
[self apply:_MyProcessingFilterKernel , src, input,                    
kCIApplyOptionDefinition, [currIterationImage definition],                      
 kCIApplyOptionExtent, [currIterationImage extent], nil]               So the 
idea is to use a CIVector in which we put the value and use this CIVector as a 
parameter for the filter!!!And it works now!! That was tricky!! 

But regarding my second question I still have no idea! So any answer would be 
welcomed! ;)
Thanks,
Paul



        Date: Tue, 9 Mar 2010 17:52:53 +0100
        From: paul morel <elbomber...@hotmail.com>
        Subject: IKFilterUIView - Problem with text fields
        To: <cocoa-dev@lists.apple.com>
        Message-ID: <snt142-w54c14d6f68ea05311fdda1be...@phx.gbl>
        Content-Type: text/plain; charset="iso-8859-1"


        Hi,     -I am developping a program where I use an IKFilterUIView to 
manage the user interface for filters. I also created my own filter according 
to the core  image filter tutorials in the Mac Dev Center. 
        So far I have the user interface and when I interact with the sliders 
it works pretty well. But as soon as I try to type a value for the parameters 
in  the text field and press 'return' is doesn't work and the program stops and 
I can't do anything else. In the console I have an error : "        
MyProcessingFilter: MyProcessing: argument #1 (p) should be a CIVector object" 
, whereas the argument p is clearly defined as a NSNumber and has never  been 
defined as a CIVector! But this happens only with my own filter. When I try the 
same thing with filters already installed there is no problem with         this 
text field! So the bindings are correct. So is there someone who would have an 
idea of what I could do or check or anything? 
        I tested the filter with the ImageUnitAnalyzer and it passed! So I 
don't think it comes from the filter. 
        -By the way, do you know how it is possible to choose how to display 
the values in the same text field, i.e. if my parameter is an integer value I 
don't        want to see '4.12222212' but '4' when I move the slider.
                Thanks
 
                                          
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to