• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: IKFilterUIView - Problem with text fields
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: IKFilterUIView - Problem with text fields


  • Subject: RE: IKFilterUIView - Problem with text fields
  • From: paul morel <email@hidden>
  • Date: Fri, 12 Mar 2010 17:56:41 +0100
  • Importance: Normal

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 <email@hidden>
	Subject: IKFilterUIView - Problem with text fields
	To: <email@hidden>
	Message-ID: <email@hidden>
	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 (email@hidden)

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:

This email sent to email@hidden

  • Prev by Date: Re: What would cause persistentStoreForURL: to return nil?
  • Next by Date: calling the run method in an AppleScript from a cocoa application
  • Previous by thread: IKFilterUIView - Problem with text fields
  • Next by thread: PDF links, iPhone and Quartz 2D
  • Index(es):
    • Date
    • Thread